Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899742 - net-libs/xdp-tools-1.3.1-r3 fails to compile: Warning: Num of global symbols in libxdp.o xsk.o (68) does NOT match with num of versioned symbols in libxdp.so (71) Please make sure all symbols are versioned in libxdp.map
Summary: net-libs/xdp-tools-1.3.1-r3 fails to compile: Warning: Num of global symbols ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason A. Donenfeld
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2023-03-06 07:58 UTC by Agostino Sarubbo
Modified: 2023-07-10 05:32 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,58.98 KB, text/plain)
2023-03-06 07:58 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 2023-03-06 07:58:47 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-libs/xdp-tools-1.3.1 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-03-06 07:58:49 UTC
Created attachment 856228 [details]
build.log

build log and emerge --info
Comment 2 Holger Hoffstätte 2023-03-06 09:02:05 UTC
I cannot recreate this at all, even when using all the same toolchain options, same bpftool version, same binutils, same CFLAGS etc. It .. just works?

...
ln -sf libxdp.so.1 libxdp.so
x86_64-pc-linux-gnu-ar rcs libxdp.a staticobjs/libxdp.o staticobjs/xsk.o xdp-dispatcher.embed.o xsk_def_xdp_prog.embed.o xsk_def_xdp_prog_5.3.embed.o
make[2]: Leaving directory '/tmp/portage/net-libs/xdp-tools-1.3.1/work/xdp-tools-1.3.1/lib/libxdp'
...

Why does the tinderbox log show the warnings? The only difference I have found so far is that my gcc/binutils have zstd support enabled, as they should. But that shouldn't bother ar.
Comment 3 Agostino Sarubbo gentoo-dev 2023-03-06 09:13:38 UTC
(In reply to Holger Hoffstätte from comment #2)
> I cannot recreate this at all, even when using all the same toolchain
> options, same bpftool version, same binutils, same CFLAGS etc. It .. just
> works?
> 
> ...
> ln -sf libxdp.so.1 libxdp.so
> x86_64-pc-linux-gnu-ar rcs libxdp.a staticobjs/libxdp.o staticobjs/xsk.o
> xdp-dispatcher.embed.o xsk_def_xdp_prog.embed.o xsk_def_xdp_prog_5.3.embed.o
> make[2]: Leaving directory
> '/tmp/portage/net-libs/xdp-tools-1.3.1/work/xdp-tools-1.3.1/lib/libxdp'
> ...
> 
> Why does the tinderbox log show the warnings? The only difference I have
> found so far is that my gcc/binutils have zstd support enabled, as they
> should. But that shouldn't bother ar.

can you try with -native-symlinks ?
Comment 4 Holger Hoffstätte 2023-03-06 09:24:12 UTC
See also: https://github.com/xdp-project/xdp-tools/issues/302
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-06 09:36:47 UTC
No ideas yet, I assumed it was an LLVM build at first (seemed like the kind of thing the LLD 16 changes for stricter linker script stuff) but nope.
Comment 6 Holger Hoffstätte 2023-03-06 09:38:23 UTC
(In reply to Agostino Sarubbo from comment #3)
> > Why does the tinderbox log show the warnings? The only difference I have
> > found so far is that my gcc/binutils have zstd support enabled, as they
> > should. But that shouldn't bother ar.
> 
> can you try with -native-symlinks ?

I had it on profile-default (unset) and therefore enabled per-package. I explicitly disabled it globally, rebuilt llvm/clang/lld-toolchain-symlinks and tried again - no change, still no warnings from ar.
Comment 7 Holger Hoffstätte 2023-03-06 11:28:20 UTC
I just saw that the tinderbox gcc is built with +lto, which also includes ar/nm/ranlib. Do we know that this works reliably?
Comment 8 Agostino Sarubbo gentoo-dev 2023-03-07 08:04:00 UTC
ci has reproduced this issue with version 1.3.1-r1 - Updating summary.
Comment 9 Agostino Sarubbo gentoo-dev 2023-03-07 08:09:21 UTC
(In reply to Holger Hoffstätte from comment #6)
> I had it on profile-default (unset) and therefore enabled per-package. I
> explicitly disabled it globally, rebuilt llvm/clang/lld-toolchain-symlinks
> and tried again - no change, still no warnings from ar.


(In reply to Agostino Sarubbo from comment #8)
> ci has reproduced this issue with version 1.3.1-r1 - Updating summary.


Since I have reproduced with 1.3.1-r1 I doubt you have really disabled -native-symlinks
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-07 08:15:11 UTC
(In reply to Agostino Sarubbo from comment #9)
> (In reply to Holger Hoffstätte from comment #6)
> > I had it on profile-default (unset) and therefore enabled per-package. I
> > explicitly disabled it globally, rebuilt llvm/clang/lld-toolchain-symlinks
> > and tried again - no change, still no warnings from ar.
> 
> 
> (In reply to Agostino Sarubbo from comment #8)
> > ci has reproduced this issue with version 1.3.1-r1 - Updating summary.
> 
> 
> Since I have reproduced with 1.3.1-r1 I doubt you have really disabled
> -native-symlinks

Are you saying it works for you when you *enable* native-symlinks?
Comment 11 Agostino Sarubbo gentoo-dev 2023-03-07 08:19:49 UTC
(In reply to Sam James from comment #10)
> Are you saying it works for you when you *enable* native-symlinks?

yes, this is a -native-symlinks issue. I don't know if the issue is what we are seeing in the summary or it is likely hidden.
Comment 12 Agostino Sarubbo gentoo-dev 2023-03-10 12:15:27 UTC
ci has reproduced this issue with version 1.3.1-r2 - Updating summary.
Comment 13 Agostino Sarubbo gentoo-dev 2023-04-16 08:40:22 UTC
ci has reproduced this issue with version 1.3.1-r3 - Updating summary.
Comment 14 Holger Hoffstätte 2023-07-08 11:19:16 UTC
I finally managed to reproduce the problem by following the instructions in https://wiki.gentoo.org/wiki/Project:Toolchain/use_native_symlinks (very nice!) and added the necessary bits to the build (see 1.4.0 bump PR), as well as filing a PR upstream (https://github.com/xdp-project/xdp-tools/pull/341).
Let's hope this finally makes the Gentoo CI happy.
Comment 15 Larry the Git Cow gentoo-dev 2023-07-10 05:30:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e7d98bc4aa5f3ffcb0e2aa2c15b76f3e309ddd0

commit 5e7d98bc4aa5f3ffcb0e2aa2c15b76f3e309ddd0
Author:     Holger Hoffstätte <holger@applied-asynchrony.com>
AuthorDate: 2023-07-08 11:14:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-10 05:30:16 +0000

    net-libs/xdp-tools: bump to 1.4.0, add toolchain fixes
    
    Bug: https://bugs.gentoo.org/899742
    Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
    Closes: https://github.com/gentoo/gentoo/pull/31801
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/xdp-tools/Manifest                    |  1 +
 net-libs/xdp-tools/files/1.4.0-toolchain.patch | 57 +++++++++++++++++
 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild      | 87 ++++++++++++++++++++++++++
 3 files changed, 145 insertions(+)
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-10 05:32:02 UTC
(In reply to Holger Hoffstätte from comment #14)
> I finally managed to reproduce the problem by following the instructions in
> https://wiki.gentoo.org/wiki/Project:Toolchain/use_native_symlinks (very
> nice!) and added the necessary bits to the build (see 1.4.0 bump PR), as
> well as filing a PR upstream
> (https://github.com/xdp-project/xdp-tools/pull/341).
> Let's hope this finally makes the Gentoo CI happy.

Thanks!