#38787 closed defect (fixed)
cairo 1.12.14 Build and install problems
Reported by: | ian.rees@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | Cc: | cooljeanius (Eric Gallager) | |
Port: | cairo |
Description
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!
Attachments (3)
Change History (12)
comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)
Cc: | egall@… added |
---|
comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)
Owner: | changed from macports-tickets@… to ryandesign@… |
---|
Thanks for the ticket. In the future, please Cc relevant port maintainers.
comment:3 follow-up: 4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
I don't know why this is happening. Seeing the main.log file from the failed build would really be helpful.
comment:4 follow-up: 5 Changed 11 years ago by ian.rees@…
Replying to ryandesign@…:
I don't know why this is happening. Seeing the main.log file from the failed build would really be helpful.
Will attach main.log from building, before and after changing my Portfile, shortly. I tried reproducing the install problem too, but haven't figured out how to make macports to do the install again without removing a pile of dependencies.
For the build problem, do you have a link.h somewhere on your system? I wasn't sure whether to look for a missing port dependency, or to look for a reason that the trace tool was being compiled on my system.
Thanks! -Ian-
Changed 11 years ago by ian.rees@…
Attachment: | cairo_ticket38787_build_after_Portfile_change_main.log added |
---|
Build after adding --enable-trace=no to Portfile
Changed 11 years ago by ian.rees@…
Attachment: | cairo_ticket38787_failed_build_main.log added |
---|
Log from before adding --enable-trace=no
comment:5 follow-up: 6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ian.rees@…:
Will attach main.log from building, before and after changing my Portfile, shortly.
Thanks, I'll take a look.
I tried reproducing the install problem too, but haven't figured out how to make macports to do the install again without removing a pile of dependencies.
To rebuild a port e.g. cairo,
sudo port -n upgrade --force cairo
For the build problem, do you have a link.h somewhere on your system? I wasn't sure whether to look for a missing port dependency, or to look for a reason that the trace tool was being compiled on my system.
I do not find any link.h on my system.
comment:6 Changed 11 years ago by ian.rees@…
Replying to ryandesign@…:
Replying to ian.rees@…:
Will attach main.log from building, before and after changing my Portfile, shortly.
Thanks, I'll take a look.
I tried reproducing the install problem too, but haven't figured out how to make macports to do the install again without removing a pile of dependencies.
To rebuild a port e.g. cairo,
sudo port -n upgrade --force cairo
Thanks for that, will add a new log in a minute.
For the build problem, do you have a link.h somewhere on your system? I wasn't sure whether to look for a missing port dependency, or to look for a reason that the trace tool was being compiled on my system.
I do not find any link.h on my system.
Interesting, so does that mean lookup-symbol.c isn't being compiled on your system?
Changed 11 years ago by ian.rees@…
Attachment: | cairo_ticket38787_install_problem_main.log added |
---|
log of install problem, after build problem is resolved
comment:7 follow-ups: 8 9 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Correct, lookup-symbol.c is not being compiled on my system.
Comparing our logs, the significant difference seems to be:
-
main.log
1005 1001 :info:configure checking whether cairo's cairo-trace feature could be enabled... yes 1006 1002 :info:configure checking for cairo's cairo-script-interpreter feature... 1007 1003 :info:configure checking whether cairo's cairo-script-interpreter feature could be enabled... yes 1008 :info:configure checking for bfd_openr in -lbfd... no 1009 :info:configure checking libiberty.h usability... no 1010 :info:configure checking libiberty.h presence... no 1011 :info:configure checking for libiberty.h... no 1004 :info:configure checking for bfd_openr in -lbfd... yes 1005 :info:configure checking bfd.h usability... yes 1006 :info:configure checking bfd.h presence... yes 1007 :info:configure checking for bfd.h... yes 1008 :info:configure checking libiberty.h usability... yes 1009 :info:configure checking libiberty.h presence... yes 1010 :info:configure checking for libiberty.h... yes 1012 1011 :info:configure checking for cairo's symbol-lookup feature... 1013 :info:configure checking whether cairo's symbol-lookup feature could be enabled... no (requires bfd)1012 :info:configure checking whether cairo's symbol-lookup feature could be enabled... yes 1014 1013 :info:configure checking for glib... yes 1015 1014 :info:configure checking for shm_open in -lrt... (cached) no 1016 1015 :info:configure checking for gtk... yes … … 1144 1143 :info:configure pthread: yes 1145 1144 :info:configure gtk-doc: no 1146 1145 :info:configure gcov support: no 1147 :info:configure symbol-lookup: no (requires bfd)1146 :info:configure symbol-lookup: yes 1148 1147 :info:configure test surfaces: no (disabled, use --enable-test-surfaces to enable) 1149 1148 :info:configure ps testing: no (requires libspectre) 1150 1149 :info:configure pdf testing: no (requires poppler-glib >= 99999)
So your system has libiberty.h and libbfd.dylib, on the basis of which cairo has decided to enable the symbol-lookup feature, which then fails to compile. Where did these files come from on your system?
Hopefully the problem is fixed by explicitly disabling the symbol lookup feature in r105226.
Another difference I noticed by looking through our logs is that you're running the version of clang included with Xcode 4.2. Are you really still running Xcode 4.2? If so, please consider upgrading to Xcode 4.6.1. After upgrading Xcode, or if you've already upgraded Xcode, open the Xcode application, go to the Preferences window, to the Downloads section, and update the command line tools.
comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)
Replying to ryandesign@…:
So your system has libiberty.h and libbfd.dylib, on the basis of which cairo has decided to enable the symbol-lookup feature, which then fails to compile. Where did these files come from on your system?
I think they can be provided by either binutils or gdb. Perhaps this is one of the ports that should have been mentioned to fix #37921?
comment:9 Changed 11 years ago by ian.rees@…
Replying to ryandesign@…:
Correct, lookup-symbol.c is not being compiled on my system.
Comparing our logs, the significant difference seems to be:
main.log
1005 1001 :info:configure checking whether cairo's cairo-trace feature could be enabled... yes 1006 1002 :info:configure checking for cairo's cairo-script-interpreter feature... 1007 1003 :info:configure checking whether cairo's cairo-script-interpreter feature could be enabled... yes 1008 :info:configure checking for bfd_openr in -lbfd... no 1009 :info:configure checking libiberty.h usability... no 1010 :info:configure checking libiberty.h presence... no 1011 :info:configure checking for libiberty.h... no 1004 :info:configure checking for bfd_openr in -lbfd... yes 1005 :info:configure checking bfd.h usability... yes 1006 :info:configure checking bfd.h presence... yes 1007 :info:configure checking for bfd.h... yes 1008 :info:configure checking libiberty.h usability... yes 1009 :info:configure checking libiberty.h presence... yes 1010 :info:configure checking for libiberty.h... yes 1012 1011 :info:configure checking for cairo's symbol-lookup feature... 1013 :info:configure checking whether cairo's symbol-lookup feature could be enabled... no (requires bfd)1012 :info:configure checking whether cairo's symbol-lookup feature could be enabled... yes 1014 1013 :info:configure checking for glib... yes 1015 1014 :info:configure checking for shm_open in -lrt... (cached) no 1016 1015 :info:configure checking for gtk... yes … … 1144 1143 :info:configure pthread: yes 1145 1144 :info:configure gtk-doc: no 1146 1145 :info:configure gcov support: no 1147 :info:configure symbol-lookup: no (requires bfd)1146 :info:configure symbol-lookup: yes 1148 1147 :info:configure test surfaces: no (disabled, use --enable-test-surfaces to enable) 1149 1148 :info:configure ps testing: no (requires libspectre) 1150 1149 :info:configure pdf testing: no (requires poppler-glib >= 99999) So your system has libiberty.h and libbfd.dylib, on the basis of which cairo has decided to enable the symbol-lookup feature, which then fails to compile. Where did these files come from on your system?
Not sure honestly, it's entirely possible that they came from outside macports as egall suggested. This computer has been used for cross-compiling to mingw32 and AVR, and I don't remember the details of getting that setup.
Hopefully the problem is fixed by explicitly disabling the symbol lookup feature in r105226.
Another difference I noticed by looking through our logs is that you're running the version of clang included with Xcode 4.2. Are you really still running Xcode 4.2? If so, please consider upgrading to Xcode 4.6.1. After upgrading Xcode, or if you've already upgraded Xcode, open the Xcode application, go to the Preferences window, to the Downloads section, and update the command line tools.
Good catch, and thanks for the tip! I had upgraded Xcode, and guess I had just assumed that would upgrade clang too. Fixed now.
Cc Me!