Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579190 - x11-libs/cairo-1.14.6 "no mutex implementation found"
Summary: x11-libs/cairo-1.14.6 "no mutex implementation found"
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-06 23:10 UTC by Robin Johnson
Modified: 2018-11-27 22:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (x11-libs:cairo-1.14.6:20160406-223900.log,102.03 KB, text/plain)
2016-04-06 23:10 UTC, Robin Johnson
Details
cairo-1.14.6-abi_x86_32.x86/config.log (config.log,161.97 KB, text/x-log)
2016-04-06 23:11 UTC, Robin Johnson
Details
cairo-1.14.6-abi_x86_64.amd64/config.log (config.log,159.59 KB, text/plain)
2016-04-06 23:12 UTC, Robin Johnson
Details
cairo-1.14.6-macos.patch (cairo-1.14.6-macos.patch,407 bytes, patch)
2016-12-06 17:11 UTC, Guilherme Amadio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-06 23:10:58 UTC
Created attachment 429794 [details]
build log

libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -DHAVE_CONFIG_H -I. -I/dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src -I.. -I/dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libdrm -I/usr/include/libpng16 -march=native -O2 -pipe -frecord-gcc-switches -c /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-base85-stream.c  -fPIC -DPIC -o .libs/cairo-base85-stream.o
In file included from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-mutex-type-private.h:45:0,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-scaled-font-private.h:45,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairoint.h:422,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-atomic.c:34:
/dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-mutex-impl-private.h:262:3: error: #error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.  Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support." 
 # error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.  Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
   ^
In file included from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-mutex-type-private.h:45:0,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-scaled-font-private.h:45,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairoint.h:422,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-atomic.c:34:
/dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-mutex-impl-private.h:271:11: error: unknown type name ‘cairo_mutex_impl_t’
   typedef cairo_mutex_impl_t cairo_recursive_mutex_impl_t;
           ^
In file included from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-scaled-font-private.h:45:0,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairoint.h:422,
                 from /dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-atomic.c:34:
/dev/shm/portage/x11-libs/cairo-1.14.6/work/cairo-1.14.6/src/cairo-mutex-type-private.h:49:3: error: #error "CAIRO_MUTEX_IMPL_LOCK not defined.  Check cairo-mutex-impl-private.h."
 # error "CAIRO_MUTEX_IMPL_LOCK not defined.  Check cairo-mutex-impl-private.h."
   ^
Portage 2.2.28 (python 2.7.10-final-0, default/linux/amd64/13.0/developer, gcc-4.9.2, glibc-2.22-r2, 4.5.0-rc6-00141-g6794402 x86_64)
=================================================================
System uname: Linux-4.5.0-rc6-00141-g6794402-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    32913372 total,   5137064 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 10 Feb 2016 16:00:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.20.1-r4::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          9999::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r2::gentoo, 1.5-r2::gentoo, 1.6.3-r2::gentoo, 1.7.9-r3::gentoo, 1.8.5-r5::gentoo, 1.9.6-r4::gentoo, 1.10.3-r2::gentoo, 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.2::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r2::gentoo
Repositories:

gentoo
    location: /code/gentoo/gentoo-git/repo/gentoo
    sync-type: git
    sync-uri: git+ssh://git@git.gentoo.org/repo/gentoo
    priority: -1000

usr-local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

