build problem on Linux with gfortran

Open discussion regarding features, bugs, issues, vendors, etc.

build problem on Linux with gfortran

Postby Williamhdc » Wed May 24, 2017 5:59 am

On Tue, Jun 23, 2009 at 9:50 PM, Malcolm Tobias<mtobias@...> wrote:
>
> I'm attempting to build RDKit_Q12009_2 on a RHEL 5 box with gfortran.
>
> I've manually built the LAPACK libraries using gfortran, but I believe it
> contains symbols that need to link against the gfortran library to resolve.
>
> When I attempt to build RDKit, I see:
>
> gcc.link
> Numerics/EigenSolvers/bin/gcc-4.1.1/release/address-model-64/threading-
> multi/main.exe
> /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/liblapack.a(dlamch.o):
> In function `dlamch_':
> /usr/local/src/lapack-3.2.1/INSTALL/dlamch.f:79: undefined reference to
> `_gfortran_pow_r8_i4'
> /usr/local/src/lapack-3.2.1/INSTALL/dlamch.f:82: undefined reference to
> `_gfortran_pow_r8_i4'
> /usr/lib/gcc/x86_64-redhat-linux/4.1.1/../../../../lib64/liblapack.a(dlamch.o):
> In function `dlamc2_':
> /usr/local/src/lapack-3.2.1/INSTALL/dlamch.f:425: undefined reference to
> `_gfortran_pow_r8_i4'

As long as you are using static libraries for lapack and blas, you
will need to link against gfortran. If you use dynamic libraries
instead (and make sure the dynamic libs are linked against gfortran)
this problem goes away.

If you don't want to build lapack and blas as dynamic libs, you need
to add another lib target to your $RDBASE/Code/Jamroot for gfortran
and expand the lapacklibs alias list. Something like this around line
86 of the Jamroot:

lib gfortran : : <name>gfortran ;
alias lapacklibs : lapack blas gfortran ;

> I might be able to get around this problem if I could somehow force boost to
> link against the gfortran library, but I don't see any way how do to do this.
>
> Is it possible to build without using 'bjam'?

Technically: yes. But there aren't pre-made Makefiles available, so it
won't be quick.

In the future (hopefully the not-too-distant future), the boost
libraries will support CMake and I will be able to switch the rdkit
build process over to that more familiar interface. Bjam is quite
flexible and powerful, but underdocumented and somewhat opaque to
understand.
Williamhdc
 
Posts: 1
Joined: Wed May 24, 2017 3:18 am

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests

cron