cairo assumes that pthreads are not available, then it fails to build: ./configure --prefix=/opt/X11 --disable-static --disable-dependency-tracking --disable-nls --cache-file=/tmp/X11libs.roots/X11libs~obj/configure.cache --x-include=$X11_PREFIX/include --x-lib=$X11_PREFIX/lib --disable-quartz --enable-xlib --enable-xlib-xrender --enable-xcb --disable-specs --disable-devel-docs ... config.log shows that the conftest.c tests succeeded, but you still chose to configure:32573: checking for cairo's pthread featureconfigure:32685: gcc -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/pixman-1 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/libpng14 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include -o conftest -D_REENTRANT -D__DEBUG__ -D_FORTIFY_SOURCE=2 -pipe -L/tmp/X11libs.roots/X11libs~dst/opt/X11/lib conftest.c -lpthread >&5 [Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib [Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib [Logging for XBS] Used indirect dynamic library: /usr/lib/system/libmathCommon.A.dylib configure:32685: $? = 0configure:32804: gcc -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/pixman-1 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/libpng14 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include -o conftest -pthread -D__DEBUG__ -D_FORTIFY_SOURCE=2 -pipe -L /tmp/X11libs.roots/X11libs~dst/opt/X11/lib conftest.c >&5 [Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib [Logging for XBS] Used indirect dynamic library: /usr/lib/system/libmathCommon.A.dylib configure:32804: $? = 0configure:32885: gcc -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/pixman-1 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include/libpng14 -I/tmp/X11libs.roots/X11libs~dst/opt/X11/include -o conftest -D_REENTRANT -D__DEBUG__ -D_FORTIFY_SOURCE=2 -pipe -L/tmp/X11libs.roots/X11libs~dst/opt/X11/lib conftest.c >&5 [Logging for XBS] Used dynamic library: /usr/lib/libSystem.B.dylib [Logging for XBS] Used indirect dynamic library: /usr/lib/system/libmathCommon.A.dylib configure:32885: $? = 0 configure:32951: checking whether cairo's pthread feature could be enabled configure:32955: result: no (can't link with -lpthread or -pthread) Passing --enable-pthread to force it on fails: checking for cairo's pthread feature... configure: error: pthread requested but not found returned code 1 at ./build line 21.
I believe the problem is this hunk in CAIRO_CC_TRY_LINK_WITH_ENV_SILENT in build/aclocal.cairo.m4 if test "x$cairo_cc_stderr" != "x"; then cairo_cc_flag=no fi
Yep. A simple bypass of that check gets us building right: gsed -i 's:test "x$cairo_cc_stderr" != "x":false:' configures What's the reasoning behind checking stderr? Perhaps there is a better way to achieve those ends...
*** Bug 33417 has been marked as a duplicate of this bug. ***
I just want to say that this bug makes it impossible to build on osx with 10.4u SDK because ld always gives a warning about an object compiled with -mlong-branch which is no longer needed. Configure really needs to ignore these warnings. Editing configure as mentioned fixes the problem.
I attempted to repro the problem on ubuntu 14.04, with these steps: sudo mkdir /usr/lib/x86_64-linux-gnu/tmp sudo mv /usr/lib/x86_64-linux-gnu/libpthread* /usr/lib/x86_64-linux-gnu/tmp/ ./configure --disable-static --disable-dependency-tracking --disable-nls --disable-quartz --enable-xlib --enable-xlib-xrender --enable-xcb --disable-specs --disable-devel-docs --disable-pthread Yet this results in a successful config (I didn't try to build it). If I change to --enable-pthread, it fails to build (obviously), but then: sudo mv /usr/lib/x86_64-linux-gnu/tmp/* /usr/lib/x86_64-linux-gnu/ sudo rmdir /usr/lib/x86_64-linux-gnu/tmp ./configure --disable-static --disable-dependency-tracking --disable-nls --disable-quartz --enable-xlib --enable-xlib-xrender --enable-xcb --disable-specs --disable-devel-docs --disable-pthread Is this still an issue on OSX? If so, anyone want to propose a patch?
Yes, it is still an issue. We just disable the buggy '"x$cairo_cc_stderr" != "x"' logic, but that's not really a portable solution for you: diff -Naurp cairo-1.12.2.orig/configure cairo-1.12.2/configure --- cairo-1.12.2.orig/configure 2012-04-29 11:49:59.000000000 -0700 +++ cairo-1.12.2/configure 2012-05-03 11:23:49.000000000 -0700 @@ -18044,7 +18044,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -18091,7 +18091,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -18161,7 +18161,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -18217,7 +18217,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -19663,7 +19663,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -19710,7 +19710,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -32692,7 +32692,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi @@ -32811,7 +32811,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false ; then cairo_cc_flag=no fi @@ -32892,7 +32892,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "x$cairo_cc_stderr" != "x"; then + if false; then cairo_cc_flag=no fi
Occurs when -Wl,--build-id is in LDFLAGS.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/121.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.