Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 750545 - dev-util/bbe fails to link on ~amd64 (undefined reference to `reset_rpos')
Summary: dev-util/bbe fails to link on ~amd64 (undefined reference to `reset_rpos')
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-21 10:30 UTC by James Cloos
Modified: 2021-11-15 05:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Cloos 2020-10-21 10:30:18 UTC
x86_64-pc-linux-gnu-gcc -I..  -Os -ftree-vectorize -pipe -march=native  -Wl,-O1 -Wl,--as-needed -o bbe bbe.o xmalloc.o buffer.o execute.o  
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: buffer.o: in function `find_block':
buffer.c:(.text+0x635): undefined reference to `end_of_stream'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: buffer.c:(.text+0x6b7): undefined reference to `end_of_stream'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: execute.o: in function `execute_program':
execute.c:(.text+0xdf5): undefined reference to `reset_rpos'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:347: bbe] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-util/bbe-0.2.2-r1/work/bbe-0.2.2/src'
make[1]: *** [Makefile:368: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/bbe-0.2.2-r1/work/bbe-0.2.2'
make: *** [Makefile:309: all] Error 2
 * ERROR: dev-util/bbe-0.2.2-r1::gentoo failed (compile phase):
Comment 1 James Cloos 2020-10-21 10:32:06 UTC
I should note that it worked on an old box of mine back in July, but the newer ones cannot install it now.
Comment 2 James Cloos 2020-10-21 12:18:43 UTC
Oh, and when it worked that box was running gcc 6; all that fail run gcc 9.

binutils also likely was out of date.

and now is current.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-23 01:47:28 UTC
Full build.log and emerge --info please.
Comment 4 Daniel Pielmeier gentoo-dev 2020-10-23 05:41:42 UTC
(In reply to James Cloos from comment #1)
> I should note that it worked on an old box of mine back in July, but the
> newer ones cannot install it now.

I can not reproduce with gcc-9.3.0-r1 and binutils-2.34-r2. It is about your CFFLAGS which make this fail. Probably you also changed them in-between. Removing -ftree-vectorize makes it build!
Comment 5 Daniel Pielmeier gentoo-dev 2020-10-23 06:21:30 UTC
(In reply to Daniel Pielmeier from comment #4)
> (In reply to James Cloos from comment #1)
> > I should note that it worked on an old box of mine back in July, but the
> > newer ones cannot install it now.
> 
> I can not reproduce with gcc-9.3.0-r1 and binutils-2.34-r2. It is about your
> CFFLAGS which make this fail. Probably you also changed them in-between.
> Removing -ftree-vectorize makes it build!

Sorry -ftree-vectorize is not to blame it seems to fail with -Os!
Comment 6 James Cloos 2020-10-25 15:01:33 UTC
OK

It does work here with -O2 instead of -Os.

It looks like the ebuild needs to filter CFLAGS…
Comment 7 Larry the Git Cow gentoo-dev 2020-10-30 15:19:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=945da8f092da033504cc68c28784ed47b1476e45

commit 945da8f092da033504cc68c28784ed47b1476e45
Author:     Daniel Pielmeier <billie@gentoo.org>
AuthorDate: 2020-10-30 15:19:38 +0000
Commit:     Daniel Pielmeier <billie@gentoo.org>
CommitDate: 2020-10-30 15:19:38 +0000

    dev-util/bbe: Filter -Os.
    
    Thanks to James Cloos for the report.
    
    Closes: https://bugs.gentoo.org/750545
    Package-Manager: Portage-3.0.8, Repoman-3.0.2
    Signed-off-by: Daniel Pielmeier <billie@gentoo.org>

 dev-util/bbe/bbe-0.2.2-r1.ebuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)