Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390449 - =x11-libs/cairo-1.10.2-r1 fails to compile on x86_64-gentoo-freebsd8.2
Summary: =x11-libs/cairo-1.10.2-r1 fails to compile on x86_64-gentoo-freebsd8.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: AMD64 FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-13 20:50 UTC by Tibor Vago
Modified: 2013-08-28 18:30 UTC (History)
3 users (show)

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


Attachments
cairo-1.10.2-r1.ebuild.patch (cairo-1.10.2-r1.ebuild.patch,452 bytes, patch)
2011-11-16 00:50 UTC, Tibor Vago
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tibor Vago 2011-11-13 20:50:23 UTC
[ . . . ]
  CC     libcairo_trace_la-lookup-symbol.lo
/bin/bash ../../libtool --silent --tag=CC   --mode=compile x86_64-gentoo-freebsd8.2-gcc -DHAVE_CONFIG_H -I. -I../..  -DCAIRO_TRACE_OUTDIR="\"/var/lib/lib/cairo-trace\"" -I../../src -I../../src  -D_REENTRANT    -I/usr/include/pixman-1        -I/usr/include/freetype2    -D_THREAD_SAFE -I/usr/include/libdrm   -I/usr/include/libpng15   -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore   -D_THREAD_SAFE   -D_THREAD_SAFE     -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Werror-implicit-function-declaration -Wnested-externs -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wbad-function-cast -Wvolatile-register-var -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2 -I../../src/glew                      -D_REENTRANT -w -O2 -march=native -pipe -finline-limit=1200 -c -o libcairo_trace_la-lookup-symbol.lo `test -f 'lookup-symbol.c' || echo './'`lookup-symbol.c
lookup-symbol.c:218: error: expected specifier-qualifier-list before 'ElfW'
lookup-symbol.c: In function 'ElfW':
lookup-symbol.c:229: error: expected declaration specifiers before '*' token
lookup-symbol.c:230: error: expected declaration specifiers before 'ElfW'
lookup-symbol.c:232: error: expected declaration specifiers before 'phdr'
lookup-symbol.c:233: error: expected declaration specifiers before 'for'
lookup-symbol.c:233: error: expected declaration specifiers before '--' token
lookup-symbol.c:233: error: expected declaration specifiers before 'phdr'
lookup-symbol.c:247: error: expected declaration specifiers before 'return'
lookup-symbol.c:248: error: expected declaration specifiers before '}' token
lookup-symbol.c:256: error: storage class specified for parameter 'symbol_cache_hash'
lookup-symbol.c:257: error: storage class specified for parameter 'symbol_cache_mutex'
lookup-symbol.c:257: error: parameter 'symbol_cache_mutex' is initialized
lookup-symbol.c:261: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
lookup-symbol.c:257: error: declaration for parameter 'symbol_cache_mutex' but no such parameter
lookup-symbol.c:256: error: declaration for parameter 'symbol_cache_hash' but no such parameter
lookup-symbol.c:332: error: expected '{' at end of input
lookup-symbol.c: In function 'find_matching_file':
lookup-symbol.c:332: error: expected declaration or statement at end of input
gmake[4]: *** [libcairo_trace_la-lookup-symbol.lo] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.2-r1/work/cairo-1.10.2/util/cairo-trace'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.2-r1/work/cairo-1.10.2/util'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.2-r1/work/cairo-1.10.2/util'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.2-r1/work/cairo-1.10.2'
gmake: *** [all] Error 2
emake failed
[ . . . ]
Comment 1 Tibor Vago 2011-11-13 20:51:20 UTC
# emerge --info
Portage 2.2.0_alpha74 (default/bsd/fbsd/amd64/8.2, gcc-4.5.3, freebsd-lib-8.2-r1, 8.2-RELEASE amd64)
=================================================================
System uname: FreeBSD-8.2-RELEASE-amd64-64bit-ELF
Timestamp of tree: Sun, 13 Nov 2011 10:30:01 +0000
app-shells/bash:         4.2_p10
dev-lang/python:         2.7.2-r3, 3.2.2
dev-util/cmake:          2.8.6-r3
dev-util/pkgconfig:      0.26
sys-apps/baselayout:     2.1
sys-apps/openrc:         0.9.4
sys-devel/autoconf:      2.68
sys-devel/automake:      1.9.6-r3, 1.11.1-r1
sys-devel/binutils:      2.20.1-r1
sys-devel/gcc:           4.2.4-r1, 4.3.6-r1, 4.4.6-r1, 4.5.3-r1
sys-devel/gcc-config:    1.5-r2
sys-devel/libtool:       2.4-r4
sys-devel/make:          3.82-r3
sys-freebsd/freebsd-lib: 8.2-r1 (virtual/os-headers)
Repositories: gentoo gentoo-fbsd
Installed sets: 
ACCEPT_KEYWORDS="amd64-fbsd x86-fbsd ~amd64-fbsd ~x86-fbsd"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-freebsd8.2"
CFLAGS="-w -O2 -march=native -pipe"
CHOST="x86_64-gentoo-freebsd8.2"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-w -O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs chflags distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.fsn.hu/pub/linux/distributions/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--allow-multiple-definition"
LINGUAS="hu"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X amd64-fbsd apng bzip2 cli cracklib crypt cxx dbus dri gif gmp iconv ipv6 java5 java6 jpeg kde lzma mmx modules multilib ncurses nopie nossp nptlonly ogg opengl optimization oss pcre png qt3support qt4 session sse sse2 sse3 sse4 sse4_1 ssl ssse3 strong-optimization symlink tcpd tftp threads tiff unicode usb vlc vorbis wimax wps xorg zfs zlib" CAMERAS="ptp2" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LINGUAS="hu" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="BSD" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Tibor Vago 2011-11-13 20:53:10 UTC
cairo-1.8.10 compiles without error with gcc:4.2
Comment 3 Tibor Vago 2011-11-14 13:14:15 UTC
"ElfW" is defined in glibc and not in freebsd-lib but "__ElfN" is defined in freebsd-lib. If I add "-DElfW=__ElfN" to CFLAGS then cairo 1.10.2-r1 is compiles fine.
Comment 4 Tibor Vago 2011-11-16 00:50:12 UTC
Created attachment 292717 [details, diff]
cairo-1.10.2-r1.ebuild.patch

