Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 400843 - dev-python/pygtk-2.24.0-r2 fails to build on OS 10.7 with numerous errors
Summary: dev-python/pygtk-2.24.0-r2 fails to build on OS 10.7 with numerous errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 00:38 UTC by Stuart Shelton
Modified: 2017-03-16 01:39 UTC (History)
1 user (show)

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


Attachments
dev-python/pygtk-2.24.0-r2 build log (pygtk.errors.bz2,187.73 KB, application/octet-stream)
2012-01-26 00:38 UTC, Stuart Shelton
Details
Build error-log with MAKEOPTS="-j1" (pygtk.log.bz2,186.22 KB, application/x-bzip)
2012-01-29 11:48 UTC, Stuart Shelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2012-01-26 00:38:02 UTC
Created attachment 299901 [details]
dev-python/pygtk-2.24.0-r2 build log

See attachment for build log.

Is there an undeclared dependancy on a later version of cairo?  There are some notices in the log regarding updating structures/API calls.

emerge --info


Portage 2.2.01.20062-prefix (prefix/darwin/macos/10.7/x64, gcc-4.2.1, unavailable, 11.2.0 x86_64)
=================================================================
System uname: Darwin-11.2.0-x86_64-i386-64bit
Timestamp of tree: Wed, 25 Jan 2012 20:11:29 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin11.0 [disabled]
app-shells/bash:      4.2_p20
dev-java/java-config: 2.1.11-r3
dev-lang/python:      2.6.5-r2, 2.7.2-r3
dev-util/pkgconfig:   0.26
sys-devel/autoconf:   2.68
sys-devel/automake:   1.10.3, 1.11.1
sys-devel/gcc-config: 1.5-r2
sys-devel/libtool:    2.4-r4
sys-devel/make:       3.82
Repositories: gentoo_prefix local
Installed sets: @preserved-rebuild
ACCEPT_KEYWORDS="amd64 amd64-linux ppc-macos x64-macos x86 x86-linux x86-macos ~amd64 ~amd64-linux ~ppc-macos ~x64-macos ~x86 ~x86-linux ~x86-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin11"
CFLAGS="-O2 -fno-math-errno -march=core2 -msse4 -msse4.1 -msse4.2 -mfpmath=sse -pipe"
CHOST="x86_64-apple-darwin11"
CONFIG_PROTECT="/etc /opt/gentoo/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo /opt/gentoo/etc/ca-certificates.conf /opt/gentoo/etc/env.d /opt/gentoo/etc/env.d/java/ /opt/gentoo/etc/fonts/fonts.conf /opt/gentoo/etc/gconf /opt/gentoo/etc/revdep-rebuild /opt/gentoo/etc/terminfo"
CXXFLAGS="-O2 -fno-math-errno -march=core2 -msse4 -msse4.1 -msse4.2 -mfpmath=sse -pipe"
DISTDIR="/opt/gentoo/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles force-prefix metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-dead_strip_dylibs"
LINGUAS="en en_GB"
MAKEOPTS="-j5"
PKGDIR="/opt/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/opt/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/opt/gentoo/var/tmp"
PORTDIR="/opt/gentoo/usr/portage"
PORTDIR_OVERLAY="/opt/gentoo/usr/local/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X aqua ares bash-completion berkdb bzip2 cairo chroot common-lisp coreaudio cracklib cxx expat faac faad fftw flac fontconfig gdbm gmp graphviz gs gtk gtk3 hpn iconv icu idea idn ipv6 ithreads java jbig jpeg jpeg2k lcms libedit lzma md5sum mmap mmx mmxext modules mp3 ncurses network nls objc objc++ ogg opengl openmp pcre perl png prefix python rar readline sasl schroedinger slang sndfile speex spell sqlite sqlite3 sse sse2 ssl svg tcl theora threads tiff tk trace truetype unicode urandom utils vim-syntax vorbis wmf x64-macos xcb xinerama xml xpm xvid zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2012-01-26 12:15:45 UTC
Well, the error flood starts with:
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:311: err
or: stray '@' in program

which would suggest something already on your system is broken, but shortly before that there's:
make[2]: *** [glade.la] Illegal instruction: 4
which would suggest your CFLAGS are incorrect.
Try building with -j1' so you can see when exactly it breaks.
Comment 2 Stuart Shelton 2012-01-29 11:21:13 UTC
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h line 311 reads:

@class NSString, Protocol;

... which appears to be valid Objective-C, but not valid C.  I can't imagine that my header has been modified on my system, so can anyone confirm that this isn't a Lion/10.7.2 oversight?

My CFLAGS are '-O2 -fno-math-errno -march=core2 -msse4 -msse4.1 -msse4.2 -mfpmath=sse -pipe', targeted at a Core i7 processor.  The SSE options should only affect FP code.  I do see the occasional 'Illegal instruction' error, but only ever from make - and in every case re-running the same command has always succeeded.  This is weird, but something I've never got around to further diagnosing.
Comment 3 Stuart Shelton 2012-01-29 11:48:46 UTC
Created attachment 300239 [details]
Build error-log with MAKEOPTS="-j1"


I've now rebuilt 'make', and the instances of "Illegal instruction" have gone!  Perhaps the result of bad output from an older compiler version, or even an on-disk bit-flip...

To confirm, I'm running OS X 10.7.2 with Xcode 4.2.1 (build 5D502), and the md5sum of /System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h is 932a613856efa936581a8fe2150da949.

