Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492912 - media-libs/mesa-9.2.4[llvm]: compile fails on Gentoo/FreeBSD, (.text+0x1113): undefined reference to `environ'
Summary: media-libs/mesa-9.2.4[llvm]: compile fails on Gentoo/FreeBSD, (.text+0x1113):...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-30 03:16 UTC by Yuta SATOH
Modified: 2015-02-21 19:23 UTC (History)
1 user (show)

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 Yuta SATOH 2013-11-30 03:16:43 UTC
The following message is displayed and fails to compile.
workaround, please set USE=-llvm.

<snip>
libtool: link: x86_64-gentoo-freebsd10.0-g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../crti.o /usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/crtbeginS.o  .libs/egl.o .libs/egl_pipe.o .libs/egl_st.o  -Wl,--whole-archive ../../../../src/gallium/auxiliary/.libs/libgallium.a ../../../../src/gallium/drivers/identity/.libs/libidentity.a ../../../../src/gallium/drivers/trace/.libs/libtrace.a ../../../../src/gallium/drivers/rbug/.libs/librbug.a ../../../../src/gallium/state_trackers/egl/.libs/libegl.a ../../../../src/gallium/winsys/sw/xlib/.libs/libws_xlib.a ../../../../src/mesa/.libs/libmesagallium.a ../../../../src/gallium/drivers/softpipe/.libs/libsoftpipe.a ../../../../src/gallium/drivers/llvmpipe/.libs/libllvmpipe.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/var/tmp/portage/media-libs/mesa-9.2.4/work/Mesa-9.2.4-amd64_fbsd/src/egl/main/.libs -Wl,-rpath -Wl,/var/tmp/portage/media-libs/mesa-9.2.4/work/Mesa-9.2.4-amd64_fbsd/src/mapi/shared-glapi/.libs -L/usr/lib/llvm ../../../../src/egl/main/.libs/libEGL.so -lX11-xcb -lxcb-dri2 -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lpthread-stubs -lXau -lXdmcp -lX11 -lXext -lXfixes -ldrm ../../../../src/mapi/shared-glapi/.libs/libglapi.so -lz -lpthread -lffi -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -L/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2 -L/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../../x86_64-gentoo-freebsd10.0/lib -L/usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/crtendS.o /usr/lib/gcc/x86_64-gentoo-freebsd10.0/4.8.2/../../../crtn.o  -O2 -Wl,--no-undefined -Wl,--allow-multiple-definition -Wl,-R -Wl,/usr/lib/llvm   -pthread -Wl,-soname -Wl,egl_gallium.so -o .libs/egl_gallium.so
/usr/lib/llvm/libLLVMSupport.a(Program.o): In function `llvm::sys::Program::Execute(llvm::sys::Path const&, char const**, char const**, llvm::sys::Path const**, unsigned int, std::string*)':
(.text+0x1113): undefined reference to `environ'
collect2: error: ld returned 1 exit status
Makefile:848: recipe for target 'egl_gallium.la' failed
gmake[3]: *** [egl_gallium.la] Error 1
gmake[3]: Leaving directory '/var/tmp/portage/media-libs/mesa-9.2.4/work/Mesa-9.2.4-amd64_fbsd/src/gallium/targets/egl-static'
Makefile:574: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/var/tmp/portage/media-libs/mesa-9.2.4/work/Mesa-9.2.4-amd64_fbsd/src/gallium/targets'
Makefile:551: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/var/tmp/portage/media-libs/mesa-9.2.4/work/Mesa-9.2.4-amd64_fbsd/src'
Makefile:602: recipe for target 'all-recursive' failed
gmake: *** [all-recursive] Error 1
 * ERROR: media-libs/mesa-9.2.4::gentoo failed (compile phase):
 *   emake failed
 *


Reproducible: Always

Steps to Reproduce:
1. emerge mesa
2.
3.





# emerge --info mesa
Portage 2.2.7 (default/bsd/fbsd/amd64/9.1, gcc-4.8.2, freebsd-lib-10.0_beta3, 10.0_beta3-Gentoo amd64)
=================================================================
                         System Settings
=================================================================
System uname: FreeBSD-10.0_beta3-Gentoo-amd64-64bit-ELF
KiB Mem:    16753920 total
KiB Swap:    8387544 total
Timestamp of tree: Sat, 30 Nov 2013 02:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:         4.2_p45
dev-lang/python:         2.7.5-r4, 3.2.5-r3, 3.3.3
dev-util/cmake:          2.8.12.1-r1
dev-util/pkgconfig:      0.28
sys-apps/baselayout:     2.2
sys-apps/openrc:         0.12.4
sys-devel/autoconf:      2.69
sys-devel/automake:      1.9.6-r3, 1.11.6, 1.13.4, 1.14
sys-devel/binutils:      2.23.2
sys-devel/gcc:           4.6.4, 4.8.2
sys-devel/gcc-config:    1.8
sys-devel/libtool:       2.4.2
sys-devel/make:          4.0
sys-freebsd/freebsd-lib: 10.0_beta3::gentoo-bsd (virtual/os-headers)
Repositories: gentoo gentoo-bsd fix10
ACCEPT_KEYWORDS="amd64-fbsd ~amd64-fbsd"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-freebsd10.0"
CFLAGS="-O2 -pipe -ggdb"
CHOST="x86_64-gentoo-freebsd10.0"
CONFIG_PROTECT="/boot/device.hints /etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -ggdb"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs chflags config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/lib/systemd"
LDFLAGS=""
MAKEOPTS="-j5"
PKGDIR="/var/tmp/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/gentoo-bsd /usr/local/portage.fix10"
USE="X acl amd64-fbsd berkdb cracklib crypt cxx dri gdbm iconv ipv6 java5 java6 mmx modules multilib ncurses nls oss pam pcre python python2 readline sse sse2 ssl tcpd unicode zlib" ABI_X86="64" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="FreeBSD" 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 ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="BSD" VIDEO_CARDS="vesa" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-libs/mesa-9.2.4 was built with the following:
USE="classic egl gallium -bindist -debug (-gbm) -gles1 -gles2 -llvm -llvm-shared-libs (-nptl) (-opencl) -openvg -osmesa (-pax_kernel) -pic -r600-llvm-compiler (-selinux) (-vdpau) (-wayland) -xa (-xorg) -xvmc" ABI_X86="64 -32 -x32" VIDEO_CARDS="-freedreno -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware"
Comment 1 Matt Turner gentoo-dev 2015-02-21 19:23:39 UTC
Please test newer versions of LLVM and Mesa.