https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-misc/ntpsec-1.2.1-r1 fails to compile. Discovered on: amd64 (internal ref: tinderbox) NOTE: This machine uses CLANG as a compiler and LLD as a linker
Created attachment 762394 [details] build.log build log and emerge --info
Error(s) that match a know pattern: Checking for 'gcc' (C compiler) : not found Checking for header bsd/string.h : not found Checking for header dns_sd.h : not found Checking for header libscf.h : not found Checking for header net/if6.h : not found Checking for header priv.h : not found Checking for header sys/clockctl.h : not found Checking for header sys/modem.h : not found Checking for header sys/sockio.h : not found Checking for library ssp : not found Checking for library ssp_nonshared : not found Checking for python module 'gps' (ver >= num(3, 18)) : not found Checking for systemd : not found
It seems also that it is running TESTS in src_compile
Created attachment 762401 [details] 002_1-test.log test.log
looks a bit like a clang-13 issue, reported at https://gitlab.com/NTPsec/ntpsec/-/issues/714 , and seems to be inline related to files over something.
Created attachment 769850 [details, diff] propsed patch to NTPsec tree to make it respect --notests NTPsec build does not repect --notests STR: (run the following) * git clone https://gitlab.com/NTPsec/ntpsec * cd ntpsec * ./waf configure build --notests -p AR: NTPsec runs tests despite having a parameter telling it not to ER: NTPsec should not run tests when it has been told not to
Created attachment 769883 [details, diff] proposed patch to ntpsec ebuilds and metadata.xml Pass --notests option to waf in the build phase, add src_test which calls ./waf check with options, and delete tests from the metadata.xml file. I, James T Browning grant full non-eclusive use of this patch and patch 769850 (previously attached) for use in improving the quality of NTPsec building on Gentoo (and derivates thereof). Part of it is I'm gonna want to push 769850 to NTPsec. It would be nice if someone else filed it first.
(In reply to James Browning from comment #7) > Created attachment 769883 [details, diff] [details, diff] > proposed patch to ntpsec ebuilds and metadata.xml James, thanks for always responding to these bugs. I do appreciate it.
(In reply to Sam James from comment #8) > (In reply to James Browning from comment #7) > > Created attachment 769883 [details, diff] [details, diff] [details, diff] > > proposed patch to ntpsec ebuilds and metadata.xml > > James, thanks for always responding to these bugs. I do appreciate it. The patch doesn't seem to work for me: ``` [214/215] Compiling ntpclients/ntpviz.py [215/215] Compiling ntpclients/ntpdig.py Waf: Leaving directory `/var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main' Wrote test log to: /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/test.log execution summary tests that pass 8/8 /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/test_libntp /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/test_ntpd /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_util.py /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_agentx.py /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_agentx_packet.py /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_ntpc.py /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_packet.py /var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1-python3_9/build/main/tests/pylib/test_statfiles.py tests that fail 0/8 running: main/ntpclients/ntpleapfetch --version OK running: main/ntpd/ntpd --version OK running: main/ntpfrob/ntpfrob -V OK running: main/ntptime/ntptime -V OK running: main/ntpclients/ntpdig --version OK running: main/ntpclients/ntpkeygen --version OK running: main/ntpclients/ntplogtemp --version OK running: main/ntpclients/ntpmon --version OK running: main/ntpclients/ntpq --version OK running: main/ntpclients/ntpsnmpd --version OK running: main/ntpclients/ntpsweep --version OK running: main/ntpclients/ntptrace --version OK running: main/ntpclients/ntpviz --version OK running: main/ntpclients/ntpwait --version OK 'build' finished successfully (10.802s) >>> Source compiled. >>> Test phase: net-misc/ntpsec-1.2.1-r2 "/var/tmp/portage/net-misc/ntpsec-1.2.1-r2/work/ntpsec-1.2.1/waf" check --verbose --jobs=1 The project was not configured: run "waf configure" first! * ERROR: net-misc/ntpsec-1.2.1-r2::gentoo failed (test phase): * check failed ```
Created attachment 770276 [details] build.log-failure-with-patch
Created attachment 770363 [details, diff] proposed patch to make ntpsec only run tests in test phase, and clarify output This patch does several things... 1. Adds a patch so that when './waf build' or './waf' are run the tests are not executed 2. uses the patch for 1.2.1 3. uses the copy upstream for 9999 4. Adds a patch that converts the logs from bytes to strings for clarity of output.
(In reply to James Browning from comment #11) > Created attachment 770363 [details, diff] [details, diff] > proposed patch to make ntpsec only run tests in test phase, and clarify > output > > This patch does several things... > 1. Adds a patch so that when './waf build' or './waf' are run the tests are > not executed > 2. uses the patch for 1.2.1 > 3. uses the copy upstream for 9999 > 4. Adds a patch that converts the logs from bytes to strings for clarity of > output. Interestingly the tests are still built (not a huge issue by itself) and run in src_install now. Not that you're under any obligation to test this, but I'm assuming you use Gentoo but don't know how to run the test suite? If so, it is easy: 'ebuild ... clean test install'.
Created attachment 770471 [details] build.log-clean-install This is a log with the patch but "ebuild .. clean install" (no 'test').
(In reply to Sam James from comment #13) > Created attachment 770471 [details] > build.log-clean-install > > This is a log with the patch but "ebuild .. clean install" (no 'test'). Oh, now I've *run* the tests, I can see a difference. I think I was just complaining about 'running: main/ntpclients/ntptrace --version OK running: main/ntpclients/ntpviz --version OK' etc which are always run (which is fine if intended)
Created attachment 770591 [details, diff] try to only run tests in src_test removing them from src_install It is not the intent to run tests or checks outside of src_test, except for configuration.
(In reply to James Browning from comment #15) > Created attachment 770591 [details, diff] [details, diff] > try to only run tests in src_test removing them from src_install > > It is not the intent to run tests or checks outside of src_test, except for > configuration. Thanks! Forgot to tag the bug but did tag bug 795522.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1bdf4a406fc113cf66e6cd044343fe1361ac4d7 commit d1bdf4a406fc113cf66e6cd044343fe1361ac4d7 Author: James Browning <JamesB.fe80@gmail.com> AuthorDate: 2024-06-06 11:56:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-14 08:02:20 +0000 net-misc/ntpsec: Run tests conditionally I am requiring FEATURES+=" test" and USE+=" test" for this. Bug: https://bugs.gentoo.org/831352 Signed-off-by: James Browning <JamesB.fe80@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36963 Signed-off-by: Sam James <sam@gentoo.org> net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild | 9 +++++++-- net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild | 9 +++++++-- net-misc/ntpsec/ntpsec-9999.ebuild | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-)