Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 864557 - net-misc/linuxptp-3.1.1 ignores user-set CPP, fails to compile against sys-devel/gcc[-native-symlinks] (missing.h:79:19: error: static declaration of clock_adjtime follows non-static declaration)
Summary: net-misc/linuxptp-3.1.1 ignores user-set CPP, fails to compile against sys-de...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on: 864547
Blocks: tc-directly
  Show dependency tree
 
Reported: 2022-08-09 12:29 UTC by Agostino Sarubbo
Modified: 2022-08-15 13:42 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,69.35 KB, text/plain)
2022-08-09 12:29 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-08-09 12:29:55 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-misc/linuxptp-2.0-r1 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-08-09 12:29:57 UTC
Created attachment 798999 [details]
build.log

build log and emerge --info
Comment 2 Marek Szuba archtester gentoo-dev 2022-08-09 12:49:37 UTC
I would say this is yet another indication of linuxptp-2.0 being ancient and will therefore make this dependent on the version bump. Ultimately it is entirely up to the maintainer, though.
Comment 3 Marek Szuba archtester gentoo-dev 2022-08-15 09:04:26 UTC
OK, let's see if this still happens with 3.1.1.
Comment 4 Agostino Sarubbo gentoo-dev 2022-08-15 10:47:11 UTC
ci has reproduced this issue with version 3.1.1 - Updating summary.
Comment 5 Marek Szuba archtester gentoo-dev 2022-08-15 12:39:22 UTC
Would you kindly let me know if the "cpp" symlink exists on the system in question? I do not see in the log whether sys-devel/gcc has been built with USE="-native-symlinks" or not.
Comment 6 Marek Szuba archtester gentoo-dev 2022-08-15 13:30:01 UTC
Having just managed to reproduce this error by simply deleting "cpp", I will proceed under the assumption that there were no gcc native symlinks present. Please correct me (and reopen the issue should I manage to resolve it by then) if I am wrong.
Comment 7 Larry the Git Cow gentoo-dev 2022-08-15 13:37:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6274f4bc036e953c693b17e21a2946520a90b48f

commit 6274f4bc036e953c693b17e21a2946520a90b48f
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2022-08-15 13:30:20 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2022-08-15 13:37:04 +0000

    net-misc/linuxptp: honour user value of CPP
    
    Upstream build scripts call the preprocessor to acquire the list
    of system include directories, which is then used to locate the
    declaration of clock_adjtime(). However, they hard-coded the
    preprocessor name to "cpp" - and if that is absent (e.g. on a system
    without native gcc symlinks) the script invoking it gets an empty list
    of directories, assumes the absence of clock_adjtime() definition and
    compensates by enabling a custom one, and subsequently causes a build
    failure when the two definitions collide.
    
    Closes: https://bugs.gentoo.org/864557
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-misc/linuxptp/files/linuxptp-3.1.1-user_cpp.patch | 11 +++++++++++
 net-misc/linuxptp/linuxptp-3.1.1.ebuild               |  6 +++++-
 2 files changed, 16 insertions(+), 1 deletion(-)