Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212970 - app-backup/amanda doesn't compile w/ -Wl,--as-needed
Summary: app-backup/amanda doesn't compile w/ -Wl,--as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-03-10 19:18 UTC by Jeff Mitchell
Modified: 2008-09-18 04:35 UTC (History)
2 users (show)

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


Attachments
Modifies two Makefile.ams to fix breakage (amanda-2.5.2_p1-fix-asneeded.patch,951 bytes, patch)
2008-03-10 19:21 UTC, Jeff Mitchell
Details | Diff
Patches the 2.5.2_p1-r3 ebuild (amanda_ebuild_patch,524 bytes, patch)
2008-03-10 19:24 UTC, Jeff Mitchell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Mitchell 2008-03-10 19:18:23 UTC
Amanda won't compile complaining about missing symbols if you are using -Wl,--as-needed in your LDFLAGS.

Reproducible: Always




Attached patch and ebuild diff fixes it for latest amanda in portage
Comment 1 Jeff Mitchell 2008-03-10 19:21:20 UTC
Created attachment 145763 [details, diff]
Modifies two Makefile.ams to fix breakage
Comment 2 Jeff Mitchell 2008-03-10 19:24:00 UTC
Created attachment 145764 [details, diff]
Patches the 2.5.2_p1-r3 ebuild
Comment 3 Jeff Mitchell 2008-03-10 20:37:56 UTC
I've contacted upstream.  Will update this as appropriate, although hopefully this can be put into a -r4 ebuild in main Portage tree.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 12:38:21 UTC
The source patch is good, the ebuild patch is not ;)

You should apply patches in src_unpack, not src_compile, and you should be running at least eautomake if you change the Makefile.am files.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-06-26 01:22:28 UTC
in r4.
Comment 6 Jeff Mitchell 2008-09-15 16:23:21 UTC
Oddly, both ebuilds are broken, now -- both my -r3 with the patches above, and the in-tree -r4.  Not sure if this is an --as-needed problem or not, or maybe something with portage/environment changes?  -r3 is currently installed, so it compiled before.

Here's what I get:

/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc  -D_GNU_SOURCE -march=opteron -O2 -pipe      -Wl,--as-needed    -o amdd  amdd.o ../common-src/libamanda.la libamtape.la ../common-src/libamanda.la -ldb -lm -lreadline -lcurses -lnsl -lresolv
x86_64-pc-linux-gnu-gcc -D_GNU_SOURCE -march=opteron -O2 -pipe -Wl,--as-needed -o .libs/amdd amdd.o  ./.libs/libamtape.so ../common-src/.libs/libamanda.so -ldb -lm -lreadline -lcurses -lnsl -lresolv
./.libs/libamtape.so: undefined reference to `debug_vstralloc'
./.libs/libamtape.so: undefined reference to `getconf_readblocksize'
./.libs/libamtape.so: undefined reference to `debug_areads'
./.libs/libamtape.so: undefined reference to `debug_alloc'
./.libs/libamtape.so: undefined reference to `build_header'
./.libs/libamtape.so: undefined reference to `fh_init'
./.libs/libamtape.so: undefined reference to `debug_amtable_alloc'
./.libs/libamtape.so: undefined reference to `debug_newvstralloc'
./.libs/libamtape.so: undefined reference to `quote_string'
./.libs/libamtape.so: undefined reference to `debug_alloc_push'
./.libs/libamtape.so: undefined reference to `fullwrite'
./.libs/libamtape.so: undefined reference to `vstrextend'
./.libs/libamtape.so: undefined reference to `debug_newstralloc'
./.libs/libamtape.so: undefined reference to `split'
./.libs/libamtape.so: undefined reference to `debug_printf'
./.libs/libamtape.so: undefined reference to `parse_file_header'
./.libs/libamtape.so: undefined reference to `areads_relbuf'
./.libs/libamtape.so: undefined reference to `sanitise_filename'
./.libs/libamtape.so: undefined reference to `debug_stralloc'
./.libs/libamtape.so: undefined reference to `amtable_free'
collect2: ld returned 1 exit status
make[1]: *** [amdd] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-backup/amanda-2.5.2_p1-r3/work/amanda-2.5.2p1/tape-src'
make: *** [all-recursive] Error 1
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-18 04:35:25 UTC
2.6.0* has this fixed properly use that.