[MacPorts] #38787: cairo 1.12.14 Build and install problems

MacPorts noreply at macports.org
Sat Apr 13 02:31:44 PDT 2013


#38787: cairo 1.12.14 Build and install problems
------------------------+--------------------------------
 Reporter:  ian.rees@…  |      Owner:  macports-tickets@…
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.1.3
 Keywords:              |       Port:  cairo
------------------------+--------------------------------
 Upgrading cairo to 1.12.14 +x11 +universal , I ran into a build problem
 and an install problem.

 MacOS 10.7.5

 {{{
 $ port -v
 MacPorts 2.1.3

 $ xcodebuild -version
 Xcode 4.6.1
 Build version 4H512

 $ gcc --v
 Using built-in specs.
 Target: i686-apple-darwin11
 Configured with:
 /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/src/configure --disable-
 checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2
 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-
 prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-
 slibdir=/usr/lib --build=i686-apple-darwin11 --enable-
 llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~1/dst-
 llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11-
 --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-
 include-dir=/usr/include/c++/4.2.1
 Thread model: posix
 gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
 }}}

 Apologies for the lack of a build log.

 Upgrade failed with missing link.h (related to ELF linking) - didn't dig
 around to see whether there's a port that provides this file, but it's not
 on my mac currently:

 {{{
 :info:build lookup-symbol.c:62:18: error: link.h: No such file or
 directory
 :info:build lookup-symbol.c:217: error: expected specifier-qualifier-list
 before 'ElfW'
 :info:build lookup-symbol.c:223: warning: 'struct dl_phdr_info' declared
 inside parameter list
 :info:build lookup-symbol.c:223: warning: its scope is only this
 definition or declaration, which is probably not what you want
 :info:build lookup-symbol.c: In function 'find_matching_file':
 :info:build lookup-symbol.c:228: error: nested functions are disabled, use
 -fnested-functions to re-enable
 :info:build lookup-symbol.c:228: warning: type qualifiers ignored on
 function return type
 :info:build lookup-symbol.c:228: warning: return type defaults to 'int'
 :info:build lookup-symbol.c:228: warning: function declaration isn't a
 prototype
 :info:build lookup-symbol.c: In function 'ElfW':
 :info:build lookup-symbol.c:228: error: expected declaration specifiers
 before '*' token
 :info:build lookup-symbol.c:229: error: expected declaration specifiers
 before 'ElfW'
 :info:build lookup-symbol.c:231: error: expected declaration specifiers
 before 'phdr'
 :info:build lookup-symbol.c:232: error: expected declaration specifiers
 before 'for'
 :info:build lookup-symbol.c:232: error: expected declaration specifiers
 before '--' token
 :info:build lookup-symbol.c:232: error: expected declaration specifiers
 before 'phdr'
 }}}

 Resolved that by modifying the Portfile to disable the "trace" feature in
 cairo - I'm not sure what that does, so this might not be such a good idea
 ;):

 {{{
 # Prevent cairo from using ghostscript.
 configure.args-append       ac_cv_prog_GS=""

 # Get cairo to build, possibly cause some problems down the road...
 configure.args-append        --enable-trace=no

 variant opengl requires x11 description {Add OpenGL graphics interface} {
     depends_lib-append      port:mesa
 }}}

 At this stage, on my machine, cairo would build properly, but failed on
 installation:

 {{{
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc differ: char 194, line
 10
 Command failed: /usr/bin/cmp
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc"
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc" && /bin/cp -v
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc"
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-intel//opt/local/lib/pkgconfig"
 Exit code: 1
 /usr/bin/lipo: can't figure out the architecture type of:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc
 Command failed: /usr/bin/lipo -create
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc"
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc" -output
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-intel//opt/local/lib/pkgconfig/cairo.pc"
 Exit code: 1
 /usr/bin/libtool: file:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc
 is not an object file (not allowed in a library)
 /usr/bin/libtool: file:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc is not an object file
 (not allowed in a library)
 Command failed: /usr/bin/libtool
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc"
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc" -o
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-intel//opt/local/lib/pkgconfig/cairo.pc"
 Exit code: 1
 }}}

 For a reason I haven't investigated, the i386 and x86_64 versions of
 cairo.pc differed by two space characters, and were (erroneously?) being
 sent to libtool as a result

 {{{
 $ diff
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work/destroot-i386//opt/local/lib/pkgconfig/cairo.pc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_cairo/cairo/work
 /destroot-x86_64//opt/local/lib/pkgconfig/cairo.pc
 10c10
 < Requires.private:  gobject-2.0 glib-2.0        pixman-1 >= 0.22.0
 fontconfig >= 2.2.95 freetype2 >= 9.7.3   libpng xcb-shm x11-xcb xcb >=
 1.6 xcb-render >= 1.6 xrender >= 0.6 x11 xext
 ---
 > Requires.private:   gobject-2.0 glib-2.0        pixman-1 >= 0.22.0
 fontconfig >= 2.2.95 freetype2 >= 9.7.3   libpng xcb-shm x11-xcb xcb >=
 1.6 xcb-render >= 1.6 xrender >= 0.6 x11 xext
 12c12
 < Libs.private:     -lz       -lz -lz
 ---
 > Libs.private:      -lz       -lz -lz
 }}}

 I hackily did a port clean, port build, then went and edited the x86_64
 template that produces cairo.pc - ...cairo-1.12.14-x86_64/src/cairo.pc.in
 , and removed two spaces, then did a port install and it finally worked!

-- 
Ticket URL: <https://trac.macports.org/ticket/38787>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list