Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182782 - <=net-nntp/inn-2.5.0 fails w/ -Wl,--as-needed
Summary: <=net-nntp/inn-2.5.0 fails w/ -Wl,--as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Net-news project
Keywords: PMASKED
: 248145 281721 (view as bug list)
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2007-06-21 12:40 UTC by Conrad Kostecki
Modified: 2010-11-25 12:52 UTC (History)
6 users (show)

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

inn-2.4.3-r1.patch (inn-2.4.3-r1.patch,581 bytes, patch)
2007-06-21 12:45 UTC, Conrad Kostecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2007-06-21 12:40:47 UTC
I would suggest, we should filter the ldflag "-Wl,--as-needed"
I know, that there are using some people this.

I can reproduce this error on all of my gentoo pcs.

So it should be filtered. If the flag is enabled, we get this error:

gcc -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -fomit-frame-pointer -m3dnow -march=k6-3 -mfpmath=387 -mmmx -O3 -pipe -I../include  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -c -o connection.o connection.c
../libtool --mode=link gcc -Wl,--as-needed -o innfeed article.o buffer.o config_l.o config_y.o endpoint.o host.o innlistener.o main.o misc.o tape.o version.o connection.o /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/storage/ /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/history/ /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/lib/
mkdir .libs
gcc -Wl,--as-needed -o .libs/innfeed article.o buffer.o config_l.o config_y.o endpoint.o host.o innlistener.o main.o misc.o tape.o version.o connection.o  /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/history/.libs/ /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/storage/.libs/ /var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/lib/.libs/ -Wl,--rpath -Wl,/usr/lib/news/lib
/var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/storage/.libs/ undefined reference to `HISlookup'
collect2: ld returned 1 exit status
make[1]: *** [innfeed] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/net-nntp/inn-2.4.3/work/inn-2.4.3/innfeed'
make: *** [all-innfeed] Fehler 2

!!! ERROR: net-nntp/inn-2.4.3 failed.
Call stack:, line 1629:   Called dyn_compile, line 975:   Called qa_call 'src_compile', line 44:   Called src_compile
  inn-2.4.3.ebuild, line 84:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/net-nntp/inn-2.4.3/temp/build.log'.
Comment 1 Conrad Kostecki gentoo-dev 2007-06-21 12:45:01 UTC
Created attachment 122689 [details, diff]


patch against inn-2.4.3.ebuild
Comment 2 Wulf Krueger (RETIRED) gentoo-dev 2007-06-24 22:28:19 UTC
Thanks, Conrad! Fixed in CVS.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 16:49:35 UTC
This is _not_ a fix so this bug is not resolved. Reopening.
Comment 4 Thomas S. Howard 2008-11-18 05:58:22 UTC
The problem boils down to a circular dependency. INN creates two libs, libinnhist and libstorage.   libinnhist depends on libstorage for a bunch of symbols, so libstorage is built first, and libinnhist is linked with it.  However, libstorage never gets relinked against libinnhist, so when the build gets around to linking the innfeed executable, it hits the undefined 'HISlookup' symbol in libstorage and quits.  I have no idea if there's some nice, elegant way to deal with a case like this.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-02 12:59:14 UTC
*** Bug 248145 has been marked as a duplicate of this bug. ***
Comment 6 Fabio Erculiani (RETIRED) gentoo-dev 2009-10-11 15:43:36 UTC
So no solution is better than workaround?
It's 2009 actually and many many other pkgs have been workarounded that way.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-11 18:31:17 UTC
Such "workarounds" are broken by design.

You can either learn how to work it around correctly (but that doesn't close the bug) or to fix it properly. Or finally you could learn to ask nicely, but that's probably too hard.
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2009-12-19 22:03:25 UTC
Open for 2 and half year, adding treecleaner@
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2009-12-24 16:34:35 UTC
*** Bug 281721 has been marked as a duplicate of this bug. ***
Comment 10 Richard Freeman gentoo-dev 2010-01-11 23:45:01 UTC
Hmm - seems a bit odd to not have inn in portage?  Is there some new standard NNTP server out there?

If we're just looking for a dev to ask nicely for advice on properly working around the as-needed issue and commit the build, I'm sure some could be found.  I'm not an inn expert, so I'd hesitate to be the first to volunteer, but I don't mind just taking care of an as-needed patch if not much work is necessary.
Comment 11 Ben de Groot (RETIRED) gentoo-dev 2010-01-12 00:06:38 UTC
Wouldn't adding no-as-needed from flag-o-matic.eclass be the proper workaround here?
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2010-01-12 01:34:33 UTC
This is getting ridiculous. We now have a package.mask entry that lists the wrong masking reason and a pending removal for the wrong reason (--as-needed compliance isn't mandatory AFAIK).

This package does need all kinds of attention, but this is the wrong kind. I'm working on 2.5.1.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2010-01-12 01:36:42 UTC
2.5.0 is in the tree so this bug is fixed.