pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cairo build error (any2ppm.c:(.text+0x158): undefined reference to `cairo_image_surface_create')



Am Fri, 10 Oct 2014 17:26:18 +0200
schrieb Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost>:

> Well, isn't software fun? OK, so this is my fault for fixing cairo on
> another system. I guess installing proper autotools from pkgsrc, and
> enforcing them, should be my first step anyhow ...

... sadly, that does not work. I get the same failure with

PREFER_PKGSRC+= autoconf automake

... to make wholly sure, I added pkg-config to the list (but don't
think that really should matter).

PREFER_PKGSRC+= pkg-config autoconf automake

=> Tool dependency libtool-base>=2.2.6bnb3: found libtool-base-2.4.2nb8
=> Tool dependency automake>=1.9: found automake-1.14.1nb1
=> Tool dependency autoconf>=2.58: found autoconf-2.69nb5


cd /dev/shm/sw-work/work-with-system-gcc-4.3.4/pkgsrc-2014Q3/graphics/cairo/work/cairo-1.12.16 &
& ./autogen.sh
which: no gtkdocize in (/dev/shm/sw-work/work-with-system-gcc-4.3.4/pkgsrc-2014Q3/graphics/cairo
/work/.wrapper/bin:/dev/shm/sw-work/work-with-system-gcc-4.3.4/pkgsrc-2014Q3/graphics/cairo/work
/.buildlink/bin:/dev/shm/sw-work/work-with-system-gcc-4.3.4/pkgsrc-2014Q3/graphics/cairo/work/.t
ools/bin:/dev/shm/sw-work/work-with-system-gcc-4.3.4/pkgsrc-2014Q3/graphics/cairo/work/.gcc/bin:
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/bin:/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2
014Q3/_/bin:/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/gnu/bin:/usr/lib64/mpi/gcc/openmpi
/bin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/
bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/usr/lpp/mmfs/bin)
*** No GTK-Doc found, documentation won't be generated ***
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I build ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
autoreconf: running: /dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/bin/autoconf
autoreconf: running: /dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
build/Makefile.am.changelog:57: warning: '%'-style pattern rules are a GNU make extension
Makefile.am:81:   'build/Makefile.am.changelog' included from here
parallel-tests: installing 'build/test-driver'
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: warning: 
'libcairoboilerplate.la': linking libtool libraries using a non-POSIX
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: archiver 
requires 'AM_PROG_AR' in 'configure.ac'

[...]

boilerplate/Makefile.am:18:   while processing Libtool library 'libcairoboilerplate_cxx.la'
perf/Makefile.sources:7: warning: source file '../src/cairo-time.c' is in a subdirectory,
perf/Makefile.sources:7: but option 'subdir-objects' is disabled
perf/Makefile.am:3:   'perf/Makefile.sources' included from here
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.

[...]

perf/micro/Makefile.am:5:   while processing Libtool library 'libcairo-perf-micro.la'
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: warning: 
'libcairo.la': linking libtool libraries using a non-POSIX
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: archiver 
requires 'AM_PROG_AR' in 'configure.ac'
src/Makefile.am:23:   while processing Libtool library 'libcairo.la'
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: warning: 
'libcairo_cxx.la': linking libtool libraries using a non-POSIX
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/ltlibrary.am: archiver 
requires 'AM_PROG_AR' in 'configure.ac'
src/Makefile.am:26:   while processing Libtool library 'libcairo_cxx.la'
test/Makefile.am:420: warning: user target 'recheck' defined here ...
/dev/shm/sw-test/system-gcc-4.3.4/pkgsrc/2014Q3/_/share/automake-1.14/am/check.am: ... overrides
 Automake target 'recheck' defined here

[...]

I don't see obvious breakage here, but obviously the build is broken.
It wasn't with 2014Q2 on another system where I needed that patch (it
was gcc-4.9.1, btw., not 4.8).

Any hints on that position? Well, of course: I remember already the
recommendation to hack the configure script directly instead. That
position comes from experiences as my current one, obviously.

OK, manually edited out the relevant pieces of the patch from old to
newly generated configure and it works now.

So, we can file it under "Never, Ever Try To Run Autotools In Pgksrc
Build!". I'm attaching the patch I currently use for cairo for
reference. You might want to include something like this, as upstream
also dropped LTO in their repo (at least I've seen mailing list posts
indicating such).


Alrighty then,

Thomas

PS: Build has advanced beyond cairo now ... currently at gtk2. Time to
go home before that breaks.

-- 
Dr. Thomas Orgis
Universität Hamburg
RRZ / Zentrale Dienste / HPC
Schlüterstr. 70
20146 Hamburg
Tel.: 040/42838 8826
Fax: 040/428 38 6270
Index: graphics/cairo/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/distinfo,v
retrieving revision 1.76
diff -u -r1.76 distinfo
--- ./graphics/cairo/distinfo	31 Aug 2013 22:19:32 -0000	1.76
+++ ./graphics/cairo/distinfo	10 Oct 2014 16:28:30 -0000
@@ -7,3 +7,4 @@
 SHA1 (patch-ab) = 11f7e0e59bd5c51a8fdacb48dcf2f2fefdf3b768
 SHA1 (patch-ac) = 1785bbef6bcab4781bf89e1b986a7eb96e5f2b64
 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530
+SHA1 (patch-ae) = cea34856e61159d83eb25ff8537a974f4bc10556
Index: graphics/cairo/hacks.mk
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/cairo/hacks.mk,v
retrieving revision 1.6
diff -u -r1.6 hacks.mk
--- ./graphics/cairo/hacks.mk	4 Aug 2012 04:00:49 -0000	1.6
+++ ./graphics/cairo/hacks.mk	10 Oct 2014 16:28:30 -0000
@@ -20,6 +20,11 @@
 PTHREAD_CFLAGS=-fhonour-copts
 .endif
 
+# LTO is just broken in cairo, disable for now (observed with vanilla
+# gcc-4.9.1 and binutils-2.24).
+PKG_HACKS+= lto-just-disable
+CONFIGURE_ARGS+= --disable-lto
+
 #
 # Workaround for "the pixman problem" with netbsd-5 native X. The
 # problem is that if the order of rpath options isn't right when
Index: graphics/cairo/patches/patch-ae
===================================================================
RCS file: graphics/cairo/patches/patch-ae
diff -N graphics/cairo/patches/patch-ae
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ./graphics/cairo/patches/patch-ae	10 Oct 2014 16:28:30 -0000
@@ -0,0 +1,37 @@
+--- configure	2013-08-26 19:00:41.000000000 +0200
++++ ../cairo-configure-no-lto	2014-10-10 18:04:01.545580753 +0200
+@@ -995,6 +995,7 @@
+ enable_gtk_doc_html
+ enable_gtk_doc_pdf
+ enable_largefile
++enable_lto
+ enable_atomic
+ enable_gcov
+ enable_valgrind
+@@ -18146,9 +18243,15 @@
+ 
+ 
+ 
+-safe_MAYBE_WARN="$MAYBE_WARN"
+-MAYBE_WARN="$MAYBE_WARN -flto"
+-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++# Check whether --enable-lto was given.
++if test "${enable_lto+set}" = set; then :
++  enableval=$enable_lto;
++fi
++
++if test "x$enable_lto" != "xno"; then
++  safe_MAYBE_WARN="$MAYBE_WARN"
++  MAYBE_WARN="$MAYBE_WARN -flto"
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
+ int
+@@ -18170,6 +18273,7 @@
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
++fi
+ 
+ MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
+ 

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Home | Main Index | Thread Index | Old Index