robbat2
    location: /code/gentoo/gentoo-git/robbat2
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /opt/openjms/config /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.0/conf /usr/share/maven-bin-2.1/conf /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.1/conf /usr/share/polkit-1/actions /var/bind /var/lib/hsqldb /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles lmirror merge-sync mirror multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -Wl,--build-id"
MAKEOPTS="-j8 -l10"
PKGDIR="/home/gentoo/packages/bohr-int/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/dev/shm"
USE="a52 aac aalib acl acpi adns adplug agg aio alsa amd64 amr animgif ares arts audiofile audit avahi avx bash-completion berkdb bluetooth bonjour bzip2 cairo calendar cdaudio cdda cddb cdio cdparanoia cdr chardet chm clamav cli consolekit cracklib crypt cscope css ctype cups curl curlwrappers cvs cxx d3d daap dbus dc1394 designer-plugin dia diskio djbfft djvu dri dts dv dvb dvd dvdr dvdread ebook emf encode exif expat fam ffmpeg fftw firefox flac fltk fontconfig foomaticdb fortran gd gdbm geoip gif gimp glamor glut gmp gnokii gnutls gps graphviz gsm gstreamer hal ical iconv id3tag idea ieee1394 imagemagick imlib inkjar ipod ipv6 jack java5 java6 javacomm jbig jingle jpeg jpeg2k lash lcms ldap libgcrypt libnotify libsamplerate llvm llvm-shared-libs lm_sensors logitech-mouse lzma lzo mad maildir mhash midi mikmod mmap mmx mmxext mng modplug modules mozilla mp3 mp3tunes mp4 mpeg mplayer mudflap multilib multitarget musepack nas ncurses nls nocd nptl nptlonly nsplugin offensive ofx ogg openal opencl openexr opengl openmp oss otr pam pango pccntl pch pcre pda pdf perl plotutils png policykit posix postscript povray ppds pulseaudio python qt3support quicktime raw rdesktop readline reflection rpc rss ruby savedconfig scanner sdl seccomp semantic-desktop semantic-destkop session sid simplexml slp smp sms smux sndfile snmp sockets socks5 solver speex spell spl sqlite sqlite3 sse sse2 ssl ssse3 startup-notification subversion svg symlink sysfs syslog sysvipc taglib theora threads tidy tiff timidity truetype tta twolame udev udisks unicode upower urandom usb v4l v4l2 vcd vcdx videos vim-syntax vnc vorbis vorbis-psy wavpack webkit wideband wifi win32codecs wma wmf wxwidgets x264 xanim xattr xcb xcomposite xfs xine xinerama xinetd xml xorg xosd xpm xrandr xscreensaver xsl xulrunner xv xvid zeroconf zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel usb-audio usb-usx2y ad1816a ad1848 ad1848-lib ad1889 serial-u16550 virmidi seq-dummy dummy" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias asis auth_digest imagemap log_forensic proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http cern_meta cgi cgid dbd dumpio ident proxy_scgi reqtimeout substitute version authn_dbd" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-32 efi-64" INPUT_DEVICES="evdev keyboard mouse void wacom" KERNEL="linux" LCD_DEVICES="g15 glk graphlcd iowarrior ncurses null png ppm text usbhub usblcd X xosd" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_CA en_GB en_ZA en_US en af" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 arm i386 mips mips64 mips64el mipsel ppc ppc64" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="dummy fbdev ati radeon v4l vga vesa radeonhd r600 nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-06 23:11:59 UTC
Created attachment 429796 [details]
cairo-1.14.6-abi_x86_32.x86/config.log
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-06 23:12:22 UTC
Created attachment 429798 [details]
cairo-1.14.6-abi_x86_64.amd64/config.log
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-06 23:16:24 UTC
The identical error happens on the 64-bit ABI build.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-04-06 23:24:24 UTC
The "-Wl,--build-id" I have in LDFLAGS is the root cause; but the configure script is broken in that case.
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2016-08-27 19:50:15 UTC
Indeed, also reproducible with a deprecated flag in LDFLAGS; it causes checks to have a different outcome, therefore it is making false assumptions about the system
Comment 6 gentoo@danielquinn.org 2016-11-27 13:00:55 UTC
Am I correct in assuming that this is an upstream problem?  'Cause my desktop installation keeps barfing on compiling cairo and I don't know how to make it stop.

    # error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.  Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
Comment 7 Guilherme Amadio gentoo-dev 2016-12-06 17:11:40 UTC
Created attachment 455272 [details, diff]
cairo-1.14.6-macos.patch

This patch is a workaround for this bug on macOS.
Comment 8 Matt Turner gentoo-dev 2018-11-27 22:32:55 UTC
I see in Robin's build log:

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

Today with 1.14.12 and 1.16.0-r2 and LDFLAGS="-Wl,--build-id" I get

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

and cairo builds.

In my config.log I see

configure:33994: checking for cairo's pthread feature
configure:34105: x86_64-pc-linux-gnu-gcc -o conftest -O2 -march=native -pipe -frecord-gcc-switches -D_REENTRANT  -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -Wl,--build-id conftest.c -lrt  -lm -lpthread >&5
configure:34105: $? = 0
configure:34305: x86_64-pc-linux-gnu-gcc -o conftest -O2 -march=native -pipe -frecord-gcc-switches -D_REENTRANT  -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -Wl,--build-id conftest.c -lrt  -lm  >&5
/var/tmp/portage/x11-libs/cairo-1.14.12/temp/cckUQeIG.o: In function `test_mutex_attr':
conftest.c:(.text+0x86): undefined reference to `pthread_mutexattr_init'
conftest.c:(.text+0x95): undefined reference to `pthread_mutexattr_settype'
conftest.c:(.text+0xca): undefined reference to `pthread_mutexattr_destroy'
collect2: error: ld returned 1 exit status
configure:34305: $? = 1
configure: failed program was:
[snip]
configure:34360: checking whether cairo's pthread feature could be enabled
configure:34362: result: yes

So I'm wondering if it was actually a binutils change that fixed this. In Robin's config.log I see "ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored." Given that the workaround patch in the upstream bug is about stderr handling, I think this is plausible.

Please test and confirm it's working for you now.