Re: libdispatch don't build on 8.2-RELEASE amd64
On 2011-03-02 16:40, Kostik Belousov wrote: Rather, it is binutils 2.15 silently creating broken library. 2.21 refuses to do it. Some object used to create the final dso was not built with -fPIC. This is actually a problem of clang, in combination with libdispatch's configure script. It tries to detect support for __private_extern__, which is an Apple extension that serves the same goal on Darwin as the visibility("hidden") attribute. If the test program does not compile, it just defines __private_extern__ as visibility("hidden") instead, if the toolchain supports that attribute. However, clang has a problem that it accepts the __private_extern__ attribute even on non-Darwin OSes, while *not* marking the symbol hidden. This will lead to the link error you are seeing here. Can you please try the attached patch, which is a bit of a hack, but works for now? Meanwhile, I'll prod the clang developers to disable recognition of __private_extern__ on non-Darwin platforms. Index: devel/libdispatch/Makefile === RCS file: /home/mirror/ncvs/ports/devel/libdispatch/Makefile,v retrieving revision 1.10 diff -u -r1.10 Makefile --- devel/libdispatch/Makefile 15 Dec 2009 21:06:37 - 1.10 +++ devel/libdispatch/Makefile 2 Mar 2011 20:26:28 - @@ -86,8 +86,7 @@ RUN_DEPENDS+= clang:${PORTSDIR}/devel/llvm-devel \ ${LOCALBASE}/lib/libBlocksRuntime.so:${PORTSDIR}/devel/compiler-rt CONFIGURE_ARGS+= --with-blocks-runtime=/usr/local/lib -CONFIGURE_ENV+=CC="clang" -MAKE_ENV+= CC="clang" +CONFIGURE_ENV+=CC="clang" dispatch_cv_private_extern="no" .endif .include ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: libdispatch don't build on 8.2-RELEASE amd64
On Wed, Mar 02, 2011 at 12:19:01PM -0300, Danilo Egea wrote: > The problem is the binutils version, the port try to use the > binutils-2.21. With the binutils-2.15 (native of the system) works fine. Rather, it is binutils 2.15 silently creating broken library. 2.21 refuses to do it. Some object used to create the final dso was not built with -fPIC. > > On 2/27/11 2:37 PM, Danilo Egea wrote: > >Worked with GCC, but support blocks is disabled... :( > > > >On 2/27/11 1:42 AM, Danilo Egea wrote: > >>Hi guys, > >> > >>Anyone know what's going on? > >> > >>PS: with clang-devel > >> > >>libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. > >>-fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -fPIC > >>-DPIC -o .libs/time.o > >>libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. > >>-fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -o > >>time.o >/dev/null 2>&1 > >>mv -f .deps/time.Tpo .deps/time.Plo > >>/bin/sh ../libtool --tag=CC--mode=link clang -fPIC-o > >>libshims.la mach.lo time.lo -lpthread -L/usr/local/lib > >>-lBlocksRuntime > >>libtool: link: ar cru .libs/libshims.a .libs/mach.o .libs/time.o > >>libtool: link: ranlib .libs/libshims.a > >>libtool: link: ( cd ".libs" && rm -f "libshims.la" && ln -s > >>"../libshims.la" "libshims.la" ) > >>/bin/sh ../libtool --tag=CC--mode=link clang -Wall -fblocks > >>-fPIC -o libdispatch.la -rpath /usr/local/lib > >>libdispatch_la-apply.lo libdispatch_la-benchmark.lo > >>libdispatch_la-object.lo libdispatch_la-once.lo > >>libdispatch_la-queue.lo libdispatch_la-queue_kevent.lo > >>libdispatch_la-semaphore.lo libdispatch_la-source.lo > >>libdispatch_la-source_kevent.lo libdispatch_la-time.lo > >>libshims.la -lpthread -L/usr/local/lib -lBlocksRuntime > >>libtool: link: clang -shared .libs/libdispatch_la-apply.o > >>.libs/libdispatch_la-benchmark.o .libs/libdispatch_la-object.o > >>.libs/libdispatch_la-once.o .libs/libdispatch_la-queue.o > >>.libs/libdispatch_la-queue_kevent.o .libs/libdispatch_la-semaphore.o > >>.libs/libdispatch_la-source.o .libs/libdispatch_la-source_kevent.o > >>.libs/libdispatch_la-time.o -Wl,--whole-archive ./.libs/libshims.a > >>-Wl,--no-whole-archive -L/usr/local/lib -lpthread -lBlocksRuntime > >>-Wl,-soname -Wl,libdispatch.so.0 -o .libs/libdispatch.so.0 > >>/usr/local/bin/ld: .libs/libdispatch_la-apply.o: relocation > >>R_X86_64_PC32 against symbol `_dispatch_hw_config' can not be used > >>when making a shared object; recompile with -fPIC > >>/usr/local/bin/ld: final link failed: Bad value > >>clang: error: linker command failed with exit code 1 (use -v to see > >>invocation) > >>*** Error code 1 > >> > >>Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. > >>*** Error code 1 > >> > >>Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. > >>*** Error code 1 > >> > >>Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174. > >>*** Error code 1 > >> > >>Stop in /usr/ports/devel/libdispatch. > >>*** Error code 1 > >> > >>Stop in /usr/ports/devel/libdispatch. > >> > > > > > > > -- > Danilo Eg?a Gondolfo > http://daniloegea.wordpress.com > > __ > Fale com seus amigos de gra?a com o novo Yahoo! Messenger > http://br.messenger.yahoo.com/ > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org" pgpLtps2kgy7Z.pgp Description: PGP signature
Re: libdispatch don't build on 8.2-RELEASE amd64
The problem is the binutils version, the port try to use the binutils-2.21. With the binutils-2.15 (native of the system) works fine. On 2/27/11 2:37 PM, Danilo Egea wrote: Worked with GCC, but support blocks is disabled... :( On 2/27/11 1:42 AM, Danilo Egea wrote: Hi guys, Anyone know what's going on? PS: with clang-devel libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -fPIC -DPIC -o .libs/time.o libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -o time.o >/dev/null 2>&1 mv -f .deps/time.Tpo .deps/time.Plo /bin/sh ../libtool --tag=CC--mode=link clang -fPIC-o libshims.la mach.lo time.lo -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: ar cru .libs/libshims.a .libs/mach.o .libs/time.o libtool: link: ranlib .libs/libshims.a libtool: link: ( cd ".libs" && rm -f "libshims.la" && ln -s "../libshims.la" "libshims.la" ) /bin/sh ../libtool --tag=CC--mode=link clang -Wall -fblocks -fPIC -o libdispatch.la -rpath /usr/local/lib libdispatch_la-apply.lo libdispatch_la-benchmark.lo libdispatch_la-object.lo libdispatch_la-once.lo libdispatch_la-queue.lo libdispatch_la-queue_kevent.lo libdispatch_la-semaphore.lo libdispatch_la-source.lo libdispatch_la-source_kevent.lo libdispatch_la-time.lo libshims.la -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: clang -shared .libs/libdispatch_la-apply.o .libs/libdispatch_la-benchmark.o .libs/libdispatch_la-object.o .libs/libdispatch_la-once.o .libs/libdispatch_la-queue.o .libs/libdispatch_la-queue_kevent.o .libs/libdispatch_la-semaphore.o .libs/libdispatch_la-source.o .libs/libdispatch_la-source_kevent.o .libs/libdispatch_la-time.o -Wl,--whole-archive ./.libs/libshims.a -Wl,--no-whole-archive -L/usr/local/lib -lpthread -lBlocksRuntime -Wl,-soname -Wl,libdispatch.so.0 -o .libs/libdispatch.so.0 /usr/local/bin/ld: .libs/libdispatch_la-apply.o: relocation R_X86_64_PC32 against symbol `_dispatch_hw_config' can not be used when making a shared object; recompile with -fPIC /usr/local/bin/ld: final link failed: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174. *** Error code 1 Stop in /usr/ports/devel/libdispatch. *** Error code 1 Stop in /usr/ports/devel/libdispatch. -- Danilo Egêa Gondolfo http://daniloegea.wordpress.com __ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: libdispatch don't build on 8.2-RELEASE amd64
Worked with GCC, but support blocks is disabled... :( On 2/27/11 1:42 AM, Danilo Egea wrote: Hi guys, Anyone know what's going on? PS: with clang-devel libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -fPIC -DPIC -o .libs/time.o libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -o time.o >/dev/null 2>&1 mv -f .deps/time.Tpo .deps/time.Plo /bin/sh ../libtool --tag=CC--mode=link clang -fPIC-o libshims.la mach.lo time.lo -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: ar cru .libs/libshims.a .libs/mach.o .libs/time.o libtool: link: ranlib .libs/libshims.a libtool: link: ( cd ".libs" && rm -f "libshims.la" && ln -s "../libshims.la" "libshims.la" ) /bin/sh ../libtool --tag=CC--mode=link clang -Wall -fblocks -fPIC -o libdispatch.la -rpath /usr/local/lib libdispatch_la-apply.lo libdispatch_la-benchmark.lo libdispatch_la-object.lo libdispatch_la-once.lo libdispatch_la-queue.lo libdispatch_la-queue_kevent.lo libdispatch_la-semaphore.lo libdispatch_la-source.lo libdispatch_la-source_kevent.lo libdispatch_la-time.lo libshims.la -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: clang -shared .libs/libdispatch_la-apply.o .libs/libdispatch_la-benchmark.o .libs/libdispatch_la-object.o .libs/libdispatch_la-once.o .libs/libdispatch_la-queue.o .libs/libdispatch_la-queue_kevent.o .libs/libdispatch_la-semaphore.o .libs/libdispatch_la-source.o .libs/libdispatch_la-source_kevent.o .libs/libdispatch_la-time.o -Wl,--whole-archive ./.libs/libshims.a -Wl,--no-whole-archive -L/usr/local/lib -lpthread -lBlocksRuntime -Wl,-soname -Wl,libdispatch.so.0 -o .libs/libdispatch.so.0 /usr/local/bin/ld: .libs/libdispatch_la-apply.o: relocation R_X86_64_PC32 against symbol `_dispatch_hw_config' can not be used when making a shared object; recompile with -fPIC /usr/local/bin/ld: final link failed: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174. *** Error code 1 Stop in /usr/ports/devel/libdispatch. *** Error code 1 Stop in /usr/ports/devel/libdispatch. -- Danilo Egêa Gondolfo http://daniloegea.wordpress.com __ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
libdispatch don't build on 8.2-RELEASE amd64
Hi guys, Anyone know what's going on? PS: with clang-devel libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -fPIC -DPIC -o .libs/time.o libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -fPIC -MT time.lo -MD -MP -MF .deps/time.Tpo -c shims/time.c -o time.o >/dev/null 2>&1 mv -f .deps/time.Tpo .deps/time.Plo /bin/sh ../libtool --tag=CC--mode=link clang -fPIC-o libshims.la mach.lo time.lo -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: ar cru .libs/libshims.a .libs/mach.o .libs/time.o libtool: link: ranlib .libs/libshims.a libtool: link: ( cd ".libs" && rm -f "libshims.la" && ln -s "../libshims.la" "libshims.la" ) /bin/sh ../libtool --tag=CC--mode=link clang -Wall -fblocks -fPIC -o libdispatch.la -rpath /usr/local/lib libdispatch_la-apply.lo libdispatch_la-benchmark.lo libdispatch_la-object.lo libdispatch_la-once.lo libdispatch_la-queue.lo libdispatch_la-queue_kevent.lo libdispatch_la-semaphore.lo libdispatch_la-source.lo libdispatch_la-source_kevent.lo libdispatch_la-time.lo libshims.la -lpthread -L/usr/local/lib -lBlocksRuntime libtool: link: clang -shared .libs/libdispatch_la-apply.o .libs/libdispatch_la-benchmark.o .libs/libdispatch_la-object.o .libs/libdispatch_la-once.o .libs/libdispatch_la-queue.o .libs/libdispatch_la-queue_kevent.o .libs/libdispatch_la-semaphore.o .libs/libdispatch_la-source.o .libs/libdispatch_la-source_kevent.o .libs/libdispatch_la-time.o -Wl,--whole-archive ./.libs/libshims.a -Wl,--no-whole-archive -L/usr/local/lib -lpthread -lBlocksRuntime -Wl,-soname -Wl,libdispatch.so.0 -o .libs/libdispatch.so.0 /usr/local/bin/ld: .libs/libdispatch_la-apply.o: relocation R_X86_64_PC32 against symbol `_dispatch_hw_config' can not be used when making a shared object; recompile with -fPIC /usr/local/bin/ld: final link failed: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174/src. *** Error code 1 Stop in /usr/ports/devel/libdispatch/work/libdispatch-r174. *** Error code 1 Stop in /usr/ports/devel/libdispatch. *** Error code 1 Stop in /usr/ports/devel/libdispatch. -- Danilo Egêa Gondolfo http://daniloegea.wordpress.com ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"