Re: libtool 1.5.26: OpenBSD and -pthread
Hello Vincent, * Vincent Torri wrote on Mon, Dec 28, 2009 at 07:34:09PM CET: When passing -pthread to my_lib_LDFLAGS and my_lib_CFLAGS in Makefile.am, on OpenBSD (libtool 1.5.26), the linker does not have -lpthread, but just -pthread : Does it help to use the ACX_PTHREAD macro from the Autoconf Macro Archive, including the variables that it sets? If GCC documents that -pthread is sufficient to pass at both compile and at link time, and you observe that it is not on your system, then that is a GCC bug which you should report to the GCC bugzilla. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: libtool 1.5.26: OpenBSD and -pthread
On Tue, 29 Dec 2009, Vincent Torri wrote: Is -pthread not sufficient to do everything needed? Notice that this is GCC and not just the linker. GCC is expected to respond to -pthread. if we just pass -pthread, then a binary using the library gives, for example, the error: tig$ eet eet:/usr/local/lib/eina/mp/eina_chained_mempool.so: undefined symbol 'pthread_mutex_unlock' Is -pthread also applied when the binary is built, or has it been lost? If you compile a trivial hello-world type program with '-v -pthread', does the output show that an alternate libc or a threads library is being used? Unfortunately, support for -pthread or -pthreads in GCC is platform specific since it is intended to emulate what the platform's native compiler (if it has one) does. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: libtool 1.5.26: OpenBSD and -pthread
On Tue, 29 Dec 2009, Bob Friesenhahn wrote: tig$ eet eet:/usr/local/lib/eina/mp/eina_chained_mempool.so: undefined symbol 'pthread_mutex_unlock' Is -pthread also applied when the binary is built, or has it been lost? -pthread should also be passed to any binary that uses a lib using pthread, even if the binary itself does not use pthread directly ? If you compile a trivial hello-world type program with '-v -pthread', does the output show that an alternate libc or a threads library is being used? I'll ask the guy who reported the problem Thank you Vincent Torri ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: libtool 1.5.26: OpenBSD and -pthread
On Tue, 29 Dec 2009, Vincent Torri wrote: On Tue, 29 Dec 2009, Bob Friesenhahn wrote: tig$ eet eet:/usr/local/lib/eina/mp/eina_chained_mempool.so: undefined symbol 'pthread_mutex_unlock' Is -pthread also applied when the binary is built, or has it been lost? -pthread should also be passed to any binary that uses a lib using pthread, even if the binary itself does not use pthread directly ? Yes. Otherwise the built program may not work, even if thread APIs are still available. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool
libtool 1.5.26: OpenBSD and -pthread
Hey, When passing -pthread to my_lib_LDFLAGS and my_lib_CFLAGS in Makefile.am, on OpenBSD (libtool 1.5.26), the linker does not have -lpthread, but just -pthread : gcc -shared -fPIC -DPIC -o .libs/libeina-ver-pre-svn-05.so.9.9 .libs/libeina_la-eina_error.o .libs/libeina_la-eina_log.o .libs/libeina_la-eina_hash.o .libs/libeina_la-eina_lalloc.o .libs/libeina_la-eina_inlist.o .libs/libeina_la-eina_file.o .libs/libeina_la-eina_mempool.o .libs/libeina_la-eina_list.o .libs/libeina_la-eina_matrixsparse.o .libs/libeina_la-eina_module.o .libs/libeina_la-eina_value.o .libs/libeina_la-eina_array.o .libs/libeina_la-eina_magic.o .libs/libeina_la-eina_main.o .libs/libeina_la-eina_counter.o .libs/libeina_la-eina_iterator.o .libs/libeina_la-eina_accessor.o .libs/libeina_la-eina_convert.o .libs/libeina_la-eina_fp.o .libs/libeina_la-eina_rbtree.o .libs/libeina_la-eina_benchmark.o .libs/libeina_la-eina_rectangle.o .libs/libeina_la-eina_stringshare.o .libs/libeina_la-eina_cpu.o .libs/libeina_la-eina_tiler.o .libs/libeina_la-eina_hamster.o .libs/libeina_la-eina_safety_checks.o -L/usr/local/lib -lintl -liconv -L/usr/X11R6/lib -L/lib -lm -march=prescott -msse -msse2 -msse3 -pthread -pthread Is there a known problem with OpenBSD and -pthread, using libtool 1.5.26 ? thank you Vincent Torri ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: libtool 1.5.26: OpenBSD and -pthread
On Mon, 28 Dec 2009, Vincent Torri wrote: When passing -pthread to my_lib_LDFLAGS and my_lib_CFLAGS in Makefile.am, on OpenBSD (libtool 1.5.26), the linker does not have -lpthread, but just -pthread : Is -pthread not sufficient to do everything needed? Notice that this is GCC and not just the linker. GCC is expected to respond to -pthread. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: libtool 1.5.26: OpenBSD and -pthread
On Mon, 28 Dec 2009, Bob Friesenhahn wrote: On Mon, 28 Dec 2009, Vincent Torri wrote: When passing -pthread to my_lib_LDFLAGS and my_lib_CFLAGS in Makefile.am, on OpenBSD (libtool 1.5.26), the linker does not have -lpthread, but just -pthread : Is -pthread not sufficient to do everything needed? Notice that this is GCC and not just the linker. GCC is expected to respond to -pthread. if we just pass -pthread, then a binary using the library gives, for example, the error: tig$ eet eet:/usr/local/lib/eina/mp/eina_chained_mempool.so: undefined symbol 'pthread_mutex_unlock' Vincent Torri ___ http://lists.gnu.org/mailman/listinfo/libtool