Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443546 - media-libs/libprojectm-2.1.0 - Fails to build against media-gfx/nvidia-cg-toolkit-3.1.0013-r1 - /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg or -lCgGL
Summary: media-libs/libprojectm-2.1.0 - Fails to build against media-gfx/nvidia-cg-too...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
Keywords: EBUILD
: 454112 (view as bug list)
Depends on: 443706
  Show dependency tree
Reported: 2012-11-16 18:42 UTC by James
Modified: 2013-01-28 06:54 UTC (History)
7 users (show)

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

Build Log (build.log,68.61 KB, text/plain)
2012-11-17 20:08 UTC, James
The fixed ebuild 2.1.0 revision 1 of libprojectm (libprojectm-2.1.0-r1.ebuild,1.24 KB, text/plain)
2012-11-17 21:58 UTC, PhobosK
libprojectm-2.1.0-r1 build log (libprojectm-2.1.0-r1.txt,76.53 KB, text/plain)
2013-01-26 15:38 UTC, thunder367
libprojectm-2.1.0-r1 emerge info (libprojectm-2.1.0-r1_emerge_info.txt,6.95 KB, text/plain)
2013-01-26 15:41 UTC, thunder367

Note You need to log in before you can comment on or make changes to this bug.
Description James 2012-11-16 18:42:23 UTC
revdep-rebuild identified it as broken by the upgrade, and Compile fails

Reproducible: Always

