Opened 2 years ago

Last modified 2 years ago

#57473 assigned defect

qt4-mac @4.8.7: configure not detecting arch properly

Reported by: SerpentChris (Chris Calderon) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc:
Port: qt4-mac

Description (last modified by SerpentChris (Chris Calderon))

My macports.conf has build arch set to ppc64, and my OS is Mac OS X 10.5.8. At some point during a configure script, things like this start to get printed out a lot, and eventually the build fails.

:info:configure WARNING: Expect ARCH of '-arch ARCH' flag to be exact; got 'ppc64'; ignoring extra.
:info:configure /usr/bin/g++-4.2 -c -pipe -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc64 -O2 -Wall -W  -I../../../mkspecs/macx-g++ -I. -o iconv.o iconv.cpp
:info:configure /usr/bin/g++-4.2 -headerpad_max_install_names -o iconv iconv.o     -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -arch ppc -liconv

It looks like the '-arch ppc64' flag is disliked and inconsistently applied.

Attachments (1)

main.log (282.8 KB) - added by SerpentChris (Chris Calderon) 2 years ago.

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by SerpentChris (Chris Calderon)

Attachment: main.log added

comment:1 Changed 2 years ago by SerpentChris (Chris Calderon)

Description: modified (diff)

comment:2 Changed 2 years ago by kencu (Ken)

As I recall, qt4 uses some assembly language in it's source files to speed things up. I ran into something like this a year or so ago when I was trying to build it with a specially-made version of clang-3.8 on PPC.

I'd be surprised if you can get it to build ppc64, but I'd be very pleased if it worked in the end!



It looks like the qt4 build system is able to recognize ppc but doesn't know what to do with ppc64, at least with respect to MacOSX. I imagine it is building the test as ppc instead ("ignoring extra"), but I'm not really sure how it's trying to sort out what to with the ppc64 flag.

You would probably have to dig into the configuration and build files and run some of the configuration test lines manually in there and see what kind of files are coming out to see what it is really doing.

WARNING: Expect ARCH of '-arch ARCH' flag to be exact; got 'ppc64'; ignoring extra.
Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to michaelld
Status: newassigned

comment:5 Changed 2 years ago by michaelld (Michael Dickens)

According to the qt4-mac configure script, "ppc64" is allowed as an arch option, if specified correctly. which we might not be doing since I doubt we've ever had an actual PPC64 available for testing.

comment:6 Changed 2 years ago by SerpentChris (Chris Calderon)

I downloaded the source and looked at the configure file, which lead to me believe that setting -arch ppc64 is actually unnecessary, and what really needs to be set is -platform macx-g++-64. I also edited my .profile to export some environmental variables:

export CC=gcc-4.2
export CFLAGS="-m64 -mtune=G5"
export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"
export CXX=g++-4.2
export TMPDIR="$HOME/tempdir"

This is the configure line I used, it's basically copied from the output of port -v install, but I removed --jobs=4, -arch "ppc64", and added -host-big-endian -big-endian -platform mac-g++-64:

./configure -v -confirm-license -opensource -prefix /opt/local/libexec/qt4 -bindir /opt/local/libexec/qt4/bin -libdir /opt/local/libexec/qt4/lib -docdir /opt/local/libexec/qt4/share/doc -headerdir /opt/local/libexec/qt4/include -plugindir /opt/local/libexec/qt4/share/plugins -importdir /opt/local/libexec/qt4/share/imports -datadir /opt/local/libexec/qt4/share -translationdir /opt/local/libexec/qt4/share/translations -sysconfdir /opt/local/libexec/qt4/share/sysconf -examplesdir /opt/local/libexec/qt4/share/examples -demosdir /opt/local/libexec/qt4/share/demos -openssl-linked -dbus-linked -fast -no-pch -framework -no-phonon -no-phonon-backend -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -nomake demos -nomake examples -release -no-declarative-debug -host-big-endian -big-endian -sdk /Developer/SDKs/MacOSX10.5.sdk -platform macx-g++-64

This compiles qmake with -arch ppc still for some reason, but the configure succeeds and the build goes along and builds everything else with -arch ppc64 until it gets to the file src/gui/dialogs/ When it tries to compile that file, it seems the file is using a part of the Cocoa framework that isn't present in OS X 10.5, specifically the build ends with this message:

gcc-4.2 -c -pipe -O2 -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -arch ppc64 -Xarch_ppc64 -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -isysroot /Developer/SDKs/MacOSX10.5.sdk -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -Iimage -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I.uic/release-shared -F/Users/chris/Downloads/qt-everywhere-opensource-src-4.8.7/lib dialogs/ -o .obj/release-shared/qfiledialog_mac.o
dialogs/ In function ‘BOOL -[QNSOpenSavePanelDelegate isHiddenFile:isDir:](QNSOpenSavePanelDelegate*, _message_ref_t*, NSString*, BOOL)’:
dialogs/ error: ‘kCFURLIsHiddenKey’ was not declared in this scope
dialogs/ error: ‘CFURLCopyResourcePropertyForKey’ was not declared in this scope
gmake[2]: *** [Makefile.Release:16988: .obj/release-shared/qfiledialog_mac.o] Error 1
gmake[2]: Leaving directory '/Users/chris/Downloads/qt-everywhere-opensource-src-4.8.7/src/gui'
gmake[1]: *** [Makefile:34: release] Error 2
gmake[1]: Leaving directory '/Users/chris/Downloads/qt-everywhere-opensource-src-4.8.7/src/gui'
gmake: *** [Makefile:423: sub-gui-make_default-ordered] Error 2

Googling the undeclared things leads to apple developer pages which state they are available in macOS 10.6+. Now I'm not sure what to do. How does it compile without the 64bit platform option? Does it use different code there for some reason?

comment:7 Changed 2 years ago by kencu (Ken)

there are a LOT of patches to qt4 to make it work!!

see this one for the issue you noticed, I think:


comment:8 Changed 2 years ago by SerpentChris (Chris Calderon)

I decided to try applying only that patch and then run the build process again, and it finished. I haven't had a chance to test it yet though.

Note: See TracTickets for help on using tickets.