Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351344 - sys-cluster/openmpi-1.4.3 strips '--' from --param arg to GCC when multiple --param args are specified
Summary: sys-cluster/openmpi-1.4.3 strips '--' from --param arg to GCC when multiple -...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 22:48 UTC by Joshua Rich
Modified: 2011-05-14 14:37 UTC (History)
2 users (show)

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


Attachments
portage build.log.gz (build.log.gz,4.05 KB, application/octet-stream)
2011-01-10 22:50 UTC, Joshua Rich
Details
configure config.log (config.log,174.57 KB, text/plain)
2011-01-10 22:50 UTC, Joshua Rich
Details
portage environment (environment,100.90 KB, text/plain)
2011-01-10 22:51 UTC, Joshua Rich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Rich 2011-01-10 22:48:02 UTC
When CFLAGS contains multiple --param arguments (e.g. --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512), the '--' from all but the first --param argument are stripped/mangled somewhere by the 'configure' script such that a subsequent test requiring a compile fails.

In the attached configure log, it can be seen that the following test shows the '--' stripped from the additional --param args:

checking for C optimization flags... -DNDEBUG -O2 -pipe -march=amdfam10 -floop-interchange -floop-strip-mine -floop-block --param l1-cache-size=64 l1-cache-line-size=64 l2-cache-size=512 -finline-functions -fno-strict-aliasing

A subsequent test requiring compilation of a test program then fails with these mangled flags:

checking alignment of char... configure: WARNING: *** Problem running configure test!
configure: WARNING: *** See config.log for details.
configure: error: *** Cannot continue.



Reproducible: Always




Portage 2.2.0_alpha14 (default/linux/amd64/10.0, gcc-4.5.2, glibc-2.12.2-r0, 2.6.36-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r3-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_8360_SE-with-gentoo-2.0.1
Timestamp of tree: Sun, 09 Jan 2011 21:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r1::sage-on-gentoo, 3.1.3
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.8
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.68
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.4.5, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo ephemeral science sage-on-gentoo MSI-Local-Cluster-related-Ebuilds
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=amdfam10 -floop-interchange -floop-strip-mine -floop-block --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=amdfam10 -floop-interchange -floop-strip-mine -floop-block --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs buildpkg compress-build-logs distcc distlocks fakeroot fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=amdfam10 -floop-interchange -floop-strip-mine -floop-block --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512"
GENTOO_MIRRORS="ftp://mirror.aarnet.edu.au/pub/gentoo ftp://mirror.internode.on.net/pub/gentoo ftp://ftp.swin.edu.au/gentoo"
LANG="en_AU.utf8"
LC_ALL="en_AU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common"
LINGUAS="en en_AU"
MAKEOPTS="-j17"
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/layman/ephemeral /usr/local/layman/science /usr/local/layman/sage-on-gentoo /usr/local/overlays/msi-cluster"
SYNC="rsync://mirror.internode.on.net/gentoo-portage/"
USE="acl amd64 bash-completion berkdb blas bzip2 cli cracklib crypt cups cxx dri fam fbcon fftw fortran gdbm gmp gpm gzip iconv icu jpeg lapack latex ldap lzma mmx modules mpi mudflap multilib ncurses nls nptl nptlonly openmp pam pcre pdf perl png pppd python readline session sqlite sqlite3 sse sse2 sse3 ssl ssse3 svg sysfs tcpd threads tiff truetype unicode xorg xpm 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 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_AU" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa radeon" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Joshua Rich 2011-01-10 22:50:11 UTC
Created attachment 259508 [details]
portage build.log.gz
Comment 2 Joshua Rich 2011-01-10 22:50:44 UTC
Created attachment 259509 [details]
configure config.log
Comment 3 Joshua Rich 2011-01-10 22:51:24 UTC
Created attachment 259510 [details]
portage environment
Comment 4 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-01-11 08:19:16 UTC
Well, 

1) This is not a gentoo bug. You should report this upstream.
2) Why do you have to use all these custom cflags? unless you're doing some exotic custom test case, you shouldn't. 

As a start, I don't want to bother our maintainers with this. I'll resolve it as UPSTREAM. If you still insist that they should be notified for a reason, you're free to reopen it. 
Comment 5 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-01-11 08:25:25 UTC
This can also easily be duplicate of bug #324697 .
Comment 6 Joshua Rich 2011-01-11 09:22:30 UTC
Bug filed upstream:

https://svn.open-mpi.org/trac/ompi/ticket/2684

For reference, removing the graphite optimisation flags would make no difference to the output.  I'd hardly call flags besides the '--param' ones "custom", as they are the recommended ones.  I specify the architecture with the "-march" flag here as I'm using distcc.  All these "custom" flags are used because this machine is being used for high-performance mathematical computations.  Note that doesn't imply high-stability.

Thanks and regards,

Joshua Rich

(In reply to comment #4)
> Well, 
> 
> 1) This is not a gentoo bug. You should report this upstream.
> 2) Why do you have to use all these custom cflags? unless you're doing some
> exotic custom test case, you shouldn't. 
> 
> As a start, I don't want to bother our maintainers with this. I'll resolve it
> as UPSTREAM. If you still insist that they should be notified for a reason,
> you're free to reopen it. 
> 

Comment 7 Andrew Savchenko gentoo-dev 2011-05-14 14:37:21 UTC
I should add that --param $val=$arg has nothing to do with "unstable" or "unsafe" flags. There is no other way to use distcc to compile a program for the specific processor on hosts with a different CPU.

You may consider that -m(32|64) -march=$arch --param $arg=$val ... is a replacement for -march=native.