Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831352 - net-misc/ntpsec-1.2.1-r1 fails to compile
Summary: net-misc/ntpsec-1.2.1-r1 fails to compile
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: https://gitlab.com/NTPsec/ntpsec/-/is...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-01-17 12:01 UTC by Agostino Sarubbo
Modified: 2023-01-28 20:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,215.40 KB, text/plain)
2022-01-17 12:01 UTC, Agostino Sarubbo
Details
002_1-test.log (002_1-test.log,10.83 KB, text/plain)
2022-01-17 15:05 UTC, Agostino Sarubbo
Details
propsed patch to NTPsec tree to make it respect --notests (0001-I-NTPsec-build-does-not-repect-notests.patch,1.48 KB, patch)
2022-04-10 15:06 UTC, James Browning
Details | Diff
proposed patch to ntpsec ebuilds and metadata.xml (0001-net-misc-ntpsec-Try-to-only-run-tests-in-src_test.patch,4.24 KB, patch)
2022-04-10 18:01 UTC, James Browning
Details | Diff
build.log-failure-with-patch (file_831352.txt,327.46 KB, text/plain)
2022-04-12 08:35 UTC, Sam James
Details
proposed patch to make ntpsec only run tests in test phase, and clarify output (0001-net-misc-ntpsec-Try-to-only-run-tests-in-src_test.patch,7.85 KB, patch)
2022-04-12 12:00 UTC, James Browning
Details | Diff
build.log-clean-install (file_831352.txt,343.32 KB, text/plain)
2022-04-13 01:46 UTC, Sam James
Details
try to only run tests in src_test removing them from src_install (0001-net-misc-ntpsec-Try-to-only-run-tests-in-src_test-on.patch,13.06 KB, patch)
2022-04-13 09:08 UTC, James Browning
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-01-17 12:01:14 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2022-01-17 12:01:17 UTC
Created attachment 762394 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-01-17 12:01:18 UTC
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
Comment 3 Agostino Sarubbo gentoo-dev 2022-01-17 12:01:46 UTC
It seems also that it is running TESTS in src_compile
Comment 4 Agostino Sarubbo gentoo-dev 2022-01-17 15:05:35 UTC
Created attachment 762401 [details]
002_1-test.log

test.log
Comment 5 James Browning 2022-03-07 08:30:55 UTC
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.
Comment 6 James Browning 2022-04-10 15:06:29 UTC
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
Comment 7 James Browning 2022-04-10 18:01:20 UTC
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.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 08:29:26 UTC
(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.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 08:34:47 UTC
(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
```
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 08:35:14 UTC
Created attachment 770276 [details]
build.log-failure-with-patch
Comment 11 James Browning 2022-04-12 12:00:02 UTC
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.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-13 01:45:53 UTC
(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'.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-13 01:46:14 UTC
Created attachment 770471 [details]
build.log-clean-install

This is a log with the patch but "ebuild .. clean install" (no 'test').
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-13 01:47:26 UTC
(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)
Comment 15 James Browning 2022-04-13 09:08:50 UTC
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.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-20 01:03:54 UTC
(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.