Patch for cairo-1.10.2-r1.ebuild. This patch modifies the ebuild to add "-DElfW=__ElfN" to CFLAGS on freebsd.
Comment 5 Tibor Vago 2011-11-16 00:51:00 UTC
Please test it if possible and apply on portage tree.
Comment 6 Naohiro Aota gentoo-dev 2012-03-19 06:46:20 UTC
(In reply to comment #4)
> Created attachment 292717 [details, diff] [details, diff]
> cairo-1.10.2-r1.ebuild.patch
> 
> Patch for cairo-1.10.2-r1.ebuild. This patch modifies the ebuild to add
> "-DElfW=__ElfN" to CFLAGS on freebsd.

Sorry for late response. but better to have souce code patch to make it built both on linux and freebsd (and send it to upstream) than having gcc argument hack.
Comment 7 Naohiro Aota gentoo-dev 2012-05-25 22:36:41 UTC
Masked >x11-libs/cairo-1.10 till this is resolved.
Comment 8 Alexis Ballier gentoo-dev 2012-05-25 23:32:25 UTC
(In reply to comment #7)
> Masked >x11-libs/cairo-1.10 till this is resolved.

didnt you break amd64-fbsd deptree by doing this ?
Comment 9 Alexis Ballier gentoo-dev 2012-05-25 23:37:18 UTC
btw cairo-trace seems fine on 9.0...
Comment 10 Alexis Ballier gentoo-dev 2012-05-25 23:46:15 UTC
actually, it seems to use lookup-symbols with bfd and i have this in config.log:
configure:34312: gcc -o conftest -g -O2   conftest.c -lbfd   -lm >&5
/usr/lib/gcc/x86_64-gentoo-freebsd9.0/4.6.3/../../../../x86_64-gentoo-freebsd9.0/lib/libbfd.so: undefined reference to `libintl_dgettext'
collect2: ld returned 1 exit status
configure:34312: $? = 1
Comment 11 Alexis Ballier gentoo-dev 2012-05-25 23:48:01 UTC
just disable symbol_lookup without glibc id say
Comment 12 Naohiro Aota gentoo-dev 2012-05-25 23:56:24 UTC
In reply to comment #11)
> just disable symbol_lookup without glibc id say

+1 Since cairo is required by so many packages, it's pain to wait fix for the code...
Comment 13 Alexis Ballier gentoo-dev 2012-05-26 00:37:17 UTC
(In reply to comment #12)
> In reply to comment #11)
> > just disable symbol_lookup without glibc id say
> 
> +1 Since cairo is required by so many packages, it's pain to wait fix for
> the code...

and, atm, leaving the mask just breaks the deptree for amd64-fbsd that i've spent a lot of time to keep sane...
Comment 14 Naohiro Aota gentoo-dev 2012-05-27 02:46:34 UTC
Added --disable-trace on FreeBSD and mask removed.
Comment 15 Alexis Ballier gentoo-dev 2013-08-28 18:30:55 UTC
(In reply to Naohiro Aota from comment #14)
> Added --disable-trace on FreeBSD and mask removed.

closing