Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 143661

Summary: sci-visualization/xgraph-12.1-r2 completely ignores user's CFLAGS
Product: Gentoo Linux Reporter: Ferris McCormick (RETIRED) <fmccor>
Component: New packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: minor CC: bicatali
Priority: Normal    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 59506    

Description Ferris McCormick (RETIRED) gentoo-dev 2006-08-12 05:46:50 UTC
sci-visualization/xgraph-12.1-r1 completely ignores CFLAGS set in /etc/make.conf.  For example, on this particular system, my
CFLAGS="-mcpu=ultrasparc -O2 -mtune=ultrasparc -pipe"
but xgrapf builds like this:
gcc -DHAVE_CONFIG_H -I. -I. -I.        -g    -c xgraph.c
This is almost always improper behavior unless there are good reasons for it.

Please see https://bugs.gentoo.org/show_bug.cgi?id=59506 for a discussion.
Comment 1 Markus Dittrich (RETIRED) gentoo-dev 2006-08-12 07:18:26 UTC
Hi Ferris,

Thanks for noticing this:) I've just committed a patch for
the makefile that fixes this for me on x86. Could you please
see if it works for you as well.

Thanks,
Markus
Comment 2 Ferris McCormick (RETIRED) gentoo-dev 2006-08-12 08:38:19 UTC
Works fine for me.  Thanks; so far as I am concerned, this is fixed.
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2006-08-12 09:26:39 UTC
Good and thanks for testing. I'll close this bug then.
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2009-05-24 16:09:37 UTC
It's broken again. And won't compile anymore.

Please readd the gentoo-makefile patch. Dunno if that's the cause of it failing, but i suspect the debian patch. Sebastian, can you clarify?

This is a ~x86 system, compiling with gcc-4.1.2, glibc-2.10.1

The compile error is this:
xgraph.c: In function 'main':
xgraph.c:217: warning: operation on 'param_temp_ptr' may be undefined

Repeated in several functions multiple times.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2009-05-24 16:16:54 UTC
(In reply to comment #4)
> It's broken again. And won't compile anymore.
> 
> Please readd the gentoo-makefile patch. Dunno if that's the cause of it
> failing, but i suspect the debian patch. Sebastian, can you clarify?
> 
> This is a ~x86 system, compiling with gcc-4.1.2, glibc-2.10.1
> 
> The compile error is this:
> xgraph.c: In function 'main':
> xgraph.c:217: warning: operation on 'param_temp_ptr' may be undefined
> 
> Repeated in several functions multiple times.
> 

We need a build log.
Comment 6 leexiaofeng 2009-05-27 16:23:53 UTC
this is my build.log
------------------------------
>>> Unpacking source...
>>> Unpacking xgraph_12.1-10.diff.gz to /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work
>>> Unpacking xgraph-12.1.tar.gz to /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work
>>> Source unpacked in /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work
>>> Preparing source in /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1 ...
 * Applying xgraph_12.1-10.diff ...                                       [ ok ]
 * Running eautoreconf in '/var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1' ...
 * Running aclocal ...                                                    [ ok ]
 * Running autoconf ...                                                   [ ok ]
 * Running autoheader ...                                                 [ ok ]
 * Running automake --add-missing --copy --foreign ...                    [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1 ...
 * econf: updating xgraph-12.1/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating xgraph-12.1/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1/missing: Unknown `--run' option
Try `/var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking if malloc debugging is wanted... no
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i686-pc-linux-gnu-gcc... gcc3
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strcasecmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating autoconf.h
config.status: executing depfiles commands
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1 ...
make -j3 
cd . && autoheader
rm -f stamp-h1
touch autoconf.h.in
cd . && /bin/sh ./config.status autoconf.h
config.status: creating autoconf.h
config.status: autoconf.h is unchanged
make  all-am
make[1]: Entering directory `/var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1'
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.       -Wall -g    -MT xgraph.o -MD -MP -MF .deps/xgraph.Tpo -c -o xgraph.o xgraph.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.       -Wall -g    -MT xgX.o -MD -MP -MF .deps/xgX.Tpo -c -o xgX.o xgX.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I.       -Wall -g    -MT hard_devices.o -MD -MP -MF .deps/hard_devices.Tpo -c -o hard_devices.o hard_devices.c
In file included from xgraph.h:217,
                 from xgraph.c:33:
dialog.h:2: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: error: previous declaration of ‘getline’ was here
xgraph.c: In function ‘main’:
xgraph.c:217: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:217: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:222: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:222: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:222: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:294: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:294: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:294: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c:303: warning: operation on ‘param_temp_ptr’ may be undefined
xgraph.c: In function ‘Traverse’:
xgraph.c:463: warning: format not a string literal and no format arguments
xgraph.c:475: warning: format not a string literal and no format arguments
xgraph.c: In function ‘NewWindow’:
xgraph.c:834: warning: unused variable ‘dx_frame’
xgraph.c:833: warning: unused variable ‘rp_frame’
xgraph.c:832: warning: unused variable ‘rw_frame’
xgraph.c: In function ‘HandleZoom’:
xgraph.c:1029: warning: operation on ‘param_temp_ptr’ may be undefined
make[1]: *** [xgraph.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from xgraph.h:217,
                 from params.h:9,
                 from hard_devices.c:23:
dialog.h:2: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: error: previous declaration of ‘getline’ was here
make[1]: *** [hard_devices.o] Error 1
In file included from xgraph.h:217,
                 from params.h:9,
                 from xgX.c:16:
dialog.h:2: error: conflicting types for ‘getline’
/usr/include/stdio.h:651: error: previous declaration of ‘getline’ was here
xgX.c: In function ‘seg_X’:
xgX.c:392: warning: operation on ‘param_temp_ptr’ may be undefined
xgX.c:397: warning: operation on ‘param_temp_ptr’ may be undefined
xgX.c:405: warning: operation on ‘param_temp_ptr’ may be undefined
xgX.c:410: warning: operation on ‘param_temp_ptr’ may be undefined
make[1]: *** [xgX.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/sci-visualization/xgraph-12.1-r2/work/xgraph-12.1'
make: *** [all] Error 2
 * 
 * ERROR: sci-visualization/xgraph-12.1-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2669:  Called _eapi2_src_compile
 *               ebuild.sh, line  634:  Called die
 * The specific snippet of code:
 *   		emake || die "emake failed"
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sci-visualization/xgraph-12.1-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-visualization/xgraph-12.1-r2/temp/environment'.
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2009-05-27 18:53:57 UTC
So this a glibc-2.10 error (getline conflict) which is another issue. Please provide emerge --info so that we can have a look at the other settings, because it looks like the CFLAGS, if set, aren't respected.
Comment 8 leexiaofeng 2009-05-29 11:45:49 UTC
(In reply to comment #7)
> So this a glibc-2.10 error (getline conflict) which is another issue. Please
> provide emerge --info so that we can have a look at the other settings, because
> it looks like the CFLAGS, if set, aren't respected.
> 

# emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.28-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3600+-with-gentoo-2.0.1
Timestamp of tree: Fri, 29 May 2009 03:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.8
dev-lang/python:     2.5.4-r2, 2.6.2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
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/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://61.135.158.199"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="zh_CN"
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://61.135.158.199/gentoo-portage"
USE="X acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif glitz gnome gpm gstreamer gtk hal iconv isdnlog jpeg ldap libnotify mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 leexiaofeng 2009-05-29 11:59:24 UTC
Sorry for my poor english.
I commented getline in the stdio.h and emerge xgraph, compile success.

Thanks. 
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2009-05-29 13:21:28 UTC
(In reply to comment #9)
> Sorry for my poor english.
> I commented getline in the stdio.h and emerge xgraph, compile success.
> 
> Thanks. 
> 

please open a new bug and report your problem there with the getline thing.
Comment 11 Sébastien Fabbro (RETIRED) gentoo-dev 2010-01-06 01:21:30 UTC
fixed in cvs.