Steps to Reproduce:
1.emerge -uDNav world emerges media-gfx/nvidia-cg-toolkit-3.1.0013-r1
Actual Results:  
/usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++  -DprojectM_EXPORTS -DCMAKE_INSTALL_PREFIX=\"/usr\" -DUSE_CG -DUSE_FBO -DUSE_FTGL -DUSE_THREADS -DLINUX -DSTBI_NO_DDS -DUSE_FTGL -DprojectM_FONT_MENU="\"\\\"/usr/share/projectM/fonts/VeraMono.ttf\\\"\"" -DprojectM_FONT_TITLE="\"\\\"/usr/share/projectM/fonts/Vera.ttf\\\"\""  -I/opt/nvidia-cg-toolkit/include -DNDEBUG -march=amdfam10 -O2 -pipe  -fopenmp  -fPIC -I/usr/include/freetype2 -I/var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM -I/usr/include/FTGL -I/var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM/Renderer -I/var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM/NativePresetFactory -I/var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM/MilkdropPresetFactory    -o CMakeFiles/projectM.dir/PresetFactoryManager.cpp.o -c /var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM/PresetFactoryManager.cpp
Linking CXX shared library
/usr/bin/cmake -E cmake_link_script CMakeFiles/projectM.dir/link.txt --verbose=1
/usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++  -fPIC -march=amdfam10 -O2 -pipe  -fopenmp   -Wl,-O1 -Wl,--as-needed -L/opt/nvidia-cg-toolkit/lib -shared -Wl,-soname, -o CMakeFiles/projectM.dir/projectM.cpp.o CMakeFiles/projectM.dir/PCM.cpp.o CMakeFiles/projectM.dir/Preset.cpp.o CMakeFiles/projectM.dir/fftsg.cpp.o CMakeFiles/projectM.dir/KeyHandler.cpp.o CMakeFiles/projectM.dir/timer.cpp.o CMakeFiles/projectM.dir/wipemalloc.cpp.o CMakeFiles/projectM.dir/PresetLoader.cpp.o CMakeFiles/projectM.dir/PresetChooser.cpp.o CMakeFiles/projectM.dir/PipelineMerger.cpp.o CMakeFiles/projectM.dir/ConfigFile.cpp.o CMakeFiles/projectM.dir/TimeKeeper.cpp.o CMakeFiles/projectM.dir/PresetFactory.cpp.o CMakeFiles/projectM.dir/PresetFactoryManager.cpp.o Renderer/libRenderer.a -lCg -lCgGL NativePresetFactory/libNativePresetFactory.a MilkdropPresetFactory/libMilkdropPresetFactory.a -lGLEW -lftgl -lfreetype -lm -ldl -lGLU -lGL -lSM -lICE -lX11 -lXext -ldl Renderer/libRenderer.a -lCg -lCgGL -lm 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCgGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCgGL
collect2: ld returned 1 exit status
make[2]: *** [] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/libprojectm-2.1.0/work/libprojectm-2.1.0_build'
make[1]: *** [CMakeFiles/projectM.dir/all] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-libs/libprojectm-2.1.0/work/libprojectm-2.1.0_build'
make: *** [all] Error 2
 * ERROR: media-libs/libprojectm-2.1.0 failed (compile phase):
 *   emake failed
 * If you need support, post the output of `emerge --info '=media-libs/libprojectm-2.1.0'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/libprojectm-2.1.0'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/libprojectm-2.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/libprojectm-2.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/libprojectm-2.1.0/work/libprojectm-2.1.0_build'
 * S: '/var/tmp/portage/media-libs/libprojectm-2.1.0/work/projectM-complete-2.1.0-Source/src/libprojectM'

Expected Results:  
compile cleanly

emerge --info media-libs/libprojectm
Portage (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.16.0, 3.6.6-gentoo x86_64)
                        System Settings
System uname: Linux-3.6.6-gentoo-x86_64-AMD_Phenom-tm-_II_X4_840_Processor-with-gentoo-2.2
Timestamp of tree: Fri, 16 Nov 2012 13:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo MythTV-0-25-fixes bibletime gamerlay java-overlay mozilla Home
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=amdfam10 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /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="-march=amdfam10 -O2 -pipe"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/mt-mythtv /var/lib/layman/bibletime /var/lib/layman/gamerlay /var/lib/layman/java-overlay /var/lib/layman/mozilla /usr/local/portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 audiofile avahi avi bluetooth branding bzip2 cairo ccache cdda cddb cdio cdr cdrkit cli consolekit cracklib crypt css cups cxx dbus declarative divx4linux dlloader dri dts dv dvb dvd dvdnav dvdr dvdread emboss enca encode exif extras fam ffmpeg firefox flac fontconfig fortran g3dvl gdbm gif gimp glut gpm gtk gzip iconv icu ieee1394 imagemagick java jpeg json kde kerberos kipi kontact ladspa lame lcms ldap libnotify live lm_sensors lv2 mad melt midi mjpeg mmx mmx2 mmxext mng modules mp2 mp3 mp4 mpeg mplayer mpm-worker mtp mudflap multilib musepack mythtv ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp pam pango pcre pda pdf pdflib phonon plasma png policykit posix ppds pppd pulseaudio qt3support qt4 readline scanner sdl semantic-desktop session smp snmp sockets spell srt sse sse2 ssl startup-notification subtitles svg swat szip tcpd theora threads tiff truetype udev udisks unicode upower usb vcd vdpau vim-syntax vorbis webkit wxwidgets x264 xanim xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda_intel usb_audio" 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="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" CAMERAS="ptp2" 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" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="hp umax" USERLAND="GNU" VIDEO_CARDS="nvidia ati 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"

                        Package Settings

media-libs/libprojectm-2.1.0 was built with the following:
USE="(consolekit) (multilib) openmp (policykit) -debug" VIDEO_CARDS="nvidia"
CFLAGS="-march=amdfam10 -O3 -pipe"
CXXFLAGS="-march=amdfam10 -O3 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L/opt/nvidia-cg-toolkit/lib"
Comment 1 Nikos Chantziaras 2012-11-17 07:39:15 UTC
Same error here. It works fine with the older version.
Comment 2 Nikos Chantziaras 2012-11-17 07:42:19 UTC
Just to clarify: With "older version" I don't mean 3.1.0013 (without the "-r1"), but 2.1.0017-r1.
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-17 18:38:48 UTC
Please attach the full build log.
Comment 4 James 2012-11-17 20:08:33 UTC
Created attachment 329756 [details]
Build Log
Comment 5 PhobosK 2012-11-17 21:58:54 UTC
Created attachment 329760 [details]
The fixed ebuild 2.1.0 revision 1 of libprojectm

Adding an LDFLAG of "-L/opt/nvidia-cg-toolkit/lib" ??! Really??... And what about the lib64 case :P

One should always use the $(get_libdir)...

Uploading the fixed ebuild...
Comment 6 PhobosK 2012-11-17 22:40:44 UTC
Nevertheless a fix to media-gfx/nvidia-cg-toolkit-3.1.0013-r1 is needed too so libprojectm to be functional... (see bug #443706)
Comment 7 Julian Ospald 2012-12-06 17:45:04 UTC
does this still happen with media-gfx/nvidia-cg-toolkit-3.1.0013-r2?
Comment 8 Nikos Chantziaras 2012-12-07 13:03:46 UTC
(In reply to comment #7)
> does this still happen with media-gfx/nvidia-cg-toolkit-3.1.0013-r2?

Comment 9 tman 2012-12-31 03:58:40 UTC
i can confirm that the error this happen

 * Package:    media-libs/libprojectm-2.1.0
 * Repository: gentoo
 * Maintainer:
 * USE:        amd64 elibc_glibc kernel_linux multilib openmp userland_GNU video_cards_nvidia
 * FEATURES:   sandbox
 * Applying libprojectm-2.1.0-libsuffix.patch ...
 * Applying libprojectm-2.1.0-path.patch ...
 * ERROR: media-libs/libprojectm-2.1.0 failed (compile phase):
 *   emake failed
 * If you need support, post the output of `emerge --info '=media-libs/libprojectm-2.1.0'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/libprojectm-2.1.0'`.
 * The complete build log is located at '/var/tmp/portage/media-libs:libprojectm-2.1.0:20121231-045552.log'.

