Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292991 - profile support on hardened (net-analyzer/wireshark: configuration fails when emerging with USE=gtk
Summary: profile support on hardened (net-analyzer/wireshark: configuration fails when...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-13 08:26 UTC by Peter Volkov (RETIRED)
Modified: 2010-01-27 10:15 UTC (History)
2 users (show)

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


Attachments
build log, compressed since it's 2.5MiB otherwise. (net-analyzer:wireshark-1.2.5:20100127-010949.log.lzma,73.94 KB, application/octet-stream)
2010-01-27 01:42 UTC, Daniel Santos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2009-11-13 08:26:44 UTC
+++ This bug was initially created as a clone of Bug #215806 +++'

Attempts to build wireshark with profile support fail on hardened with an error:
x86_64-pc-linux-gnu-gcc: -pie and -pg|p|profile are incompatible

Since hardened became much less usable without -pie what shall we do here?

use profile && append-flags -nopie
or
mask profile USE flag in hardened profiles?

I don't like first since it makes lot's of warnings on non-hardened systems:
x86_64-pc-linux-gnu-gcc: unrecognized option '-nopie'
Also use of hardened USE flag here is not best choice:
global:hardened: activate default security enhancements for toolchain (gcc, glibc, binutils)

so I'm really inclined to mask profile USE flag for wireshark. But what hardened guys think on this?


==============================================================================

Error message:

checking for GTK+ - version >= 2.4.0... no                                      
*** Could not run GTK+ test program, checking why...                            
*** The test program failed to compile or link. See the file config.log for the 
*** exact error that occured. This usually means GTK+ is incorrectly installed. 
configure: error: GTK+ 2.4 or later isn't available, so Wireshark can't be
compiled                                                                        

config.log: https://bugs.gentoo.org/attachment.cgi?id=210058&action=view


# emerge --info
Portage 2.2_rc46 (hardened/linux/amd64/10.0/no-multilib, gcc-4.4.2,
glibc-2.10.1-r0, 2.6.31.1-grsec x86_64)
=================================================================
System uname:
Linux-2.6.31.1-grsec-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 27 Oct 2009 19:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -floop-interchange -floop-strip-mine
-floop-block"
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/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/
/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/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -floop-interchange -floop-strip-mine
-floop-block"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages metadata-transfer news
parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs
unmerge-orphans userfetch"
Comment 1 Gordon Malm (RETIRED) gentoo-dev 2009-11-13 17:54:38 UTC
Hi Peter,

How about:
use profile && append-flags $(test-flags-CC -nopie)

I would prefer a warning too if that's ok, to the effect:
elog/ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2009-11-14 11:26:42 UTC
(In reply to comment #1)
> How about:
> use profile && append-flags $(test-flags-CC -nopie)

This does not make warning go away, but since I'm not sure if all compilers support -nopie I'll user test-flags-CC anyway.

> I would prefer a warning too if that's ok, to the effect:
> elog/ewarn "You've enabled the 'profile' USE flag, building PIE binaries is
> disabled."

Both your suggestions added. Thank you Gordon for help.
Comment 3 Daniel Santos 2010-01-27 01:42:04 UTC
Created attachment 217528 [details]
build log, compressed since it's 2.5MiB otherwise.

This bug is marked as fixed, but the version the problem is fixed in is not indicated.  Can you please indicate the version this is fixed in.  My build (v1.2.5) is still failing. I'm using ACCEPT_KEYWORDS="amd64", with various "~amd64" added in /etc/portage/package.keywords.  I am not seeing any message in the failure that tells me to disable the "profile" use flag (which I only have enabled globally so I can get more accurate profiling info when optimizing apps that have linked in a lot of other libraries).

I don't need it for wirewshark, so my solution is to disable it, but it would be nice if I didn't have to find this bug report to determine the cause and solution.


Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 x86_64)
=================================================================                                       
System uname: Linux-2.6.31-gentoo-r6-x86_64-AMD_Phenom-tm-_9850_Quad-Core_Processor-with-gentoo-1.12.13 
Timestamp of tree: Mon, 25 Jan 2010 14:00:01 +0000                                                      
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                               
ccache version 2.4 [enabled]                                                                            
app-shells/bash:     4.0_p35                                                                            
dev-java/java-config: 2.1.9-r2                                                                          
dev-lang/python:     2.6.4                                                                              
dev-util/ccache:     2.4-r7                                                                             
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.63-r1                                                                      
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2                                                         
sys-devel/binutils:  2.18-r3                                                                            
sys-devel/gcc-config: 1.4.1                                                                             
sys-devel/libtool:   2.2.6b                                                                             
virtual/os-headers:  2.6.27-r2                                                                          
ACCEPT_KEYWORDS="amd64"                                                                                 
CBUILD="x86_64-pc-linux-gnu"                                                                            
CFLAGS="-march=amdfam10 -O2 -ggdb"                                                                      
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/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/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="-march=amdfam10 -O2 -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages installsources parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.cs.wmich.edu/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ http://osmirrors.cerias.purdue.edu/pub/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en_US en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
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 --exclude '/lost+found'"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/kde-sunset"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 64bit 7zip X Xaw3d a52 aac aalib acl acpi aim aio akode alsa amd64 amr ao aotuv apache2 applet ares arts async audacious audiofile authdaemond authfile autoipd automount bash-completion berkdb binfilter bittorrent bl bluetooth bonjour boost branding bsf bzip2 c3p0 cairo calendar cdaudio cdb cdda cddb cdparanoia cdr cegui cg cgi chm cjk cli commons-digester console consolekit cpufreq cpulimit cracklib crypt cscope css cups curl curlwrappers custom-optimization cvs cxx dbus dedicated devil dga dirac directfb divx djbfft djvu dmx dns dolby-record-switch dri dtmf dts dv dvb dvd dvdr editor eds emboss emoticon encode enscript evo excel exif expat extraicons faac faad fam fasttrack fax fbcon ffmpeg fftw firefox fits flac flash fltk fluidsynth fmod font-server fontconfig fontforge foomaticdb fortran fping fpx ftp fuse fusion gadu gcj gd gdbm geos ggi gif ginac git glib glitz glut gmedia gmp gmtfull gnokii gnome gnutella gnutls gphoto2 gpm gps graphviz gs gsl gsm gstreamer gtk gzip h323 hal hddtemp html htmlhandbook hwmixer icecast iceweasel iconv icq icu id3 id3tag idn ieee1394 ilbc imagemagick imap imlib inifile irc irda irrlicht jabber jack jadetex java java5 java6 javascript jbig jce jingle jmx joystick jpeg jpeg2k kde kdrive kpathsea lame latex lcms ldap libcaca libnotify libsamplerate libvisual libwww lirc live lm_sensors log4j logitech-mouse lua lzma lzo mad maildir maps math md5sum meanwhile midi mikmod mime mjpeg mmap mmkeys mmx mmxext mng modperl modplug modules motif mouse mozdevelop mozilla mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer msn mtp mudflap multicall multilib multislot multitarget musepack music musicbrainz mysql mysqli mythtv nas ncurses net netjack network njb nls nntp nptl nptlonly nsplugin nss nvidia nvtv ode odk offensive ogg openal openexr opengl openmp oscar otr pam pango pch pcntl pcre pda pdf perl php player plotutils png portaudio posix postproc ppds pppd profile python qq qt3support qt4 quicktime radio rar raw readline reflection rrdcgi rss rtc ruby samba sametime sasl scanner schroedinger sdl sdl-image sdl-sound sensord session sharedext silc sip slp smp smtp sndfile snmp soap sockets sound speex spell spl sql sqlite sqlite3 sse sse2 sse3 ssl startup-notification stream subtitles subversion suexec svg sysfs syslog sysvipc t1lib tagwriting tcl tcpd test tga theora threads thumbnail thunar tidy tiff timidity tk tokenizer tools transcode translator trayicon truetype tse3 twolame unicode upnp urandom usb userlocales v4l v4l2 vcd vdpau vdr vhosts videos vim-syntax vim-with-x visualization vorbis vorbis-psy vxml wav wavpack webdav wifi wma wmf wxwidgets wxwindows x264 xanim xattr xcb xcomposite xface xforms xft xine xinerama xinetd xml xmlreader xmlrpc xmlwriter xorg xpm xprint xscreensaver xsl xulrunner xv xvid xvmc yaepg yahoo yv12 zeroconf zip 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 auth_digest authn_alias authn_dbd 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 dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias substitute" ELIBC="glibc" FOO2ZJS_DEVICES="hpp1006" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2010-01-27 10:15:20 UTC
Daniel, x86_64-pc-linux-gnu-gcc: unrecognized option '-nopie' is just a warning and does not cause build to fail. Your problem is:

libtool: link: cannot find the library `/usr/lib64/libGL.la' or unhandled argument `/usr/lib64/libGL.la'
make[2]: *** [wireshark] Error 1
make[2]: *** Waiting for unfinished jobs....

Try revdep-rebuild to fix this issue.