Opened 9 years ago

Closed 9 years ago

#26977 closed defect (fixed)

qt4-mac configure segmentation fault when building i386

Reported by: develop@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: michaelld (Michael Dickens), mkae (Marko Käning), raphael-st (Raphael Straub)
Port: qt4-mac

Description

Hello, since the 4.7 upgrade and even with the cyclic dependency resolved I cannot build qt4-mac. I of course did a port clean.

Now i obtain :

:info:configure Reading /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/work/qt-everywhere-opensource-src-4.7.0/translations/translations.pro
:info:configure ./configure: line 8131: 67449 Segmentation fault      QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro" -o "$mkfile"

In the source code, in the configure file, line 8131 is the end of :

if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
    echo
    echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
    echo "if you want a pure debug build."
    echo
    exit 1
fi

After, a lot of :

:info:configure Creating makefiles. Please wait...
[...]
:info:configure ./configure: line 8273: 68978 Segmentation fault      QTDIR="$outpath" "$QMAKE" $QMAKE_ARGS -o "$OUTDIR" "$a"

configure line 8273 is :

PART_ROOTS=

after, the build :

:debug:build Environment: CPATH='/opt/local/include/dbus-1.0:/opt/local/lib/dbus-1.0/include:/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.m$
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/work/qt-everywhere-opensource-src-4.7.0" && /usr/bin/make -j$
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/work/qt-everywhere-opensource-src-4.7.0/bin/qmake -spec mkspecs/macx-g++ -o Makefile $
:info:build make: *** [Makefile] Segmentation fault

Why, oh why??? Thanks for your clues Thomas

Attachments (2)

main.log (271.5 KB) - added by develop@… 9 years ago.
full build log
qt4-mac_Portfile_no-optim-10.6-i386.diff (521 bytes) - added by michaelld (Michael Dickens) 9 years ago.
"svn diff" in 'qt4-mac' Portfile, to remove qmake optimization for 10.6 i386 only

Download all attachments as: .zip

Change History (15)

Changed 9 years ago by develop@…

Attachment: main.log added

full build log

comment:1 Changed 9 years ago by mkae (Marko Käning)

Did you update your system's Java and Xcode already? Have you also installed the Java Update 3 Developer Package (comment:ticket:26934:21)?

comment:2 Changed 9 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:3 Changed 9 years ago by raphael-st (Raphael Straub)

I get the same errors here on an Intel Core Duo, Mac OS X 10.6.4, Xcode 3.2.4. It works on an Intel Core Duo with Mac OS X 10.5.8.

The crash log of qmake says:

Process:         qmake [18860]
Path:            /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/work/qt-everywhere-opensource-src-4.7.0/bin/qmake
Identifier:      qmake
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  gnumake [18859]

Date/Time:       2010-10-24 10:53:14.852 +0200
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000008b10894a
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   qmake                               0x002c981f QTextStreamPrivate::putString(QString const&, bool) + 47
1   qmake                               0x002c4876 QTextStream::operator<<(QString const&) + 54
2   qmake                               0x00088128 MakefileGenerator::writeSubTargets(QTextStream&, QList<MakefileGenerator::SubTarget*>, int) + 28152
3   qmake                               0x0008b846 MakefileGenerator::writeSubDirs(QTextStream&) + 214
4   qmake                               0x000c8d2b UnixMakefileGenerator::writeMakefile(QTextStream&) + 1291
5   qmake                               0x0005ce27 MakefileGenerator::write() + 119
6   qmake                               0x0014c2ee BuildsMetaMakefileGenerator::write(QString const&) + 350
7   qmake                               0x0014db73 SubdirsMetaMakefileGenerator::write(QString const&) + 1363
8   qmake                               0x00046e1e runQMake(int, char**) + 1214
9   qmake                               0x0000f1f9 start + 53

comment:4 Changed 9 years ago by raphael-st (Raphael Straub)

Cc: raphael@… added

Cc Me!

comment:5 Changed 9 years ago by mkae (Marko Käning)

Here I have an Intel Core Duo, Mac OS X 10.6.4, Xcode 3.2.4 plus updates and the additional install mentioned above. And it works.

comment:6 Changed 9 years ago by ryandesign (Ryan Schmidt)

Summary: qt4-mac configure segmentation faultqt4-mac configure segmentation fault when building i386

In the attached log, I see you're building for -arch i386 on 10.6.4. I also get a segmentation fault at the start of the build phase when building for i386 on 10.6.4, though it builds fine for x86_64 on the same machine.

comment:7 Changed 9 years ago by michaelld (Michael Dickens)

Looks like the code I added in to handle that scenario isn't working: if not building for the native arch, disable qmake optimization. If you want a "quick" work around, remove the "-optimized-qmake" from the "configure.args".

What do "uname -m" return for those of you having issues?

comment:8 in reply to:  7 Changed 9 years ago by raphael-st (Raphael Straub)

Replying to michaelld@…:

Looks like the code I added in to handle that scenario isn't working: if not building for the native arch, disable qmake optimization.

In my case, your code does what you say. The problem is that qmake optimization fails although it is building for the native arch.

If you want a "quick" work around, remove the "-optimized-qmake" from the "configure.args".

Yes, removing -optimized-qmake from configure.args fixes the problem.

What do "uname -m" return for those of you having issues?

$ uname -m
i386

So, I propose to remove qmake optimization (at least for Mac OS X 10.6 and i386 as build architecture).

comment:9 Changed 9 years ago by develop@…

I confirm that when removing the -optimized-qmake in the Portfile I can build qt4-mac. I use an i386 too (Core Duo) with OSX 10.6, XCode 3.2.4, the java updated and the Java Update 3 Developer Package installed. Thanks.

comment:10 Changed 9 years ago by michaelld (Michael Dickens)

Owner: changed from macports-tickets@… to michaelld@…
Status: newassigned

Thanks all; I agree with raphael & will augment the Portfile to look for 10.6 i386 & remove the optimization for just that version.

Changed 9 years ago by michaelld (Michael Dickens)

"svn diff" in 'qt4-mac' Portfile, to remove qmake optimization for 10.6 i386 only

comment:11 Changed 9 years ago by michaelld (Michael Dickens)

I just added a patch for the current qt4-mac Portfile that might do the trick; I think the syntax is correct, and "port lint" is OK with it too :) Can someone try it out & see if it works for you?

comment:12 in reply to:  11 Changed 9 years ago by raphael-st (Raphael Straub)

Replying to michaelld@…:

I just added a patch for the current qt4-mac Portfile that might do the trick; I think the syntax is correct, and "port lint" is OK with it too :) Can someone try it out & see if it works for you?

Yes, it works for me.

comment:13 Changed 9 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

Fixed in r73102.

Note: See TracTickets for help on using tickets.