Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198547 - sci-mathematics/gretl-1.6.5 fails to build (with gcc/gfortran 4.2.2)
Summary: sci-mathematics/gretl-1.6.5 fails to build (with gcc/gfortran 4.2.2)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-09 11:08 UTC by Helmut Jarausch
Modified: 2008-06-02 11:14 UTC (History)
0 users

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


Attachments
gretl build log (gretl_build.log.bz2,9.32 KB, text/plain)
2007-11-16 08:49 UTC, Helmut Jarausch
Details
gretl-1.7.4 build log + emerge --info (gretl.tar.lzma,34.66 KB, text/plain)
2008-06-02 10:02 UTC, Helmut Jarausch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2007-11-09 11:08:17 UTC
Trying to build sci-mathematics/gretl-1.6.5 fails
because configure seems to be broken (at least for gcc/gfortran 4.2.2)

- it looks for 'etime_' in libgfortran, but there is no such object in there.
  There is a _gfortran_etime object there which can be called from
  gfortran source code as etime.

- it doesn't find LAPACK although it's installed and shown by lapack-config


Reproducible: Always
Comment 1 Sébastien Fabbro (RETIRED) gentoo-dev 2007-11-12 17:21:58 UTC
Hi Helmut,

You probably have lapack-atlas-3.7.11* installed. Could you try with either lapack-reference-3.1.1-r1 or lapack-atlas-3.8.0? We are in the process of updating our virtual/lapack. lapack-config is to be obsoleted and replaced by our eselect/pkg-config mechanism.

If it does not work, please provide the result of "emerge --info", and "eselect lapack show".

Thanks
Comment 2 Helmut Jarausch 2007-11-14 11:13:40 UTC
(In reply to comment #1)
> Hi Helmut,
> 
> You probably have lapack-atlas-3.7.11* installed. Could you try with either
> lapack-reference-3.1.1-r1 or lapack-atlas-3.8.0? We are in the process of
> updating our virtual/lapack. lapack-config is to be obsoleted and replaced by
> our eselect/pkg-config mechanism.
> 
> If it does not work, please provide the result of "emerge --info", and "eselect
> lapack show".

OK,
eselect lapack show
showed nothing. After installing lapack-atlas-3.8.0 it is recognized now.
The build process of gretl starts now, but linkage fails:
mkdir .libs
.....
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_stop_numeric'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_transfer_character'
/usr/local/lib/libblas.so: undefined reference to `_gfortran_runtime_error'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_compare_string'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_st_write_done'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_pow_r8_i4'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_concat_string'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_transfer_integer'
../lib/.libs/libgretl-1.0.so: undefined reference to `_gfortran_st_write'

Obviously libgfortran is missing. I'm using gcc/gfortran  4.2.2 .

Is it possible to get around without lapack-atlas?
I have sci-libs/blas-goto installed which contains lapack and
other packages don't need any other library.
How can I add libgoto to eselect? It isn't done automatically.

---------------------------------------------
emerge --info
Portage 2.1.3.19 (default-linux/x86/2007.0, gcc-4.2.2, glibc-2.7-r0, 2.6.23-gentoo-r1 i686)
=================================================================
System uname: 2.6.23-gentoo-r1 i686 Intel(R) Pentium(R) III CPU family 1266MHz
Timestamp of tree: Wed, 14 Nov 2007 07:16:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.5.1-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.20_alpha2-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-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"
CONFIG_PROTECT_MASK="/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/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X acl berkdb bitmap-fonts cairo cdr cli cracklib crypt cups doc dri dvd fortran gcj gdbm gnome gpm gtk gtk2 iconv ipv6 isdnlog jpeg kde midi mudflap ncurses nls nptl nptlonly opengl openmp pam pcre pdf perl png pppd python qt readline reflection session spl sqlite sqlite3 ssl svg tcl tcpd tetex tiff tk truetype-fonts type1-fonts unicode x86 xorg 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2007-11-15 11:06:33 UTC
> eselect lapack show
> showed nothing. After installing lapack-atlas-3.8.0 it is recognized now.

Sounds like you forgot to eselect lapack. Make sure you have done the following steps (in the right order):

emerge blas-atlas
eselect blas set atlas
eselect cblas set atlas
emerge lapack-atlas
eselect lapack set atlas
emerge gretl

with all these packages ~x86. Then let me know if it happens again.
Thanks.
Comment 4 Helmut Jarausch 2007-11-15 14:24:34 UTC
(In reply to comment #3)
> > eselect lapack show
> > showed nothing. After installing lapack-atlas-3.8.0 it is recognized now.
> 
> Sounds like you forgot to eselect lapack. Make sure you have done the following
> steps (in the right order):
> 
> emerge blas-atlas
> eselect blas set atlas
> eselect cblas set atlas
> emerge lapack-atlas
> eselect lapack set atlas
> emerge gretl
> 
> with all these packages ~x86. Then let me know if it happens again.

I have done this exactly but it still fails during linkage
indicating missing references from libgfortran.

Probably it's simple problem with the configure/Makefile.
The linker probably just needs an -lgfortran flag.



> 

Comment 5 Sébastien Fabbro (RETIRED) gentoo-dev 2007-11-15 19:47:52 UTC
> Is it possible to get around without lapack-atlas?

Yes, by sticking to blas-reference,lapack-reference.

> I have sci-libs/blas-goto installed which contains lapack and
> other packages don't need any other library.
> How can I add libgoto to eselect? It isn't done automatically.

blas-goto does not contain lapack, only blas. if you want to use blas-goto, use "eselect blas set goto", but then you would need lapack-reference for gretl, set with "eselect lapack set reference".

Now gretl should work with *-atlas. This is strange, I can't reproduce your problem. Could you provide the result of "ldd /usr/lib/libblas.so" and post your gretl build log in attachment?
Comment 6 Helmut Jarausch 2007-11-16 08:49:21 UTC
Created attachment 136076 [details]
gretl build log
Comment 7 Helmut Jarausch 2007-11-16 08:50:49 UTC
(In reply to comment #5)
> > Is it possible to get around without lapack-atlas?
> 
> Yes, by sticking to blas-reference,lapack-reference.
> 
> > I have sci-libs/blas-goto installed which contains lapack and
> > other packages don't need any other library.
> > How can I add libgoto to eselect? It isn't done automatically.
> 
> blas-goto does not contain lapack, only blas. if you want to use blas-goto, use
> "eselect blas set goto", but then you would need lapack-reference for gretl,
> set with "eselect lapack set reference".
> 
> Now gretl should work with *-atlas. This is strange, I can't reproduce your
> problem. Could you provide the result of "ldd /usr/lib/libblas.so" and post
> your gretl build log in attachment?
> 
ldd /usr/lib/libblas.so
        linux-gate.so.1 =>  (0xffffe000)
        libgfortran.so.2 => /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libgfortran.so.2 (0xb7e6d000)
        libatlas.so.0 => /usr/lib/libatlas.so.0 (0xb7bfc000)
        libc.so.6 => /lib/libc.so.6 (0xb7ac7000)
        libm.so.6 => /lib/libm.so.6 (0xb7aa2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7a8a000)
        /lib/ld-linux.so.2 (0x80000000)

The gretl build log is contained in an attachment
Comment 8 Sébastien Fabbro (RETIRED) gentoo-dev 2007-12-06 12:09:11 UTC
So if I understand from bug #201238, it also fails for gretl-1.7.0.
Could you check the links for /usr/lib*/libblas.* and /usr/lib*/liblapack* point the proper /usr/lib/blas/atlas/* and /usr/lib/lapack/atlas/* ?
We've had some eselect issue from the transition of old blas/lapack libs to newer ones.

 
Comment 9 Helmut Jarausch 2007-12-06 12:24:51 UTC
(In reply to comment #8)
> So if I understand from bug #201238, it also fails for gretl-1.7.0.
> Could you check the links for /usr/lib*/libblas.* and /usr/lib*/liblapack*
> point the proper /usr/lib/blas/atlas/* and /usr/lib/lapack/atlas/* ?
> We've had some eselect issue from the transition of old blas/lapack libs to
> newer ones.
> 

ls -lL /usr/lib*/libblas.*
-rw-r--r-- 1 root root 346004 Nov 15 13:36 /usr/lib/libblas.a
-rwxr-xr-x 1 root root 117072 Nov 15 13:36 /usr/lib/libblas.so
-rwxr-xr-x 1 root root 117072 Nov 15 13:36 /usr/lib/libblas.so.0

ls -lL /usr/lib*/liblapack*
-rw-r--r-- 1 root root 5539486 Nov 15 14:13 /usr/lib/liblapack.a
-rwxr-xr-x 1 root root 3938732 Nov 15 14:13 /usr/lib/liblapack.so
-rwxr-xr-x 1 root root 3938732 Nov 15 14:13 /usr/lib/liblapack.so.0
Comment 10 Sébastien Fabbro (RETIRED) gentoo-dev 2007-12-06 12:57:49 UTC
Have you compiled blas/lapack or gretl with another fortran compiler such as ifc?
I am sort of lost here and don't know what else to tell you to try :( gretl should auto-link with -lgfortran and should not need extra LDFLAGS. Here is a random list of things:
Check cblas (eselect, links).
Try emerging the blas,cblas,lapack-reference and re-eselect every blas,cblas,lapack profile to the reference ones.
Re-compile binutils. 
Also set FEATURES=test when you emerge lapack-reference to see if it passes the tests. How about compiling gretl from source, does it work?
Comment 11 Markus Dittrich (RETIRED) gentoo-dev 2008-04-03 12:46:52 UTC
Is this still an issue with gretl-1.7.* or has this been resolved?

Thanks,
Markus
Comment 12 Markus Dittrich (RETIRED) gentoo-dev 2008-05-31 11:08:51 UTC
I am closing this one with NEEDINFO since the original
poster hasn't responded to our inquiry in #11.
Please re-open if the issues persists with gretl-1.7.*.

Thanks,
Markus
Comment 13 Helmut Jarausch 2008-06-02 10:01:21 UTC
gretl-1.7.4 with gcc/gfortran-4.2.4 still fail to install here
Please see the attachment.
Comment 14 Helmut Jarausch 2008-06-02 10:02:27 UTC
Created attachment 155215 [details]
gretl-1.7.4 build log + emerge --info
Comment 15 Sébastien Fabbro (RETIRED) gentoo-dev 2008-06-02 10:18:56 UTC
Hi Helmut,

Your build log mentions a:
 /usr/local/lib/libblas.so: undefined reference to `_gfortran_runtime_error'

Do you have another blas library in /usr/local compiled with a different gfortran compiler than the one for your atlas library?
gfortran up to 4.3 don't have compatible abi.

Also, please don't post lzma attachment as text/plain.
Thanks.
Comment 16 Helmut Jarausch 2008-06-02 11:14:04 UTC
(In reply to comment #15)
> Hi Helmut,
> 
> Your build log mentions a:
>  /usr/local/lib/libblas.so: undefined reference to `_gfortran_runtime_error'
> 
> Do you have another blas library in /usr/local compiled with a different
> gfortran compiler than the one for your atlas library?
> gfortran up to 4.3 don't have compatible abi.
> 
Why on earth does it use this old version in /usr/local/lib

I had this in addition to /usr/lib/libblas.so

Having deleted usr/local/lib/libblas.so, gretl now installs just fine.

Thanks and 
Sorry for the noise,
Helmut.