Build error on Debian Stretch trilinos not found

427 views
Skip to first unread message

Jay Aurabind

unread,
Nov 11, 2017, 1:48:06 PM11/11/17
to xyce-users
Hi,

I just tried compiling Xyce on debian as per instructions in the official page, and configure step is failing. I have trilinos-all-dev 12.10 from the debian repo installed. Below is snipped configure output:


checking how to hardcode library paths into programs... immediate
checking for grep that handles long lines and -e... (cached) /bin/grep
checking whether your C++ compiler is the DEC compiler... no
checking whether your C++ compiler is the Intel compiler version less than 12... no
checking how to get verbose linking output from f77... -v
checking for Fortran 77 libraries of f77...  -L/lib -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/6/../../.. -lgfortran -lm -lquadmath
checking for library containing sqrt... -lm
checking for library containing dcopy... -lblas
checking for library containing dgetrs... -llapack
checking for amd_valid in -lamd... yes
checking for main in -lteuchoscore... no
configure: error: Unable to find required library, teuchoscore.



Kindly advice how to fix this error

xyce-users

unread,
Nov 11, 2017, 1:59:31 PM11/11/17
to xyce-users
There is not enough information here to give you a solid answer --- the console output of configure is almost useless for diagnosing problems like this. 

The error you're reporting is almost always the result of some sort of failure of configure to link a small test program with the Trilinos teuchoscore library -- it doesn't *really* mean that it can't find the teuchoscore library, only that it couldn't link with it.
There are many reasons that this might happen, and the actual reason yours is failing will be found in the "config.log" file that configure creates as it works.  Without seeing that file, there is no way to give anything but general advice.

The simplest error that can cause this problem is a typo in specifying "ARCHDIR" to configure --- so we'll just go ahead and assume that one isn't the case here.  That error really *would* mean that configure can't fine the teuchoscore library.

The next most common reason for this to happen is that you've got a mismatch in C++ standard being used for building Xyce vs. for building Trilinos.  Starting with Trilinos 12, Trilinos will attempt to build with the C++11 standard if your compiler supports it and you haven't told it not to.  If Trilinos builds with C++11, you must also build Xyce with C++11 enabled.  This is described in the building guide.  If this is what's going on, you will find in config.log error messages relating to unknown C++11 functions when it is trying to link against teuchoscore.

There are many other reasons that this error can show up, almost none of them being "the teuchoscore library doesn't exist" --- it's pretty much always a problem with setting up your configure line so that small test programs can be linked to teuchoscore.  And the only way to know for sure what's wrong is to study the error messages in config.log.

Jay Aurabind

unread,
Nov 12, 2017, 1:10:44 AM11/12/17
to xyce-users
On 12 November 2017 at 00:29, xyce-users <xyce-...@googlegroups.com> wrote:
> There is not enough information here to give you a solid answer --- the
> console output of configure is almost useless for diagnosing problems like
> this.
>
> The error you're reporting is almost always the result of some sort of
> failure of configure to link a small test program with the Trilinos
> teuchoscore library -- it doesn't *really* mean that it can't find the
> teuchoscore library, only that it couldn't link with it.
> There are many reasons that this might happen, and the actual reason yours
> is failing will be found in the "config.log" file that configure creates as
> it works. Without seeing that file, there is no way to give anything but
> general advice.


Thanks for your response. I find quite a lot of errors in the
config.log file. Full output is here:
https://paste.gnome.org/pl4kmuqwh
>
> The simplest error that can cause this problem is a typo in specifying
> "ARCHDIR" to configure --- so we'll just go ahead and assume that one isn't
> the case here. That error really *would* mean that configure can't fine the
> teuchoscore library.

I did not explicitly change the ARCHDIR, this should be automatically
detected I believe?
>
> The next most common reason for this to happen is that you've got a mismatch
> in C++ standard being used for building Xyce vs. for building Trilinos.
> Starting with Trilinos 12, Trilinos will attempt to build with the C++11
> standard if your compiler supports it and you haven't told it not to. If
> Trilinos builds with C++11, you must also build Xyce with C++11 enabled.
> This is described in the building guide. If this is what's going on, you
> will find in config.log error messages relating to unknown C++11 functions
> when it is trying to link against teuchoscore.

