Re: Building and using shared libraries using gccgo
- To: Matthias Klose <doko@debian.org>, debian-devel@lists.debian.org
- Subject: Re: Building and using shared libraries using gccgo
- From: Michael Stapelberg <stapelberg@debian.org>
- Date: Mon, 04 Feb 2013 23:36:40 +0100
- Message-id: <[🔎] x6k3qnln9j.fsf@midna.zekjur.net>
- In-reply-to: <510A72D6.30505@debian.org>
- References: <x6k3qyo2z4.fsf@midna.zekjur.net> <87ham0rk3p.fsf@msgid.hilluzination.de> <x6boc8o3gt.fsf@midna.zekjur.net> <87sj5iaj9e.fsf@msgid.hilluzination.de> <x6txpyn2p9.fsf@midna.zekjur.net> <87ip6d4l1p.fsf_-_@msgid.hilluzination.de> <510A72D6.30505@debian.org>
Hi Matthias,
Matthias Klose <doko@debian.org> writes:
> Am 31.01.2013 13:02, schrieb Hilko Bengen:
>> 2. -fno-split-stack
>> Otherwise I could not link executables and got the following error
>> message:
>> /usr/bin/ld.bfd.real: cindex: hidden symbol `__morestack' in
>> /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a/morestack.o) is referenced
>> by DSO
>> /usr/bin/ld.bfd.real: final link failed: Bad value
>
> better use -fuse-ld=ld.gold, or in a packaging context, build-depend on
> binutils-gold. gold should be available on all archs where gccgo is available.
This doesn’t work unfortunately:
1. -fuse-ld=ld.gold results in:
gccgo: error: unrecognized command line option ‘-fuse-ld=ld.gold’
This is with gccgo 4:4.7.2-1 (current Debian testing)
2. Installing binutils-gold doesn’t help either. When calling
gccgo -Wl,-debug -I /tmp/godyn/src -shared -fPIC -o /tmp/build/libsparse.so ./set.go
I get:
ld_file_name = /usr/bin/ld
c_file_name = /usr/bin/gccgo
nm_file_name = /usr/bin/nm
strip_file_name = /usr/bin/strip
c_file = /tmp/ccks2q2o.c
o_file = /tmp/ccjfIMxS.o
COLLECT_GCC_OPTIONS = '-fsplit-stack' '-I' '/tmp/godyn/src' '-shared' '-fPIC' '-o' '/tmp/build/libsparse.so' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
COLLECT_GCC = gccgo
COMPILER_PATH = /usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH = /usr/lib/gcc/x86_64-linux-gnu/4.7/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../:/lib/:/usr/lib/
/usr/bin/ld --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -m elf_x86_64 --hash-style=both -shared -o /tmp/build/libsparse.so /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. /tmp/ccRsBUuQ.o -lgobegin -lgo -lm --wrap=pthread_create -lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.7/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
/usr/bin/ld.gold.real: error: /tmp/ccRsBUuQ.o: could not convert call to '__morestack' to '__morestack_non_split'
collect2: error: ld returned 1 exit status
[Leaving /tmp/ccks2q2o.c]
[Leaving /tmp/ccjfIMxS.o]
[Leaving /tmp/ccC2k82l.ld]
[Leaving /tmp/ccP48tyP.le]
[Leaving /tmp/build/libsparse.so]
--
Best regards,
Michael
Reply to: