Opened 14 years ago

Closed 12 years ago

#22815 closed defect (wontfix)

wxWidgets fails to build with +universal

Reported by: macfreek (Freek Dijkstra) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: universal Cc: larsko@…, jvliwanag@…, bgrupe27
Port: wxWidgets

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I replicate the report of haraoka, as this is a separate issue.

libsdl_mixer was upgraded on 10.5.8(ppc). The build result of wxWidgets(2.6.4&2.8.9&2.9.0) failed as follows.

$ sudo port -dv archive wxWidgets +universal
g++-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make: *** [.pch/wxprec_monodll/wx/wxprec.h.gch] Error 1
    while executing
 "command_exec build"
    (procedure "portbuild::build_main" line 9) invoked from within
 "$procedure $targetname" Warning: the following items did not execute (for wxWidgets): org.macports.archive org.macports.build org.macports.destroot Error: Status 1 encountered during processing.

Attachments (1)

patch_bk_make_pch.diff (764 bytes) - added by macfreek (Freek Dijkstra) 14 years ago.
Non-solution; removes architecture flags

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by macfreek (Freek Dijkstra)

For the record, I was able to reproduce this bug with both wxWidgets 2.8.9 and 2.9.0.

At some point, the Bakefile script work/wxWidgets-2.9.0/build/bk-make-pch is called, which -at the end of the script- tries to write a dependency file:

/usr/bin/g++-4.0 -mmacosx-version-min=10.5 -I./.pch/wxprec_monodll -D__WXOSX_COCOA__ -DWXBUILDING -I./build/src/tiff/libtiff -I../src/tiff/libtiff -I../src/jpeg -I../src/png -I../src/zlib -I../src/regex -I../src/expat/lib -DwxUSE_BASE=1 -DWXMAKINGDLL -I../src/stc/scintilla/include -I../src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -dynamic -ET_BITS=64 -I./lib/wx/include/osx_cocoa-unicode-release-2.9 -I../include -I/opt/local/include -DWX_PRECOMP -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -O2 -arch i386 -arch ppc -fno-common -fvisibility=hidden -fvisibility-inlines-hidden -o ./.pch/wxprec_monodll/wx/wxprec.h.gch -MMD -MF ./.deps/___pch_wxprec_monodll_wx_wxprec_h_gch.d ../include/wx/wxprec.h

Apparently, this is not allowed, as the error clearly indicates:

g++-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

I do not know how to solve this. Compiling without the +universal variant works fine on both 32-bit and 64-bit architectures.

comment:2 Changed 14 years ago by macfreek (Freek Dijkstra)

User vince had a solution, although it does not work right away. I modified to patch to patch the correct file (configure instead of bk_make_pch), however when I run it, compiling wxWidgets fails:

ld warning: in monodll_osx_cocoa_toolbar.o, file is not of required architecture
ld warning: in monodll_osx_cocoa_tooltip.o, file is not of required architecture
ld warning: in monodll_osx_cocoa_window.o, file is not of required architecture
ld warning: in monodll_cocoa_aboutdlg.o, file is not of required architecture
ld warning: in monodll_osx_cocoa_taskbar.o, file is not of required architecture
ld warning: in /opt/local/lib/libSDLmain.a, file is not of required architecture
ld warning: in /opt/local/lib/libSDL.dylib, file is not of required architecture

[...]

ld: symbol(s) not found
collect2: ld returned 1 exit status

Apparently, this work around is not the correct way to patch this.

Changed 14 years ago by macfreek (Freek Dijkstra)

Attachment: patch_bk_make_pch.diff added

Non-solution; removes architecture flags

comment:3 Changed 14 years ago by larsko@…

Cc: larsko@… added

Cc Me!

comment:4 Changed 14 years ago by jvliwanag@…

Cc: jvliwanag@… added

Cc Me!

comment:5 Changed 14 years ago by bgrupe27

Cc: bgrupe@… added

Cc Me!

comment:6 in reply to:  2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Replying to software@…:

ld warning: in /opt/local/lib/libSDL.dylib, file is not of required architecture

Presumably, you need to install libsdl with the correct architectures first.

And please remember WikiFormatting when writing in Trac.

comment:7 Changed 13 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to jwa@…

The current portfile has the universal variant disabled, so feel free to close this if you don't intend to add a working one.

comment:8 Changed 12 years ago by jyrkiwahlstedt

Resolution: wontfix
Status: newclosed

wxWidgets 2.8.x and earlier won't ever build universal due to Carbon dependency, 2.9.4 (current wxWidgets-devel) builds fine, at least on 10.7

Note: See TracTickets for help on using tickets.