Discussion:
[MacPorts] #57473: qt4-mac @4.8.7: configure not detecting arch properly
MacPorts
2018-10-30 17:54:02 UTC
Permalink
#57473: qt4-mac @4.8.7: configure not detecting arch properly
--------------------------+---------------------
Reporter: SerpentChris | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: qt4-mac
--------------------------+---------------------
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 ppc64 flag is disliked for some reason.
--
Ticket URL: <https://trac.macports.org/ticket/57473>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 17:54:22 UTC
Permalink
#57473: qt4-mac @4.8.7: configure not detecting arch properly
---------------------------+--------------------
Reporter: SerpentChris | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: qt4-mac |
---------------------------+--------------------
Changes (by SerpentChris):

* Attachment "main.log" added.
--
Ticket URL: <https://trac.macports.org/ticket/57473>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 17:56:00 UTC
Permalink
#57473: qt4-mac @4.8.7: configure not detecting arch properly
---------------------------+--------------------
Reporter: SerpentChris | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: qt4-mac |
---------------------------+--------------------
Post by MacPorts
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 ppc64 flag is disliked for some reason.
New description:

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.

--
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 19:13:02 UTC
Permalink
#57473: qt4-mac @4.8.7: configure not detecting arch properly
---------------------------+--------------------
Reporter: SerpentChris | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: qt4-mac |
---------------------------+--------------------

Comment (by kencu):

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!

Ke
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 19:56:27 UTC
Permalink
#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 |
---------------------------+-----------------------
Changes (by jmroot):

* owner: (none) => michaelld
* status: new => assigned
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-30 20:28:13 UTC
Permalink
#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 michaelld):

LOL:

--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-10-31 00:45:42 UTC
Permalink
#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 michaelld):

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.
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-10 19:33:04 UTC
Permalink
#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 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.
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-10 08:35:11 UTC
Permalink
#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 kencu):

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

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

<https://github.com/macports/macports-ports/blob/master/aqua/qt4-mac/files
/patch-src_gui_dialogs_qfiledialog_mac.mm.diff>
--
Ticket URL: <https://trac.macports.org/ticket/57473#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-10 08:09:44 UTC
Permalink
#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
Loading...