Coder Social home page Coder Social logo

Comments (6)

tim77 avatar tim77 commented on June 16, 2024 1

Thank you. Built for f35 and all tests passed.

from wf-config.

alebastr avatar alebastr commented on June 16, 2024

Already fixed by using system doctest in #43.

wf-config.spec diff
--- a/wf-config.spec
+++ b/wf-config.spec
@@ -6,14 +6,17 @@ Summary:        Library for managing configuration files, written for wayfire
 License:        MIT
 URL:            https://github.com/WayfireWM/wf-config
 Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Fix build caused by glibc 2.34 SIGSTKSZ changes
+# Fedora doctest package is already patched, but wf-config was using bundled copy
+Patch0:         %{url}/pull/43.patch#/wf-config-0.7.0-use-system-doctest.patch

 BuildRequires:  gcc-c++
 BuildRequires:  meson
 BuildRequires:  cmake
+BuildRequires:  cmake(doctest)
 BuildRequires:  cmake(glm)
 BuildRequires:  pkgconfig(libevdev)
 BuildRequires:  pkgconfig(libxml-2.0)
-BuildRequires:  pkgconfig(wlroots) >= 0.12.0

 %description
 %{summary}.
@@ -40,6 +43,10 @@ Development files for %{name}.
 %meson_install


+%check
+%meson_test
+
+
 %files
 %license LICENSE
 %{_libdir}/lib%{name}.so.0*

Similar issue with wayfire build should be fixed by updating bundled wf-touch to WayfireWM/wf-touch@8974eb0

from wf-config.

tim77 avatar tim77 commented on June 16, 2024

@alebastr thank you! Updated package.

from wf-config.

tim77 avatar tim77 commented on June 16, 2024

If you don't mind i'd reopen issue since we still have a problem with tests, but now on 32-bit arches like i686 and armv7hl.

+ /usr/bin/meson test -C i686-redhat-linux-gnu --num-processes 48 --print-errorlogs
ninja: Entering directory `/builddir/build/BUILD/wf-config-0.7.0/i686-redhat-linux-gnu'
ninja: no work to do.
 1/10 Types test          OK              0.03s
 2/10 OptionBase test     OK              0.03s
 3/10 Option test         OK              0.02s
 4/10 Option wrapper test OK              0.02s
 5/10 Section test        OK              0.02s
 6/10 XML test            OK              0.02s
 7/10 ConfigManager test  OK              0.02s
 8/10 Log test            OK              0.01s
 9/10 File parsing test   OK              0.31s
10/10 Duration test       FAIL            0.37s   exit status 1
>>> MALLOC_PERTURB_=147 /builddir/build/BUILD/wf-config-0.7.0/i686-redhat-linux-gnu/test/duration_test
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
[doctest] doctest version is "2.4.5"
[doctest] run with "--help" for options
===============================================================================
../test/duration_test.cpp:12:
TEST CASE:  wf::animation::duration_t
../test/duration_test.cpp:19: ERROR: CHECK( duration.running() == false ) is NOT correct!
  values: CHECK( true == false )
../test/duration_test.cpp:20: ERROR: CHECK( duration.progress() == doctest::Approx{1.0} ) is NOT correct!
  values: CHECK( -9392801.5 == Approx( 1.0 ) )
===============================================================================
[doctest] test cases:  3 |  2 passed | 1 failed | 0 skipped
[doctest] assertions: 56 | 54 passed | 2 failed |
[doctest] Status: FAILURE!
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Summary of Failures:
10/10 Duration test       FAIL            0.37s   exit status 1
Ok:                 9   
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log.

from wf-config.

alebastr avatar alebastr commented on June 16, 2024

Ah, that's a funny one: duration_t::impl::is_ready assumes that get_elapsed on freshly initialized object will return sufficiently large positive number. That works on 64-bit architectures, as now() - 0 fits into 64-bit long. That also fails on all 32-bit architectures as the value overflows 32-bit long type and becomes negative.

long get_elapsed() const
{
using namespace std::chrono;
auto now = system_clock::now();
return duration_cast<milliseconds>(now - start_point).count();
}

I guess get_elapsed should be returning std::chrono::milliseconds::rep.

from wf-config.

ammen99 avatar ammen99 commented on June 16, 2024

Ah, that's a funny one: duration_t::impl::is_ready assumes that get_elapsed on freshly initialized object will return sufficiently large positive number. That works on 64-bit architectures, as now() - 0 fits into 64-bit long. That also fails on all 32-bit architectures as the value overflows 32-bit long type and becomes negative.

long get_elapsed() const
{
using namespace std::chrono;
auto now = system_clock::now();
return duration_cast<milliseconds>(now - start_point).count();
}

I guess get_elapsed should be returning std::chrono::milliseconds::rep.

Nice find, we could also just return int64_t, I am not a fan of such long types :)

from wf-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.