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

Bug 279824

Summary: dev-cpp/eigen-2.0.3 build and test failure
Product: Gentoo Linux Reporter: Harald van Dijk (RETIRED) <truedfx>
Component: [OLD] UnspecifiedAssignee: Marcus D. Hanwell (RETIRED) <cryos>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: flameeyes, kde, sci
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Harald van Dijk (RETIRED) gentoo-dev 2009-07-31 20:23:54 UTC
Firstly, even though a Fortran compiler is not required (as per the comment in the ebuild), eigen still tries to find one anyway (continuing without error if it doesn't find any). If it finds one, it runs some sanity checks. On my system, the detected Fortran compiler is Sun's. Those sanity checks rely on LDFLAGS being accepted, which is not the case here.

>>> Working in BUILD_DIR: "/var/tmp/portage/dev-cpp/eigen-2.0.3/work/eigen2_build"
loading initial cache file /var/tmp/portage/dev-cpp/eigen-2.0.3/temp/gentoo_common_config.cmake
-- CTest cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work.
FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=GSL_CONFIG-NOTFOUND
-- Could NOT find TAUCS  (missing:  TAUCS_INCLUDES TAUCS_LIBRARIES)
-- Could NOT find CHOLMOD  (missing:  CHOLMOD_INCLUDES CHOLMOD_LIBRARIES)
-- The Fortran compiler identification is SunPro
-- Check for working Fortran compiler: /opt/SunStudioExpress/bin/f95
-- Check for working Fortran compiler: /opt/SunStudioExpress/bin/f95 -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:25 (MESSAGE):
  The Fortran compiler "/opt/SunStudioExpress/bin/f95" is not able to compile
  a simple test program.
[...]
  /opt/SunStudioExpress/bin/f95 -KPIC -Xlinker -O1 -Xlinker --as-needed
  CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -o cmTryCompileExec


  f95: Warning: Option -Xlinker passed to ld, if ld is invoked, ignored
  otherwise

  f95: Warning: Option -Xlinker passed to ld, if ld is invoked, ignored
  otherwise

  f95: Warning: Option --as-needed passed to ld, if ld is invoked, ignored
  otherwise

  /usr/bin/ld: cannot find -linker

  gmake[1]: Leaving directory
  `/var/tmp/portage/dev-cpp/eigen-2.0.3/work/eigen2_build/CMakeFiles/CMakeTmp'


  gmake[1]: *** [cmTryCompileExec] Error 1

  gmake: *** [cmTryCompileExec/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  test/CMakeLists.txt:39 (enable_language)


-- Configuring incomplete, errors occurred!
 * 
 * ERROR: dev-cpp/eigen-2.0.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_test
 *             environment, line 3159:  Called cmake-utils_src_configure
 *             environment, line  849:  Called die
 * The specific snippet of code:
 *       cmake ${cmakeargs} "${CMAKE_USE_DIR}" || die "cmake failed";
 *  The die message:
 *   cmake failed

Secondly, if I ignore that by either unsetting LDFLAGS, or by making sure it cannot find Sun's compilers, I run into this:

[...]
>>> Source compiled.
>>> Working in BUILD_DIR: "/var/tmp/portage/dev-cpp/eigen-2.0.3/work/eigen2_build"
loading initial cache file /var/tmp/portage/dev-cpp/eigen-2.0.3/temp/gentoo_common_config.cmake
[...]
-- Found Qt-Version 4.5.2
-- Found OpenSSL: /usr/lib32/libssl.so
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
CMake Error at test/CMakeLists.txt:161 (target_link_libraries):
  The "optimized" argument must be followed by a library.
Call Stack (most recent call first):
  test/CMakeLists.txt:215 (ei_add_test)


-- Configuring incomplete, errors occurred!
 * 
 * ERROR: dev-cpp/eigen-2.0.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_test
 *             environment, line 3159:  Called cmake-utils_src_configure
 *             environment, line  849:  Called die
 * The specific snippet of code:
 *       cmake ${cmakeargs} "${CMAKE_USE_DIR}" || die "cmake failed";
 *  The die message:
 *   cmake failed


Portage 2.2_rc33 (default/linux/x86/2008.0/developer/multilib, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-i686-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.0.1
Timestamp of tree: Fri, 31 Jul 2009 15:45:02 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     9999
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, 1.11
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.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -g"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -g"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--noconfmem --verbose --with-bdeps=y"
FEATURES="assume-digests autopatch cvs fixpackages installsources multilib-strict notitles preserve-libs protect-owned sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Xlinker -O1 -Xlinker --as-needed"
LINGUAS="*"
MAKEOPTS="-j1"
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="/etc/portage/layman/java-overlay /etc/portage/layman/sunrise /etc/portage/layman/toolchain /etc/portage/crossdev /etc/portage/overlay /var/cvs/gentoo-x86"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac accessibility acl acpi ada alsa apache2 aspell async bidi bindist bzip2 cairo cdda cdparanoia cdr chm cjk cli cracklib crypt cups curl custom-cflags custom-cxxflags custom-optimization cvs dbus demo dhcp dia divx docbook dot dri dvd dvdr dvdread eds emacs emboss encode evo expat fam ffmpeg flac ftp gcc64 gdbm gif git gnome gnome-keyring gstreamer gtk hal html iconv icu idn inotify ipv6 isdnlog ithreads jadetex java java5 java6 javascript jit jpeg kde latex ldap libffi libnotify mad mbox mbrola midi mikmod mmx mmxext mng mozdevelop mp3 mpeg multilib mysql ncurses nls nocxx normalize nptl nptlonly nsplugin ntfs objc objc++ ogg opengl openmp oss pam pch pcre pdf perl phonon pic png ppds pppd preview-latex python qt3support qt4 quicktime rdp readline realmedia reflection rtf samba sdl session spell spl sqlite sqlite3 sse sse2 ssl startup-notification static-libs subversion svg swat symlink sysfs tcl tcpd theora threads tidy tiff timidity tk tokenizer toolkit-scroll-bars tordns truetype unicode urandom usb v4l v4l2 vhosts videos vim-syntax vorbis webkit wmp x86 xcb xcomposite xft xml xorg xscreensaver xulrunner 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="*" USERLAND="GNU" VIDEO_CARDS="vesa"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

(And 2.0.3.tar.bz2 is a horrible filename, but that might be out of your control.)
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2009-08-01 10:35:50 UTC
*** Bug 279877 has been marked as a duplicate of this bug. ***
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-08-01 10:43:25 UTC
I'm really not sure that mine is a duplicate of this, since I can't find Intel in your build log…
Comment 3 Harald van Dijk (RETIRED) gentoo-dev 2009-08-01 13:50:22 UTC
It's detecting Sun's Fortran compiler on my system, Intel's on yours, but the problem is the same: it should not be looking for a Fortran compiler at all.
Comment 4 Marcus D. Hanwell (RETIRED) gentoo-dev 2009-08-01 18:08:45 UTC
OK, I have disabled the fortran testing in both our live and eigen-2.0.4 ebuilds. Please let me know if that improves things. I will leave this open, and look into the fortran compiler issue further later when I have more time. It would be good to have all tests run if possible.
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2009-08-02 21:16:18 UTC
It looks like it's working for the Fortran part; the build no longer stops there. As for the tests, 2.0.4 still doesn't work, but it gives a much stranger error now:

[ 66%] Building CXX object test/CMakeFiles/test_qtvector.dir/qtvector.cpp.o
cd /var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build/test && /usr/bin/i686-pc-linux-gnu-g++  -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB  -DNDEBUG -DNDEBUG -with-user-cflags -march=athlon64 -O2 -g  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing -pedantic -g2 -I/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build/test -I/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2/test -I/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2 -I/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore   -fexceptions   -DEIGEN_TEST_FUNC=qtvector -o CMakeFiles/test_qtvector.dir/qtvector.cpp.o -c /var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2/test/qtvector.cpp
Linking CXX executable test_qtvector
cd /var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_qtvector.dir/link.txt --verbose=1
/usr/bin/i686-pc-linux-gnu-g++   -with-user-cflags -march=athlon64 -O2 -g  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wextra -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing -pedantic -g2  -fPIC -with-user-ldflags -Xlinker -O1 -Xlinker --as-needed CMakeFiles/test_qtvector.dir/qtvector.cpp.o  -o test_qtvector -rdynamic -loptimized;/usr/lib32/qt4/libQtCore.so;debug;/usr/lib32/qt4/libQtCore.so 
/usr/lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -loptimized;/usr/lib32/qt4/libQtCore.so;debug;/usr/lib32/qt4/libQtCore.so
collect2: ld returned 1 exit status
make[2]: *** [test/test_qtvector] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build'
make[1]: *** [test/CMakeFiles/test_qtvector.dir/all] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-cpp/eigen-2.0.4/work/eigen2_build'
make: *** [all] Error 2
 * 
 * ERROR: dev-cpp/eigen-2.0.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_test
 *             environment, line 3161:  Called cmake-utils_src_compile
 *             environment, line  806:  Called cmake-utils_src_make
 *             environment, line  883:  Called die
 * The specific snippet of code:
 *           emake VERBOSE=1 "$@" || die "Make failed!";
 *  The die message:
 *   Make failed!
Comment 6 Marcus D. Hanwell (RETIRED) gentoo-dev 2009-08-21 17:40:03 UTC
Sorry, real life has been really crazy and this must have slipped under my radar. My patch improved the short term case, but broke at link time. I now have a real fix, waited until all the tests compiled fully and ran them. It looks good here, and the patch is half the size of the original ;-)

Please test and confirm, I confirmed that all tests compile, link and pass here. Talking with upstream they are disabling Fortran tests by default too, and I will ensure this updated patch gets integrated. Quoting the link libraries broke the mechanism whereby CMake selects the correct library based upon the build type (on Linux they are the same, some platforms aren't so elegant).

You need revision 2 of files/eigen-2.0.4-qt-test.patch. I will be bumping the latest Eigen shortly with a few patches that ensure it works correctly with GCC 4.1.