I set the environment variable (export CXXFLAGS="-std=c++11") before
running ./configure. Is that sufficient ?

How do I know whether trilinos libraries from the debian repos were
compiled with C++11 itself ?

>
> There are many other reasons that this error can show up, almost none of
> them being "the teuchoscore library doesn't exist" --- it's pretty much
> always a problem with setting up your configure line so that small test
> programs can be linked to teuchoscore. And the only way to know for sure
> what's wrong is to study the error messages in config.log.
>

As I observed from the config.log related to ld complaining about not
able to find the library:

/usr/bin/ld: cannot find -lteuchoscore

ldconfig -v | grep teucho gives the below output [snipped]:

libtrilinos_teuchosparameterlist.so.12 ->
libtrilinos_teuchosparameterlist.so.12.10.1
libtrilinos_teuchoskokkoscompat.so.12 ->
libtrilinos_teuchoskokkoscompat.so.12.10.1
libtrilinos_teuchoskokkoscomm.so.12 ->
libtrilinos_teuchoskokkoscomm.so.12.10.1
libtrilinos_teuchosremainder.so.12 ->
libtrilinos_teuchosremainder.so.12.10.1
libtrilinos_teuchosnumerics.so.12 -> libtrilinos_teuchosnumerics.so.12.10.1
libtrilinos_teuchoscore.so.12 -> libtrilinos_teuchoscore.so.12.10.1
libtrilinos_teuchoscomm.so.12 -> libtrilinos_teuchoscomm.so.12.10.1

These files are in the folder /usr/lib/x86_64-linux-gnu. Could you
please suggest how to include this into the configuration options ?


> On Saturday, November 11, 2017 at 11:48:06 AM UTC-7, Jay Aurabind wrote:
>>
>> Hi,
>>
>> I just tried compiling Xyce on debian as per instructions in the official
>> page, and configure step is failing. I have trilinos-all-dev 12.10 from the
>> debian repo installed. Below is snipped configure output:
>>
>>
>> checking how to hardcode library paths into programs... immediate
>> checking for grep that handles long lines and -e... (cached) /bin/grep
>> checking whether your C++ compiler is the DEC compiler... no
>> checking whether your C++ compiler is the Intel compiler version less than
>> 12... no
>> checking how to get verbose linking output from f77... -v
>> checking for Fortran 77 libraries of f77... -L/lib
>> -L/usr/lib/gcc/x86_64-linux-gnu/6
>> -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu
>> -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib -L/lib/x86_64-linux-gnu
>> -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
>> -L/usr/lib/gcc/x86_64-linux-gnu/6/../../.. -lgfortran -lm -lquadmath
>> checking for library containing sqrt... -lm
>> checking for library containing dcopy... -lblas
>> checking for library containing dgetrs... -llapack
>> checking for amd_valid in -lamd... yes
>> checking for main in -lteuchoscore... no
>> configure: error: Unable to find required library, teuchoscore.
>>
>>
>> Kindly advice how to fix this error
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "xyce-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/xyce-users/WaSu3_EX6QQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> xyce-users+...@googlegroups.com.
> To post to this group, send email to xyce-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/xyce-users.
> For more options, visit https://groups.google.com/d/optout.



--

Thanks and Regards,
Aurabindo J

xyce-users

unread,
Nov 12, 2017, 9:47:02 AM11/12/17
to xyce-users
You appear to be trying to use a version of Trilinos from a Debian repository.  We cannot help you with that.

As it states in the building guide:

Note that at this time no system provides packages for versions of Trilinos compatible with Xyce, so it will always need to be built from source. While some systems do provide packages for Trilinos in package management systems, these versions are either too old to be used or not configured to have all the essential package options required by Xyce, and we do not recommend using them even if you happen to find one for your system.

You will need to build Trilinos from source as described in the building guide:  https://xyce.sandia.gov/documentation/BuildingGuide.html

Jay Aurabind

unread,
Nov 13, 2017, 10:11:15 AM11/13/17
to xyce-users
Thanks for the info!
Reply all
Reply to author
Forward
0 new messages