Comment 10 Alesc 2013-01-04 17:53:09 UTC
Quick and dirty fix :
ln -sf /opt/nvidia-cg-toolkit/lib64 /opt/nvidia-cg-toolkit/lib
Comment 11 Tomáš Chvátal (RETIRED) gentoo-dev 2013-01-21 19:43:08 UTC
Fixed in main tree.
Comment 12 thunder367 2013-01-26 15:37:13 UTC
(In reply to comment #11)
> Fixed in main tree.

Ebuild libprojectm-2.1.0-r1.ebuild,v 1.6 2013/01/26 11:54:08 do not fixed this bug.

See more...
Comment 13 thunder367 2013-01-26 15:38:33 UTC
Created attachment 336918 [details]
libprojectm-2.1.0-r1 build log
Comment 14 Nikos Chantziaras 2013-01-26 15:40:04 UTC
You have to emerge media-gfx/nvidia-cg-toolkit again first. That worked for me.
Comment 15 thunder367 2013-01-26 15:41:35 UTC
Created attachment 336920 [details]
libprojectm-2.1.0-r1 emerge info
Comment 16 thunder367 2013-01-26 15:50:05 UTC
miheev / # emerge -b -1 =media-gfx/nvidia-cg-toolkit-2.1.0017-r1

miheev / # ls  /opt/nvidia-cg-toolkit/
bin  include  lib

miheev / # emerge --info =media-libs/libprojectm-2.1.0-r1
                        Package Settings

media-libs/libprojectm-2.1.0-r1 was built with the following:
USE="openmp -debug" VIDEO_CARDS="nvidia"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L/opt/nvidia-cg-toolkit/lib64"

Path in /opt/nvidia-cg-toolkit/ not included symlink ./lib64 -> ./lib
Comment 17 Julian Ospald 2013-01-26 18:08:24 UTC
+  26 Jan 2013; Julian Ospald <> libprojectm-2.1.0-r1.ebuild:
+  fix build time issues wrt #443546

libdir of cg-toolkit is not consistent across versions, so we also need to pass the libdir of stable 2.1.0017-r1 to LDFLAGS
Comment 18 thunder367 2013-01-26 18:43:19 UTC
(In reply to comment #17)
> +  26 Jan 2013; Julian Ospald <>
> libprojectm-2.1.0-r1.ebuild:
> +  fix build time issues wrt #443546
> +
> libdir of cg-toolkit is not consistent across versions, so we also need to
> pass the libdir of stable 2.1.0017-r1 to LDFLAGS

My  architecture is stable amd64.

miheev ~ # ls /usr/portage/media-libs/libprojectm/
ChangeLog  files  libprojectm-2.0.1-r1.ebuild  libprojectm-2.1.0-r1.ebuild  Manifest  metadata.xml

Ebuild libprojectm-2.1.0-r1.ebuild is stable amd64

miheev ~ # ls /usr/portage/media-gfx/nvidia-cg-toolkit
ChangeLog  Manifest      nvidia-cg-toolkit-2.1.0012.ebuild  nvidia-cg-toolkit-2.1.0017-r1.ebuild  nvidia-cg-toolkit-3.1.0013-r1.ebuild
files      metadata.xml  nvidia-cg-toolkit-2.1.0017.ebuild  nvidia-cg-toolkit-3.1.0013.ebuild     nvidia-cg-toolkit-3.1.0013-r2.ebuild

Ebuilds nvidia-cg-toolkit-3.1.0013-r2.ebuild, nvidia-cg-toolkit-3.1.0013-r1.ebuild, nvidia-cg-toolkit-3.1.0013.ebuild is unstable ~amd64
Ebuild  nvidia-cg-toolkit-2.1.0017-r1.ebuild is stable amd64

Ebuild nvidia-cg-toolkit-3.1.0013-r2.ebuild not compile. I do not know if it will work with it.
Comment 19 Julian Ospald 2013-01-26 18:52:08 UTC

I just fixed it, resync your tree and retry with 2.1.0017-r1
Comment 20 thunder367 2013-01-26 18:59:01 UTC
(In reply to comment #19)
> ???
> I just fixed it, resync your tree and retry with 2.1.0017-r1

miheev ~ # emerge --sync

miheev ~ # emerge -b -1 =nvidia-cg-toolkit-2.1.0017-r1
>>> Installing (1 of 1) media-gfx/nvidia-cg-toolkit-2.1.0017-r1

miheev ~ # emerge -b -1 =media-libs/libprojectm-2.1.0-r1
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCgGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lCgGL
Comment 21 thunder367 2013-01-26 19:14:53 UTC

Ebuild file /media-libs/libprojectm/libprojectm-2.1.0-r1.ebuild,v 1.8 2013/01/26 18:07:36 is works.

Bug fixed!
Comment 22 Julian Ospald 2013-01-26 22:16:48 UTC
*** Bug 454112 has been marked as a duplicate of this bug. ***
Comment 23 James M Leddy 2013-01-28 06:54:08 UTC
I'm using amd64 as well, and this is still not working for me. The reason is that even with amd64 the nvidia-cg-toolkit build puts things in /opt/nvidia-cg-toolkit/lib, and _not_ /opt/nivida-cg-toolkit/lib64. I'm going to work around it with the LDFLAGS env variable but the ebuild should be changed.