Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302391 - qt: Darwin support broken
Summary: qt: Darwin support broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-27 03:17 UTC by matt
Modified: 2010-02-10 20:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,18.41 KB, text/plain)
2010-01-27 03:19 UTC, matt
Details
Patch against the eclass that moves additional extract stuff from pkg_setup to src_unpack. (qt-build-eclass-macos.patch,1.36 KB, patch)
2010-01-27 15:20 UTC, Heiko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matt 2010-01-27 03:17:53 UTC
-reduce-relocations ..... Reduce relocations in the libraries through extra
                              linker optimizations (Qt/X11 and Qt for Embedded Linux only;
                              experimental; needs GNU ld >= 2.18).
 * ERROR: x11-libs/qt-core-4.6.1 failed:

Portage 2.2.00.15210-prefix (prefix/darwin/macos/10.4/ppc, gcc-4.2.1, unavailable, 8.11.0 Power Macintosh)
=================================================================
System uname: Darwin-8.11.0-Power_Macintosh-powerpc-32bit
Timestamp of tree: Tue, 26 Jan 2010 21:04:42 +0000
distcc 2.18.4-Apple.1 powerpc-apple-darwin8.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.4
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r1
sys-devel/autoconf:  2.63-r01.1
sys-devel/automake:  1.10.2-r00.1, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6b
ACCEPT_KEYWORDS="ppc-macos ~ppc-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-apple-darwin8"
CFLAGS="-02 -pipe -maltivec -mcpu=G4 -mtune=G4"
CHOST="powerpc-apple-darwin8"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-02 -pipe -maltivec -mcpu=G4 -mtune=G4"
DISTDIR="/Volumes/prefix-ppc-macos-native/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
LINGUAS="en en_US"

[ebuild     U ] x11-libs/qt-core-4.6.1 [4.6.0-r1] USE="aqua glib qt3support ssl -debug -doc -iconv -optimized-qmake -pch" 0 kB
Comment 1 matt 2010-01-27 03:19:29 UTC
Created attachment 217534 [details]
build.log
Comment 2 Heiko 2010-01-27 08:48:22 UTC
(In reply to comment #0)
> -reduce-relocations ..... Reduce relocations in the libraries through extra
>                               linker optimizations (Qt/X11 and Qt for Embedded
> Linux only;
>                               experimental; needs GNU ld >= 2.18).
>  * ERROR: x11-libs/qt-core-4.6.1 failed:
> 

Umm I'd say that one is filtered out on OSX. Your problem seems to be:

"-no-framework: invalid command-line switch"

Thus configure bails out. Looks like we aren't able to build qt without frameworks anymore. But since the framework build works just fine, I guess we can remove

"use aqua && myconf+=" -no-framework"

from the qt4-build.eclass.


More interestingly the ARCH detection seems a bit wrong these days:

"Determining system architecture... (Darwin:8.11.0:Power Macintosh)
    32-bit Apple PowerPC (powerpc)
    'ppc' is unsupported, using 'generic'
    'macosx' is supported
System architecture: 'generic'"

I get even worse output:

"-no-framework: invalid command-line switch
-cocoa: invalid command-line switch
-framework: invalid command-line switch
-F/Gentoo/usr/lib/qt4: invalid command-line switch
Determining system architecture... (Darwin:10.2.0:i386)
    'x86' is unsupported, using 'generic'
    'macosx' is supported
System architecture: 'generic'"

The system architecture shouldn't be 'generic' on MacOS. Additionally I'm no more able to build 4.6.1 on my prefix (which I already have installed), so someone must have patched the eclass/ebuild into broken pieces of uselessness.
Comment 3 Heiko 2010-01-27 08:57:24 UTC
> The system architecture shouldn't be 'generic' on MacOS. Additionally I'm no
> more able to build 4.6.1 on my prefix (which I already have installed), so
> someone must have patched the eclass/ebuild into broken pieces of uselessness.
> 

Ok as expected a commit broke MacOS support for qt:

http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/qt-core/qt-core-4.6.1.ebuild?r1=1.2&r2=1.3

The problem is, that MacOS detection needs some other files to work correctly, thus we unpack a bit more than that specified in the ebuild. Since it's needed on every qt-package this is done in the eclass. Now we need to move things from pkg_setup to pkg_unpack there as well. The result being a working configure again:

"Determining system architecture... (Darwin:10.2.0:i386)
    'macosx' is supported
System architecture: 'macosx'"
Comment 4 Fabian Groffen gentoo-dev 2010-01-27 11:57:49 UTC
I guess this is food for abcd...
Comment 5 Heiko 2010-01-27 15:19:29 UTC
(In reply to comment #4)
> I guess this is food for abcd...
> 

OK the following patch fixes the issue for me. Seems like only extracting that single file for the auto-detection of MacOS is needed. Dunno what's uglier, this way or patching configure? Anyway, compiled everything up to qt-demo with that patch on my MacOS box.
Comment 6 Heiko 2010-01-27 15:20:19 UTC
Created attachment 217605 [details, diff]
Patch against the eclass that moves additional extract stuff from pkg_setup to src_unpack.
Comment 7 Fabian Groffen gentoo-dev 2010-01-27 19:57:59 UTC
@qt: do you agree with the proposed eclass patch?
Comment 8 Ben de Groot (RETIRED) gentoo-dev 2010-01-27 20:22:03 UTC
What about doing it the other way around? I.e. moving those vars in the ebuild from src_unpack to pkg_setup?
Comment 9 matt 2010-01-28 19:14:00 UTC
Heiko patch in Comment #6 works for me ( osx 10.4 g4 )
Comment 10 Heiko 2010-01-29 20:43:27 UTC
(In reply to comment #8)
> What about doing it the other way around? I.e. moving those vars in the ebuild
> from src_unpack to pkg_setup?
> 

Umm, why was it moved into src_unpack in the first place? If it was done without a special reason, we could either revert or move everything to pkg_prepare. Anyway, we should find consensus.
Comment 11 Ben de Groot (RETIRED) gentoo-dev 2010-01-31 17:31:36 UTC
(In reply to comment #10)
> Umm, why was it moved into src_unpack in the first place? 

For multilib support. AFAIK pkg_setup should work and is actually preferred.
Comment 12 Heiko 2010-02-08 19:47:09 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Umm, why was it moved into src_unpack in the first place? 
> 
> For multilib support. AFAIK pkg_setup should work and is actually preferred.
> 

Could we please find a consensus here, because that problem still persists in prefix and renders most (or even all) Qt-versions useless for Darwin. So Ben, are you going to move those defines from src_unpack to pkg_setup in all qt ebuilds? And Fabian, are you then going to apply my patch (with probably the tiny adjustment of modifying the value in qt4-build_pkg_setup instead of qt4-build_src_unpack)? Thanks in advance.
Comment 13 Fabian Groffen gentoo-dev 2010-02-10 17:56:07 UTC
@heiko: you understand the eclass better than I do, so whatever you propose is going to be it for me.  I can't commit, since we don't have them in the overlay any more.  So I urge you and the qt team to get to some consensus, because this breakage is more than annoying and for way too long to me too.

Who from qt is responsible for this eclass, and can we get a commit to unbreak Darwin support please?
Comment 14 Ben de Groot (RETIRED) gentoo-dev 2010-02-10 20:35:06 UTC
Fixes committed. Feel free to reopen if anything else is needed.