Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536442 - dev-embedded/gpsim - ld: -warn-once: unknown option
Summary: dev-embedded/gpsim - ld: -warn-once: unknown option
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gold-tracker
  Show dependency tree
 
Reported: 2015-01-13 07:58 UTC by cmuelle8
Modified: 2019-03-15 18:38 UTC (History)
2 users (show)

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


Attachments
gpsim-0.26.1.ebuild.patch (patch,863 bytes, patch)
2015-11-26 17:13 UTC, Ian Stakenvicius (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cmuelle8 2015-01-13 07:58:50 UTC
SYMPTOM:
libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/hash.o .libs/parse.o .libs/misc.o .libs/eXdbm.o   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lfontconfig -lfreetype -lgthread-2.0 -lglib-2.0 -lpopt  -march=native -O2 -mfpmath=sse -flto=4 -fuse-linker-plugin -march=native -O2 -mfpmath=sse -flto=4 -fuse-linker-plugin -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,-warn-common -Wl,-warn-once -pthread   -pthread -Wl,-soname -Wl,libgpsim_eXdbm.so.0 -o .libs/libgpsim_eXdbm.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../x86_64-pc-linux-gnu/bin/ld: -warn-once: unknown option
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/../../../../x86_64-pc-linux-gnu/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
Makefile:417: recipe for target 'libgpsim_eXdbm.la' failed
make[2]: *** [libgpsim_eXdbm.la] Error 1
make[2]: Leaving directory '/var/tmp/paludis/dev-embedded-gpsim-0.27.0/work/gpsim-0.27.0/eXdbm'
Makefile:432: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/paludis/dev-embedded-gpsim-0.27.0/work/gpsim-0.27.0'
Makefile:361: recipe for target 'all' failed
make: *** [all] Error 2

CURE: add to the ebuild..
src_prepare() {
       sed -i -e 's/-Wl,-warn-once//g' configure*
}

For the same reason the referenced bug for gputils (see 'see also' field) fails.

Reproducible: Always
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2015-11-26 15:45:08 UTC
I'm seeing this too, when I'm using gold instead of ld.bfd.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2015-11-26 17:13:08 UTC
Created attachment 417956 [details, diff]
gpsim-0.26.1.ebuild.patch

So dropping the flag gets past this error, but there are other issues when linking with ld.gold that are frankly going to take too long for me to sort out.

Just forcing ld.bfd in the ebuild however doesn't suffice either, as -Wl,-warn-once is still rejected by CCLD when ld.gold is the system linker.

However, doing both allows the build to finish fine.  Patch to gpsim-0.26.1.ebuild is attached.
Comment 3 SpanKY gentoo-dev 2015-11-28 20:34:15 UTC
Comment on attachment 417956 [details, diff]
gpsim-0.26.1.ebuild.patch

> DOCS="ANNOUNCE AUTHORS ChangeLog HISTORY PROCESSORS README README.MODULES TODO"
> 
>+
> src_prepare() {

drop the spurious newline

>+	sed -i '/AM_LDFLAGS/s/ -Wl,-warn-once//' \
>+		"${S}"/configure.ac || die

the "${S}" is redundant

> src_configure() {
>+	tc-ld-disable-gold
>+	LD="$(tc-getLD)" LDFLAGS="${LDFLAGS}" \

it's not clear why you need to pass LD or LDFLAGS explicitly.  configure should already do the right thing wrt both.
Comment 4 Xavier Miller (RETIRED) gentoo-dev 2017-08-11 11:13:16 UTC
Hello,

same problem with dev-embedded/gputils-1.5.0
Comment 5 Xavier Miller (RETIRED) gentoo-dev 2017-08-11 11:33:13 UTC
patching configure file of gputils works for me
Comment 6 Petross404(Petros S) 2019-03-15 18:38:21 UTC
(In reply to Xavier Miller from comment #5)
> patching configure file of gputils works for me

Any news on this? It's still failing.