Summary: | dev-python/pygtk-2.24.0-r2 fails to build on OS 10.7 with numerous errors | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Stuart Shelton <srcshelton> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | norman |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | OS X | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
dev-python/pygtk-2.24.0-r2 build log
Build error-log with MAKEOPTS="-j1" |
Description
Stuart Shelton
2012-01-26 00:38:02 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. /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. 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?
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. 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. 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). Well, obviously... Illegal instruction errors in most cases come from incorrect C{XX}FLAGS, which means your system is *already* compromised. 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! :) 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. 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 Same error on a Core i5 Model. 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. 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). 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 Same with this https://bugs.gentoo.org/show_bug.cgi?id=370079 I followed the patch presented in above bug report, and it works. 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 |