[MacPorts] #21424: mesa: can't build i386 on Snow Leopard
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- When setting build_arch to i386 on a Snow Leopard machine, mesa still tries to build x86_64, which then fails when it can't link with the 32-bit libX11 and libXext that are installed. {{{ ld: warning: in /32mp/lib/libX11.dylib, file is not of required architecture ld: warning: in /32mp/lib/libXext.dylib, file is not of required architecture }}} {{{ $ lipo -info /32mp/lib/{libX11,libXext}.dylib Non-fat file: /32mp/lib/libX11.dylib is architecture: i386 Non-fat file: /32mp/lib/libXext.dylib is architecture: i386 }}} -- Ticket URL: <http://trac.macports.org/ticket/21424> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- Comment(by srm@…): I had the same problem here on Snow Leopard. Set build_arch to i386 in macports.conf and it didn't work. I've added the following lines to the Portfile's post_patch section {{{ reinplace "s:CFLAGS = :CFLAGS = -arch i386:g" ${worksrcpath}/configs/darwin reinplace "s:CXXFLAGS = :CXXFLAGS = -arch i386:g" ${worksrcpath}/configs/darwin #set correct flags for the AppleBuild reinplace "s:GL_CFLAGS=:GL_CFLAGS=-arch i386 :g" ${worksrcpath}/../AppleSGLX-57/Makefile reinplace "s:GL_LDFLAGS=:GL_LDFLAGS=-arch i386 :g" ${worksrcpath}/../AppleSGLX-57/Makefile reinplace "s:\$\(CC\) tests/glxinfo:\$\(CC\) -arch i386 tests/glxinfo:g" ${worksrcpath}/../AppleSGLX-57/Makefile reinplace "s:\$\(CC\) tests/glxgears:\$\(CC\) -arch i386 tests/glxgears:g" ${worksrcpath}/../AppleSGLX-57/Makefile }}} It works now. Probably due to "use_config no" there's no hope using normal configure._.append and the different build's didn't use the correct C/XXFlags -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- Comment(by srm@…): snip
I've added the following lines to the Portfile's post_patch section snap
Given that these lines are quite specific to my system (at least to this apple system, see the paths) it is at least a hint for other stressed fellows. -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- Comment(by srm@…): another line has probably to be changed: {{{ #This is used for building the tests. #The tests don't require installation. $(TEST_BUILD_DIR)/libGL.dylib: $(OBJECTS) -if ! test -d $(TEST_BUILD_DIR); then $(MKDIR) $(TEST_BUILD_DIR); fi $(CC) -O0 -ggdb3 -o $@ -dynamiclib -lXplugin -framework ApplicationServices -framework CoreFoundation -L$(X11_DIR)/lib -lX11 -lXext -W$ }}} add {{{-arch i386}}} behind $(CC) -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- Comment(by srm@…): sorry for the mess I'm producing in this worklog, just wanted to mention that it's file {{{${worksrcpath}/../AppleSGLX-57/Makefile}}} for the snippet above *out* -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: | Port: mesa -------------------------------------+-------------------------------------- Changes (by snc@…): * cc: snc@… (added) Comment: I feel we can always do these changes by simply inserting `configure.build_arch` if we're doing a non-universal build. This built for me (on an x86_64) with build_arch set to i386 after completing the aforementioned patches. -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: worksforme | Keywords: Port: mesa | --------------------------------------+------------------------------------- Changes (by jeremyhu@…): * status: new => closed * resolution: => worksforme -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: worksforme | Keywords: Port: mesa | --------------------------------------+------------------------------------- Comment(by jeremyhu@…): It builds fine for me on a 32bit SL -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: worksforme | Keywords: Port: mesa | --------------------------------------+------------------------------------- Comment(by snc@…): Did you build as i386 on an x86_64 arch? -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: | Keywords: Port: mesa | --------------------------------------+------------------------------------- Changes (by jeremyhu@…): * status: closed => reopened * resolution: worksforme => Comment: Ah, sorry for the confusion. It works +universal for me, but I'll try your configuration in a bit... -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: fixed | Keywords: Port: mesa | --------------------------------------+------------------------------------- Changes (by ryandesign@…): * status: reopened => closed * resolution: => fixed Comment: Fixed in r61548. -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#21424: mesa: can't build i386 on Snow Leopard --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Resolution: fixed | Keywords: Port: mesa | --------------------------------------+------------------------------------- Comment(by jeremyhu@…): Thanks Ryan! I've been swamped. -- Ticket URL: <http://trac.macports.org/ticket/21424#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts