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

Bug 252623

Summary: sci-electronics/systemc-2.2.0 fails to compile with gcc 4.3
Product: Gentoo Linux Reporter: David Kredba <kredba>
Component: Current packagesAssignee: The Soldering-Iron Brotherhood <sci-electronics>
Status: RESOLVED FIXED    
Severity: normal CC: aucampia, esigra
Priority: High    
Version: 2008.0   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 198121    
Attachments: patch for gcc 4.3
ebuild to go along with the gcc 4.3 patch

Description David Kredba 2008-12-26 17:42:47 UTC
Sci-electronics/systemc-2.2.0 fails to compile with message:

Making all in utils                                                                                                                                                                                                                         
make[2]: Entering directory `/var/tmp/portage/sci-electronics/systemc-2.2.0/work/systemc-2.2.0/src/sysc/utils'                                                                                                                              
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_hash.o `test -f 'sc_hash.cpp' || echo './'`sc_hash.cpp                                                             
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_list.o `test -f 'sc_list.cpp' || echo './'`sc_list.cpp                                                             
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_mempool.o `test -f 'sc_mempool.cpp' || echo './'`sc_mempool.cpp                                                    
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_pq.o `test -f 'sc_pq.cpp' || echo './'`sc_pq.cpp                                                                   
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_report.o `test -f 'sc_report.cpp' || echo './'`sc_report.cpp                                                       
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_report_handler.o `test -f 'sc_report_handler.cpp' || echo './'`sc_report_handler.cpp                               
g++ -I. -I../../../src    -Wall -DSC_INCLUDE_FX -g -c sc_stop_here.cpp                                                                                                                                                                      
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_string.o `test -f 'sc_string.cpp' || echo './'`sc_string.cpp                                                       
g++ -I. -I. -I. -I../../../src    -Wall -DSC_INCLUDE_FX -O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1 -c -o sc_utils_ids.o `test -f 'sc_utils_ids.cpp' || echo './'`sc_utils_ids.cpp                                              
sc_utils_ids.cpp: In function 'int sc_core::initialize()':                                                                                                                                                                                  
sc_utils_ids.cpp:110: error: 'getenv' is not a member of 'std'                                                                                                                                                                              
sc_utils_ids.cpp:111: error: 'strcmp' was not declared in this scope                                                                                                                                                                        
sc_utils_ids.cpp: At global scope:                                                                                                                                                                                                          
sc_utils_ids.cpp:119: warning: 'sc_core::forty_two' defined but not used                                                                                                                                                                    
make[2]: *** [sc_utils_ids.o] Error 1                                                                                                                                                                                                       
make[2]: *** Waiting for unfinished jobs....                                                                                                                                                                                                
make[2]: Leaving directory `/var/tmp/portage/sci-electronics/systemc-2.2.0/work/systemc-2.2.0/src/sysc/utils'                                                                                                                               
make[1]: *** [all-recursive] Error 1                                                                                                                                                                                                        
make[1]: Leaving directory `/var/tmp/portage/sci-electronics/systemc-2.2.0/work/systemc-2.2.0/src/sysc'                                                                                                                                     
make: *** [all-recursive] Error 1

Reproducible: Always

Steps to Reproduce:
1. Try to emerge sci-electronics/systemc-2.2.0 on ~amd64.
2.
3.

Actual Results:  
Fails to compile with message: sc_utils_ids.cpp: In function 'int sc_core::initialize()':                                                                                                                                                                                  
sc_utils_ids.cpp:110: error: 'getenv' is not a member of 'std'                                                                                                                                                                              
sc_utils_ids.cpp:111: error: 'strcmp' was not declared in this scope                                                                                                                                                                        


Expected Results:  
Compiles fine.



emerge --info                                 
Portage 2.1.6.3 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.28-gentoo x86_64)
=================================================================                                            
System uname: Linux-2.6.28-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8200_@_2.66GHz-with-glibc2.2.5          
Timestamp of tree: Fri, 26 Dec 2008 17:05:01 +0000                                                           
app-shells/bash:     3.2_p48                                                                                 
dev-java/java-config: 1.3.7-r1, 2.1.6-r1                                                                     
dev-lang/python:     2.5.2-r8                                                                                
dev-util/cmake:      2.6.2                                                                                   
sys-apps/baselayout: 2.0.0                                                                                   
sys-apps/openrc:     0.4.1                                                                                   
sys-apps/sandbox:    1.3.2                                                                                   
sys-devel/autoconf:  2.13, 2.63                                                                              
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                       
sys-devel/binutils:  2.19                                                                                    
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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 /etc/udev/rules.d"
CXXFLAGS="-O2 -g -pipe -mtune=core2 -march=core2 -mssse3 -msse4.1"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages nostrip parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.tiscali.nl/ http://gentoo.inode.at/ http://gentoo.lagis.at/ http://gentoo.mirror.web4u.cz/"
LDFLAGS="-Wl,-O1"
LINGUAS="cs en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 arts berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus doc dri dvd dvdr dvdread eds emboss encode esd evo examples fam fftw firefox fltk fortran gdbm gif gimp gmp gnome gpm gs gstreamer gtk hal htmlhandbook iconv idn isdnlog ithreads java jpeg kde kdeprefix lapack latex ldap libedit libnotify mad mbox midi mikmod mmx mp3 mpeg mudflap multilib nautilus ncurses nls nptl nptlonly nsplugin objc objc++ objc-gc ogg opengl openmp pam pch pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sasl sdl session slang spell spl sse sse2 ssl startup-notification svg sysfs tcl tcpd threads tiff tk truetype unicode usb vorbis wxwindows xattr xcb xcomposite xinerama xml xorg xulrunner xv 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" CAMERAS="sony_dscf1 sony_dscf55" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="cs en" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv radeon savage sis tdfx trident vesa vga via vmware voodoo nvidia v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Wormo (RETIRED) gentoo-dev 2008-12-27 06:00:19 UTC
Looks like systemc needs some gcc 4.3 fixes (the undeclared strcmp is a dead giveaway). Assigning to maintainers.
Comment 2 Gene Seto 2009-01-17 21:25:45 UTC
Created attachment 178825 [details, diff]
patch for gcc 4.3

This should fix it :)
Comment 3 Gene Seto 2009-01-17 21:27:05 UTC
Created attachment 178826 [details]
ebuild to go along with the gcc 4.3 patch

added epatch line to the ebuild
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2009-02-15 23:32:48 UTC
i'll leave sci-electronics to fix this.  i don't feel like signing up to download the source.
Comment 5 Mark Loeser (RETIRED) gentoo-dev 2009-06-29 00:55:40 UTC
Can someone from sci-electronics please apply this?  I'm not jumping through the hoops and registering to verify the patch :)

Thanks
Comment 6 Denis Dupeyron (RETIRED) gentoo-dev 2009-06-29 01:29:11 UTC
(In reply to comment #5)
> Can someone from sci-electronics please apply this?  I'm not jumping through
> the hoops and registering to verify the patch :)

if [[ "sci-electronics" == "calchan" && "calchan" == "on dialup" ]
then
    echo "Please wait..."
fi

return 0
Comment 7 Denis Dupeyron (RETIRED) gentoo-dev 2009-07-11 16:20:19 UTC
*** Bug 273245 has been marked as a duplicate of this bug. ***
Comment 8 Denis Dupeyron (RETIRED) gentoo-dev 2009-07-11 18:06:00 UTC
OK, I have finally fixed this, sorry for the delay. Thanks Gene for the patch (which I have applied using sed but it's the same thing). I have tested with gcc 4.4 and glibc 2.10 so that should keep us out of trouble for a good while.

I have also fixed the executable stack issues and since it's assembler make sure you test thoroughly. I'll leave the old ebuild in there for some time just in case.

Denis.