Building ports with gcc46

Greg Larkin glarkin at FreeBSD.org
Thu Dec 15 21:06:58 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/14/11 9:35 PM, Ali Mashtizadeh wrote:
> That gives the same error as the one of my previous attempts. Any help
> with this would be great.
> 
> libtool: link: g++46 -D_THREAD_SAFE -pthread -Wall -Wwrite-strings
> -Woverloaded-virtual -Wno-sign-compare -O2 -pipe
> -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -D_THREAD_SAFE
> -pthread -Wl,-rpath=/usr/local/lib/gcc46 -o .libs/protoc main.o
> ./.libs/libprotobuf.so ./.libs/libprotoc.so
> /usr/ports/devel/protobuf/work/protobuf-2.4.1/src/.libs/libprotobuf.so
> -lz -pthread -Wl,-rpath -Wl,/usr/local/lib/usr/local/bin/ld:
> .libs/protoc: hidden symbol `__dso_handle' in
> /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/crtbegin.o is
> referenced by DSO/usr/local/bin/ld: final link failed: Bad
> valuecollect2: ld returned 1 exit statusgmake[2]: *** [protoc] Error
> 1gmake[2]: Leaving directory
> `/usr/ports/devel/protobuf/work/protobuf-2.4.1/src'gmake[1]: ***
> [all-recursive] Error 1gmake[1]: Leaving directory
> `/usr/ports/devel/protobuf/work/protobuf-2.4.1'gmake: *** [all] Error
> 2*** Error code 1
> Stop in /usr/ports/devel/protobuf.

Hi Ali,

I was able to successfully link protoc by hand by building main.o with
- -fPIC and making sure that the -shared flag was used to compile all
source files.

Unfortunately, the executable core dumps immediately, and there's no
useful stack frame in gdb.  I'll have to defer to GCC experts at this point.

Best of luck,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/cpucycle/      - Follow you, follow me
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7qYW4ACgkQ0sRouByUApBCYACfUZCbqge2dP/PcQLq7xMyL83b
g/AAoK1ZikafAsPfdvs6eBoSk4vTMS7R
=eOnI
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list