[MacPorts] #29842: libcairo.la fails to build on Lion x68_64
#29842: libcairo.la fails to build on Lion x68_64 -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: libcairo.la lion | Port: Cairo -------------------------------+-------------------------------------------- Cairo fails to compile: libcairo.la fails to build with error no debug symbols in executable (-arch x86_64) ranlib: archive: .libs/libcairo.a can't determine the byte order of table of contents (contains no Mach-O files) 10.7 Developer Preview 4 gcc version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 -- Ticket URL: <https://trac.macports.org/ticket/29842> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: libcairo.la fails to build on Lion x68_64 -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: libcairo.la lion | Port: cairo -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => ryandesign@… * cc: matuzalem@… (removed) * port: Cairo => cairo Old description:
Cairo fails to compile:
libcairo.la fails to build with error no debug symbols in executable (-arch x86_64)
ranlib: archive: .libs/libcairo.a can't determine the byte order of table of contents (contains no Mach-O files)
10.7 Developer Preview 4 gcc version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1
New description: Cairo fails to compile: libcairo.la fails to build with error no debug symbols in executable (-arch x86_64) {{{ ranlib: archive: .libs/libcairo.a can't determine the byte order of table of contents (contains no Mach-O files) }}} 10.7 Developer Preview 4 [[br]] gcc version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 -- Comment: I don't have Lion so I can't really help with this right now. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Changes (by jmr@…): * keywords: libcairo.la lion => lion Comment: If you build with configure.compiler=llvm-gcc-4.2 on 10.6 you can see that the .o files are llvm bitcode, not mach-o, so the static libs aren't correctly built. Turning off use of -flto fixes this. See attachments. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * cc: shirocov@… (added) Comment: Has duplicate #30135. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Changes (by snc@…): * cc: snc@… (added) Comment: Just to clarify: does this actually produce an error during the MacPorts build phase or is it a bad resulting file? -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ryandesign@…): Using "sudo port install cairo configure.compiler=llvm-gcc-4.2" on Snow Leopard with Xcode 3.2.6, if I don't use the universal variant, it installs successfully but the created static libraries are not Mach-O files and are thus unusable; if I install with the universal variant, it fails after the destroot phase when lipo is unable to merge the static libraries because they are not Mach-O files (see #30135). According to the description of this ticket, the build fails on Lion, even when not using the universal variant, but I have not confirmed that. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): The TOC issue should be fixed in a later version of the devtools. ld64 understands llvm bitcode. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ryandesign@…): Later than what? Is this still an issue for Lion 10.7 GM? What about for Xcode 4 on Snow Leopard? -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by matthew.a.shapiro@…): Under Lion GM + Xcode 4, cairo still fails to build. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by cdavis@…): The problem as I understood it is that some of the cctools (e.g. lipo, libtool) don't understand LLVM bitcode. Specifically, they don't know how to determine the architecture of a bitcode file. So lipo, and anything that uses it to read/write fat Mach-O and archive files, are all useless right now for dealing with LLVM bitcode objects, as well as archives composed entirely of bitcode objects. Same for libtool. I filed radar 9087924 for this; so far, I haven't gotten a response. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by rmstonecipher@…): Ryan Schmidt,[[br]] Josh's patches allow cairo to be built +universal on Lion.[[br]] If they are an acceptable solution, could commit them?[[br]][[br]] Ryan Stonecipher -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ejtttje@…): I concur, needed this patch to build for Lion, but also needed #30351 in order to build +quartz variant under 32-bit (i.e. +universal) -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): The use of lipo(1) on static libraries will not generally work as they will need to have their table of contents updated with respect to the time stamp of the newly created fat file. libtool(1) is the recommended way to properly create a fat archive. As libtool(1) will do what ever it takes to place the objects from the input in their proper place in the output (things like taking fat .o files out of thin archives, etc). So in this case the recommended way to make the output is: /Developer/usr/bin/libtool i386.a x86_64.a -o cairo.a The problem is in muniversal trying to do this with lipo. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): @cdavis, what problem are you seeing with libtool? It should work fine. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:15> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): Try the attached patch for muniversal. I haven't tested it, but it should work (modulo any syntax errors I may have inadvertently made) -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ryandesign@…): I committed the initial patch for cairo in r81083 and cairo-devel in r81084 before realizing new comments had appeared in this ticket. Replying to [comment:14 jeremyhu@…]:
The problem is in muniversal trying to do this with lipo.
Hmm, that's news to me. lipo always seemed to work before. Replying to [comment:16 jeremyhu@…]:
Try the attached patch for muniversal. I haven't tested it, but it should work (modulo any syntax errors I may have inadvertently made)
"/usr/bin/lipbtool" is presumably one typo. If libtool is the correct tool to use now, why are we still trying with lipo first then? Why not just always use libtool? -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by michelle.lynn.gill@…): If it's of any help, I was able to build cairo @1.10.2_3 +opengl+x11 on MacPorts 2.0 using Mac OS X 10.7, Xcode 4.1, and mp-gcc44. I don't see any log files since it was a clean build, but I'm happy to provide them if someone will direct me. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by snc@…): Logs aren't kept after a clean install by default. You'll need to build again to get logs; consider turn on keep_logs in macports.conf. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:22> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ejtttje@…): Is anyone seeing issues with PS or PDF generation from Cairo under Lion? I am, and [http://comments.gmane.org/gmane.os.apple.macports.devel/15083 this discussion page] suggests it might be related to building with llvm. Unfortunately, configure.compiler=gcc-4.2 does not seem to fix the issue (so maybe I am subverting this bug report, but just want to check, we can fork to a new bug if needed) What I can say is that no matter what I do with my cairo pdf surface calls, it consistently generates a 414 byte file with what look like PDF headers and footer, but no content. Further, Preview and Adobe Reader complain about an invalid file (Preview says it "can't be opened" and that it is damaged or unknown format, whereas Reader complains it "has no pages"). If I restrict the cairo version to 1.4, I see it does change the version number in the header, but that's the only diff. I have also tried cairo-devel, same issue. I'll attach a sample in case it is helpful. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:23> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): ejtttje: please file a new bug report for your PS/PDF issue. This ticket is specifically about the build issue relating to LLVM Bitcode and muniversal. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:24> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): r81091 ... I tested it with llvm-gcc-4.2 without ryan's r81083 change. Leaving open for ryan to revert the -flto stripping in a future cairo if he wishes. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:25> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by jeremyhu@…): Replying to [comment:17 ryandesign@…]:
If libtool is the correct tool to use now, why are we still trying with lipo first then? Why not just always use libtool?
because libtool is correct for ar archives, lipo is correct for Mach-O ... lipo will work for most cases, so doing it first. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:26> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm -------------------------------+-------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Keywords: lion | Port: cairo -------------------------------+-------------------------------------------- Comment(by ejtttje@…): I tracked down the PDF problem as an llvm issue with libpixman... I've started a new ticket for it #30370. -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:27> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29842: cairo: static libs fail to build correctly with llvm --------------------------------+------------------------------------------- Reporter: matuzalem@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.99 Resolution: fixed | Keywords: lion Port: cairo | --------------------------------+------------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:25 jeremyhu@…]:
Leaving open for ryan to revert the -flto stripping in a future cairo if he wishes.
r81113 -- Ticket URL: <https://trac.macports.org/ticket/29842#comment:28> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts