[MacPorts] #57473: qt4-mac @4.8.7: configure not detecting arch properly
MacPorts
noreply at macports.org
Mon Dec 10 08:09:44 UTC 2018
#57473: qt4-mac @4.8.7: configure not detecting arch properly
---------------------------+-----------------------
Reporter: SerpentChris | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: qt4-mac |
---------------------------+-----------------------
Comment (by SerpentChris):
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 CXXFLAGS=$CFLAGS
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/qfiledialog_mac.mm}}}. 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/qfiledialog_mac.mm -o .obj/release-shared/qfiledialog_mac.o
dialogs/qfiledialog_mac.mm: In function ‘BOOL -[QNSOpenSavePanelDelegate
isHiddenFile:isDir:](QNSOpenSavePanelDelegate*, _message_ref_t*,
NSString*, BOOL)’:
dialogs/qfiledialog_mac.mm:300: error: ‘kCFURLIsHiddenKey’ was not
declared in this scope
dialogs/qfiledialog_mac.mm:300: 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?
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list