As requested, log when built with MAKEOPTS="-j1" - are the earlier 'Could not write method' lines usual when building pygtk?
Comment 4 Fabian Groffen gentoo-dev 2012-01-29 12:57:34 UTC
I think this framework shouldn't be compiled without objc.

I assume your compiler is objc-capable (unless you forcibly disabled that), so I guess pygtk should just use gcc -xobjc or something, but more probably it shouldn't include that header since it will only work from objc.
Comment 5 Rafał Mużyło 2012-01-30 14:09:09 UTC
As for "Illegal instruction" issue, see some of the comments in bug 396609...feel free to comment there.
It seems that for gcc i7 isn't simply <= core2, but a different thing altogether.
Comment 6 Stuart Shelton 2012-02-03 08:53:36 UTC
Sounds plausible regarding the framework...

I've commented on the 'Illegal Instruction' bug.  Whilst rebuilding make seems to have removed the 'Illegal instruction' when attempting to build pygtk, building the new version of gtk+ hit the same problem again (which also went away when running 'ebuild <path to ebuild> compile' after the failure).
Comment 7 Rafał Mużyło 2012-02-03 13:44:30 UTC
Well, obviously...

Illegal instruction errors in most cases come from incorrect C{XX}FLAGS, which means your system is *already* compromised.
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-02-03 13:54:18 UTC
I know nothing of cairo, osx, etc. But, I was talking to someone on IRC and they found this patch: https://gist.github.com/1170899 which SEEMS related to your bug, Stuart. Referenced on this page: http://irico.net/promenade.cgi?id=52

Not sure why it wasn't submitted to us? But, whatever. See if you can figure anything out! :)
Comment 9 Fabian Groffen gentoo-dev 2012-02-09 18:32:26 UTC
I doubt that patch has anything to do with this problem, but thanks for finding/reporting.

A problem might be that  -std=c9x  is passed onto gcc.  Not sure.
Comment 10 Norman Rieß 2012-02-10 16:41:47 UTC
I ran into the same error today.
Tried changing CFLAGS, but they where pretty conservative from the start.
Tried it without the msse4.1. CPU is a Core2Duo ULV.

This is a new install. Just changed the USE flags and did an emerge -puDN world.

Here is my emerge --info:

Portage 2.2.01.20153-prefix (prefix/darwin/macos/10.7/x64, gcc-4.2.1, unavailable, 11.3.0 x86_64)
=================================================================
System uname: Darwin-11.3.0-x86_64-i386-64bit
Timestamp of tree: Fri, 10 Feb 2012 09:42:13 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin11.0 [disabled]
app-shells/bash:      4.2_p20
dev-lang/python:      2.7.2-r3
dev-util/pkgconfig:   0.26
sys-devel/autoconf:   2.68
sys-devel/automake:   1.11.1
sys-devel/gcc-config: 1.5-r2
sys-devel/libtool:    2.4-r4
sys-devel/make:       3.82
Repositories: gentoo_prefix
Installed sets: 
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin11"
CFLAGS="-O2 -pipe -march=nocona -msse4.1"
CHOST="x86_64-apple-darwin11"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona -msse4.1"
DISTDIR="/Users/smash/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles force-prefix news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-dead_strip_dylibs"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/Users/smash/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/smash/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/smash/Gentoo/var/tmp"
PORTDIR="/Users/smash/Gentoo/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X aqua coreaudio cracklib cxx gnome gnutls gtk gtk2 gtk3 jpeg laptop matroska mjpeg mmx mmxext modules mp3 mpeg ncurses nls objc objc++ ogg png prefix readline sse sse2 ssl ssse3 theora threads unicode vorbis x264 x64-macos xvid zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 11 Norman Rieß 2012-02-11 11:27:47 UTC
Same error on a Core i5 Model.
Comment 12 Fabian Groffen gentoo-dev 2012-02-11 11:29:54 UTC
This bug is due to pygtk being quite antiquated.  It goes beyond our resources and capabilities to fix this.

We will likely mask this package on 10.7 (Lion) and up.
Comment 13 Guilherme Amadio gentoo-dev 2012-02-29 00:23:17 UTC
I used to have pygtk-2.22 on my system (OSX 10.7), but it could not
be upgraded because 2.24 didn't compile. Maybe it would be nice to have the
old 2.22 ebuild available in the tree for the people that make use of it.
I'd like to use it to compile matplotlib. (I am reinstalling my prefix).
Comment 14 Guilherme Amadio gentoo-dev 2012-03-02 03:20:41 UTC
If anyone needs pygtk on prefix, I grabbed the old files from sources.gentoo.org and put them on github:

https://github.com/amadio/portage/tree/master/dev-python/pygtk

It compiles ok for me (version 2.22.0-r1).

-Guilherme
Comment 15 Craxy Z 2012-07-13 10:10:03 UTC
Same with this

https://bugs.gentoo.org/show_bug.cgi?id=370079

I followed the patch presented in above bug report, and it works.
Comment 16 Guilherme Amadio gentoo-dev 2017-03-16 01:39:25 UTC
Fixed with https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45de86a213440aaf9e5cdee8c88e35d67d7778c1

commit 45de86a213440aaf9e5cdee8c88e35d67d7778c1
Author: Guilherme Amadio <amadio@gentoo.org>
Date:   Tue Mar 14 10:07:01 2017 -0300

    dev-python/pygtk: Fix build on macOS, bugs 370079 and 400843