[MacPorts] #39786: wxWidgets @2.9.5 universal build fails
#39786: wxWidgets @2.9.5 universal build fails --------------------------+------------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: wxWidgets30 --------------------------+------------------------- wxWidgets @2.9.4_2 is installed universal but I can upgrade it to 2.9.5 because: {{{ clang: error: cannot use 'precompiled-header' output with multiple -arch options }}} -- Ticket URL: <https://trac.macports.org/ticket/39786> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: wxWidgets30 | ---------------------------+------------------- Comment (by mojca@…): llvm also fails with {{{ /app/wxWidgets-2.9.5/build/bk-make-pch ./.pch/wxprec_basedll/wx/wxprec.h.gch wx/wxprec.h /usr/bin/llvm-g++-4.2 -I./.pch/wxprec_basedll -D__WXOSX_COCOA__ -DWXBUILDING -I../src/regex -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -D_FILE_OFFSET_BITS=64 -I/app/wxWidgets-2.9.5/build/lib/wx/include/osx_cocoa-unicode-2.9 -I../include -I/opt/local/include -I/opt/local/include -DWX_PRECOMP -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -pipe -O2 -arch x86_64 -arch i386 -fno-common -fvisibility=hidden -fvisibility-inlines- hidden llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags }}} -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: wxWidgets30 | ---------------------------+------------------- Comment (by mojca@…): Outside of wxWidgets the following works for me: {{{ export CC=clang export CXX=clang++ export CFLAGS=-I/opt/local/include export CXXFLAGS=-I/opt/local/include export LDFLAGS=-L/opt/local/lib ../wxWidgets-2.9.5/configure --prefix=/opt/local --disable-dependency- tracking --mandir=/opt/local/share/man --with-libiconv-prefix=/opt/local --with-libjpeg --with-libtiff --with-libpng --with-zlib --with-opengl --with-cocoa --disable-sdltest --enable-unicode --enable-display --enable- xrc --enable-universal_binary=i386,x86_64 --with-sdl --with-macosx-sdk=no --with-macosx-version-min=no }}} The last two arguments are not too important, but {{{--enable- universal_binary=i386,x86_64}}} seems to be, else some trivial patch to configure script is needed. I need to check again, but I believe that adding {{{-arch i386 -arch x86_64}}} flags to CFLAGS and LDFLAGS leads to the above mentioned problems. I'll attach some patches. -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: wxWidgets30 | ---------------------------+------------------- Comment (by mojca@…): One of the problems with current patch is that it skips this test: {{{ if echo $OSX_ARCH_OPTS | grep -q ","; then AC_MSG_WARN([Disabling dependency tracking due to universal binary build.]) disable_macosx_deps=yes dnl HACK: PCH could be made to work by precompiling for each architecture into separate directories dnl and including all architecture directories with each compiler invocation. dnl That would require a major rework of Bakefile and at the same time it would be nice to have dnl Objective-C++ precompiled headers. AC_MSG_WARN([Disabling precompiled headers due to universal binary build.]) bk_use_pch=no fi }}} and possibly some other places like: {{{ AC_MSG_CHECKING([for architectures to use in universal binary]) AC_MSG_RESULT([$OSX_ARCH_OPTS]) dnl NOTE: Only the compiler driver needs arch flags. The link editor dnl is incapable of using them but the compiler driver (which we use dnl as LD when building dynamic libraries) uses them to invoke the dnl real ld multiple times. If we moved to libtool -dynamic we would dnl need no arch flags because libtool automatically invokes ld for dnl every architecture found in the fat input files. dnl dnl For static library builds, AR/RANLIB automatically create proper dnl fat archives although AR is unable to update them once RANLIB has dnl made them into proper fat archives. Fortunately, our link process dnl simply removes the .a file before using ar to create a new one. dnl If we did move to libtool -static we still wouldn't need arch flags dnl because libtool automatically figures it out based on input. retest_macosx_linking=yes }}} because it sets {{{OSX_ARCH_OPTS}}} to {{{-arch i386 -arch x86_64}}} instead of {{{i386,x86_64}}}. It would be a lot cleaner to specify the flags in command line rather than patching {{{OSX_ARCH_OPTS}}} in configure script. Apart from this there is another patch for {{{install_name_too}}}, but I don't understand that one. -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+---------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: haspatch Port: wxWidgets30 | ---------------------------+---------------------- Changes (by mojca@…): * keywords: => haspatch * version: 2.1.3 => Comment: I attached a new patch which seems to fix the issue for me. Just a few question/notes: - Why does port request 10.6? Docs seem to suggest that it should work on 10.5. - There is one patch remaining. I have no idea why it is needed and it works for me without that patch. - There is no real need to use {{{--with-macosx-sdk=no}}} and {{{--with- macosx-version-min=no}}}, but I find it pointless that the scripts try to pass extra flags to compiler ({{{-mmacosx-version-min=10.5}}}). And the way those flags are implemented in current wxWidgets30, the flags don't work for me at all in some cases. - Can wxWidgets-devel be updated as well, please? If that is done, a number of tickets may be closed: #39806, #37624, #39409 -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+---------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: haspatch Port: wxWidgets30 | ---------------------------+---------------------- Changes (by mojca@…): * cc: vortexfive@… (added) -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#39786: wxWidgets @2.9.5 universal build fails ---------------------------+---------------------- Reporter: ryandesign@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: haspatch Port: wxWidgets30 | ---------------------------+---------------------- Changes (by mojca@…): * status: new => closed * resolution: => fixed Comment: Fixed in r108788. -- Ticket URL: <https://trac.macports.org/ticket/39786#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts