[Clp] configure: error: linking to Fortran libraries from C fails

Emerson emersonxsu at gmail.com
Fri Jun 12 13:29:43 EDT 2015


Thanks Ted,
I just solved this problem with one of my colleagues. The reason is : in
configure file in CoinUtils, one of the parameters we pass when configuring
gcc is --with-host-libstdcxx='-L/usr/lib/gcc/x86_64-redhat-linux/4.4.4
-lstdc++', that last single quote mark is the killer.
I revised the configure file in Coinutils, 5085 line,
-FLIBS="$ac_cv_f77_libs"
+FLIBS=$(echo $ac_cv_f77_libs | sed "s/'//")
And now the build is successful.
Just wan to report this little typo and you guys may fix that.

Thanks again,
Emer



On Fri, Jun 12, 2015 at 8:07 AM, Ted Ralphs <ted at lehigh.edu> wrote:

> I build the Optimization Suite on 64-bit Linux routinely. It should work
> out of the box with default options. It looks like you may be using the
> --host argument to configure, since configure is checking for the "
> x86_64-facebook-linux-gfortran" command rather than just plain
> "gfortran". My first guess would be that this is the problem. The checks
> that are failing for you don't even happen when I configure on 64-bit
> Linux. Could you send config.log to me?
>
> Cheers,
>
> Ted
>
> On Fri, Jun 12, 2015 at 12:05 AM, Emerson <emersonxsu at gmail.com> wrote:
>
>> Hi,
>> I am add a third-party project to the company's server, running 64bit
>> Linux OS. I built successively on my MacOS and my local dev server, but
>> failed in configuring when trying to build in company's server. The
>> following is part of the log.
>> It seems using a fortran FLAG error. There are also  "error: unrecognized
>> command line option '-V' somewhere after that.
>> These happened when I was trying to build Clp, CoinUitls(need with Clp,
>> right?), even CoinAll and OptimizationSuite. I think they are using some
>> old configure methods and causing these errors.
>> How can I modify the configure file such that to avoid this error?
>>
>>
>> /home/engshare/third-party2/OptimizationSuite/1.7.5/src/OptimizationSuite-1.7.5/configure
>> /err
>> checking for x86_64-facebook-linux-gfortran... no
>> checking for x86_64-facebook-linux-ifort... no
>> checking for x86_64-facebook-linux-g95... no
>> checking for x86_64-facebook-linux-fort77... no
>> checking for x86_64-facebook-linux-f77... no
>> checking for x86_64-facebook-linux-g77... no
>> checking for x86_64-facebook-linux-pgf90... no
>> checking for x86_64-facebook-linux-pgf77... no
>> checking for x86_64-facebook-linux-ifc... no
>> checking for x86_64-facebook-linux-frt... no
>> checking for x86_64-facebook-linux-af77... no
>> checking for x86_64-facebook-linux-xlf_r... no
>> checking for gfortran... gfortran
>> checking for x86_64-facebook-linux-gfortran... gfortran
>> checking whether we are using the GNU Fortran 77 compiler... yes
>> checking whether gfortran accepts -g... yes
>> configure: Fortran compiler options are: -O3 -pipe
>> checking how to get verbose linking output from gfortran... -v
>> checking for Fortran libraries of gfortran...  -lstdc++'
>> -L/home/engshare/third-party2/glibc/2.17/gcc-4.8.1-glibc-2.17/99df8fc/lib
>> -L/home/engshare/third-party2/libgcc/4.8.1/gcc-4.8.1-glibc-2.17/8aac7fc/lib
>> -L/home/engshare/third-party2/glibc/2.17/gcc-4.8.1-glibc-2.17/99df8fc/lib/../lib64
>> -L/home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/lib/gcc/x86_64-redhat-linux-gnu/4.8.1
>> -L/lib/../lib64 -L/usr/lib/../lib64
>> -L/home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/lib/gcc/x86_64-redhat-linux-gnu/4.8.1/../../..
>> -lgfortran -lm -lgcc_s -lquadmath
>> configure: Corrected Fortran libraries:  -lstdc++'
>> -L/home/engshare/third-party2/glibc/2.17/gcc-4.8.1-glibc-2.17/99df8fc/lib
>> -L/home/engshare/third-party2/libgcc/4.8.1/gcc-4.8.1-glibc-2.17/8aac7fc/lib
>> -L/home/engshare/third-party2/glibc/2.17/gcc-4.8.1-glibc-2.17/99df8fc/lib/../lib64
>> -L/home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/lib/gcc/x86_64-redhat-linux-gnu/4.8.1
>> -L/lib/../lib64 -L/usr/lib/../lib64
>> -L/home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/lib/gcc/x86_64-redhat-linux-gnu/4.8.1/../../..
>> -lgfortran -lm -lquadmath
>> checking for dummy main to link with Fortran libraries... unknown
>> configure: error: linking to Fortran libraries from C fails
>> See `config.log' for more details.
>> configure: error: /bin/sh
>> '/home/engshare/third-party2/OptimizationSuite/1.7.5/src/OptimizationSuite-1.7.5/CoinUtils/configure'
>> failed for CoinUtils
>>
>> Best,
>> Emer
>>
>> _______________________________________________
>> Clp mailing list
>> Clp at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/clp
>>
>>
>
>
> --
> Dr. Ted Ralphs
> Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20150612/dcb77bcb/attachment.html>


More information about the Clp mailing list