Bug 59298 - Configure fails to find libpthread with CPPFLAG -H
Summary: Configure fails to find libpthread with CPPFLAG -H
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.14
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-12 22:19 UTC by Peter Dyballa
Modified: 2018-08-25 13:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Dyballa 2013-01-12 22:19:59 UTC
Hello!

When configuring with

	env LANG=C PATH=${HOME}/Softwaren64/bin:/usr/bin:/opt/local/x86_64-apple-darwin10.8.0/bin:/opt/local/bin:$PATH ./configure --prefix=${HOME}/Softwaren64 --with-pic --enable-static --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib CPPFLAGS="-I${HOME}/Softwaren64/include -idirafter /usr/X11/include -DCAIRO_NO_MUTEX=1" CFLAGS="-pipe -fPIC -fno-common -Os -march=core2 -mtune=core2 -m64 -fomit-frame-pointer -msse4.2" LDFLAGS="-m64 -Wl,-dead_strip_dylibs -L${HOME}/Softwaren64/lib" PKG_CONFIG_PATH=${HOME}/Softwaren64/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/X11/lib/pkgconfig

configure is more successful than when configuring with "verbose" compiler flags (-H and -Wl,-t):

	env LANG=C PATH=${HOME}/Softwaren64/bin:/usr/bin:/opt/local/x86_64-apple-darwin10.8.0/bin:/opt/local/bin:$PATH ./configure --prefix=${HOME}/Softwaren64 --with-pic --enable-static --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib CPPFLAGS="-H -I${HOME}/Softwaren64/include -idirafter /usr/X11/include -DCAIRO_NO_MUTEX=1" CFLAGS="-pipe -fPIC -fno-common -Os -march=core2 -mtune=core2 -m64 -fomit-frame-pointer -msse4.2" LDFLAGS="-m64 -Wl,-t -Wl,-dead_strip_dylibs -L${HOME}/Softwaren64/lib" PKG_CONFIG_PATH=${HOME}/Softwaren64/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/X11/lib/pkgconfig

	checking for cairo's pthread feature... 
	checking whether cairo's pthread feature could be enabled... yes

	checking for cairo's cairo-trace feature... 
	checking whether cairo's cairo-trace feature could be enabled... yes

	The following features and utilities:
	  cairo-trace:                yes
	  cairo-script-interpreter:   yes
	
	And the following internal features:
	  pthread:       yes
	  gtk-doc:       no
	  gcov support:  no
	  symbol-lookup: no (requires bfd)
	  test surfaces: no (disabled, use --enable-test-surfaces to enable)
	  ps testing:    yes
	  pdf testing:   no (requires poppler-glib >= 0.17.4)
	  svg testing:   yes

vs.

	checking for cairo's pthread feature... 
	checking whether cairo's pthread feature could be enabled... no (can't link with -lpthread or -pthread)

	checking for cairo's cairo-trace feature... 
	checking whether cairo's cairo-trace feature could be enabled... no (requires dynamic linker and zlib and real pthreads)

	The following features and utilities:
	  cairo-trace:                no (requires dynamic linker and zlib and real pthreads)
	  cairo-script-interpreter:   yes
	
	And the following internal features:
	  pthread:       no (can't link with -lpthread or -pthread)
	  gtk-doc:       no
	  gcov support:  no
	  symbol-lookup: no (requires bfd)
	  test surfaces: no (disabled, use --enable-test-surfaces to enable)
	  ps testing:    yes
	  pdf testing:   no (requires poppler-glib >= 0.17.4)
	  svg testing:   yes

I need -H and -Wl,-t to be sure that Cairo is built only from the selected components.
Comment 1 Daniel Macks 2016-03-07 04:06:23 UTC
This appears to be a general bug in the pthread test. The CAIRO_CHECK_PTHREAD macro uses CAIRO_CC_TRY_LINK_WITH_ENV_SILENT for the actual tests for compileability with various flags. There, "The link step must complete without
dnl warnings or errors to stderr." But using various flags that the user could want to use might legitimately trigger unrelated compiler diagnostic output, which incorrectly is treated as a failure/unsupported pthread flag.
Comment 2 Daniel Macks 2016-03-07 04:08:33 UTC
Reported as a visible downstream bug even without specifying any flags due to the default behavior of an OS X compiler. See: https://sourceforge.net/p/fink/package-submissions/4614/
Comment 3 Behdad Esfahbod 2016-03-07 19:21:42 UTC
Yes, this is really painful.  We should investigate whether we can replace our custom pthread detection with AX_PTHREAD.
Comment 4 GitLab Migration User 2018-08-25 13:51:10 UTC
-- 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/231.


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.