Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325771 - python 2.6.5-r2 and 3.1.2-r3 fail to compile with CFLAG -fopenmp
Summary: python 2.6.5-r2 and 3.1.2-r3 fail to compile with CFLAG -fopenmp
Status: RESOLVED DUPLICATE of bug 186316
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-26 21:11 UTC by Eric "me262" Mason
Modified: 2010-06-26 21:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric "me262" Mason 2010-06-26 21:11:57 UTC
CFLAG -fopenmp causes the following two python ebuilds to not compile.
Recommend a filter for said flag.

# emerge -pvuDN world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS   ] dev-lang/python-3.1.2-r3 [2.6.4-r1] USE="gdbm ipv6 ncurses readline sqlite ssl threads (wide-unicode) xml -build -doc -examples -tk -wininst" 0 kB
[ebuild     U ] dev-lang/python-2.6.5-r2 [2.6.4-r1] USE="gdbm ipv6 ncurses readline sqlite* ssl threads (wide-unicode) xml -berkdb -build -doc -examples -tk -wininst" 0 kB

Total: 2 packages (1 upgrade, 1 in new slot), Size of downloads: 0 kB

Reproducible: Always

Steps to Reproduce:
1.  enable -fopenmp in CFLAGS and USE flags mentioned in description.
2.  emerge -v1 python

CFLAGS="${CFLAGS} -fopenmp" emerge -v1 python
Actual Results:  
Linking failures on semaphore and pthreads functions. (This is within a few minutes of compilation.

x86_64-pc-linux-gnu-gcc -pthread -Wl,-O1 -L. -Xlinker -export-dynamic -o python \
                        Modules/python.o \
                        -L. -lpython3.1 -lpthread -ldl  -lutil   -lm
./libpython3.1.so: undefined reference to `sem_init'
./libpython3.1.so: undefined reference to `pthread_attr_setstacksize'
./libpython3.1.so: undefined reference to `sem_destroy'
./libpython3.1.so: undefined reference to `pthread_create'
./libpython3.1.so: undefined reference to `sem_post'
./libpython3.1.so: undefined reference to `sem_trywait'
./libpython3.1.so: undefined reference to `pthread_detach'
./libpython3.1.so: undefined reference to `sem_wait'
collect2: ld returned 1 exit status

Expected Results:  
Successful compilation.

***
Compilation was tested using the following CFLAGS on the command line:
CFLAGS="-march=core2 -msse3 -O2 -pipe -fomit-frame-pointer"
***

# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-x86_64-Intel-R-_Core-TM-2_CPU_4300_@_1.80GHz-with-gentoo-1.12.13
Timestamp of tree: Sat, 26 Jun 2010 17:00:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse3 -O2 -pipe -fomit-frame-pointer -fopenmp -fvect-cost-model -ftree-vectorize -ftree-vectorizer-verbose=2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -msse3 -O2 -pipe -fomit-frame-pointer -fopenmp -fvect-cost-model -ftree-vectorize -ftree-vectorizer-verbose=2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 ao bzip2 cairo cli cracklib crypt cups cxx dbus dv dvd encode exif faac faad ffmpeg flac gdbm gpm gsm hal iconv id3tag ieee1394 ipv6 java6 jpeg jpeg2k kde lua mad mmap mmx mng modules mp3 mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl phonon png pppd python qt qt3support qt4 readline reflection samba scanner sdl semantic-desktop session sndfile speex spell spl sse sse2 sse3 ssl ssse3 svg sysfs taglib tcpd theora threads tiff unicode v4l v4l2 vorbis wavpack x264 xcb xcomposite xorg xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-06-26 21:42:42 UTC
bug 186311 and bug 186316

don't set silly flags, thanks

*** This bug has been marked as a duplicate of bug 186316 ***