[Trilinos-Users] [EXTERNAL] Build of NOX library stops with errors

Niklas nfarnsworth at web.de
Mon Jan 16 08:21:27 EST 2017


Hello,
If I disable the kokos library together with these libraries:
 
-DTrilinos_ENABLE_ThyraCore:BOOL=OFF
-DTrilinos_ENABLE_Epetra:BOOL=OFF \
-DTrilinos_ENABLE_Galeri:BOOL=OFF \
-DTrilinos_ENABLE_AztecOO:BOOL=OFF \
-DTrilinos_ENABLE_Ifpack:BOOL=OFF \
-DTrilinos_ENABLE_KokkosCore:BOOL=OFF \
 
The build stops now with a linker error
 
CMakeFiles/teuchosparameterlist.dir/objects.a(Teuchos_XMLPerfTestArchive.cpp.obj):Teuchos_XMLPerfTestArchive.cpp:(.text+0x12da): undefined reference to `__imp_gethostname'
collect2.exe: error: ld returned 1 exit status
 
I tried to fix it with  -DDTrilinos_EXTRA_LINK_FLAGS="-lws2_32"  but the Teuchos_XMLPerfTestArchive.cpp uses autolinking to link ws2_32 . But autolinking is not supported by gcc (mingw).
Is there a work around to compile it on windows with mingw, or to replace  getHostname with  a other function?
Best  regards
Niklas

> 
> 
> Hello,
> Thank you, with this additional flag, it passes the CMake process.
> Unfortunately we get gcc errors now:
> 
> packages/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp:55:19: fatal error: dlfcn.h: No such file or directory
> compilation terminated.
> packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/build.make:62: recipe for target 'packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_Core.cpp.obj' failed
> make[2]: *** [packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_Core.cpp.obj] Error 1
> CMakeFiles/Makefile2:1182: recipe for target 'packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/all' failed
> make[1]: *** [packages/kokkos/core/src/CMakeFiles/kokkoscore.dir/all] Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> Best regards
> Niklas
> 
>> Am 12.01.2017 um 16:06 schrieb Bartlett, Roscoe A <rabartl at sandia.gov>:
>> 
>> Then you can likely work around the problem by adding:
>> 
>>  -DXpetra_ENABLE_Tpetra=OFF
>> 
>> to the configure of your tarball source and that should fix the problem.
>> 
>> We will work on automating this logic for future versions.
>> 
>> -Ross
>> 
>> 
>>> -----Original Message-----
>>> From: Niklas [mailto:nfarnsworth at web.de]
>>> Sent: Thursday, January 12, 2017 10:00 AM
>>> To: Bartlett, Roscoe A
>>> Subject: Re: [EXTERNAL] [Trilinos-Users] Build of NOX library stops with errors
>>> 
>>> Hello,
>>> If we use the original source tree we will get the similar errors. We want to use a
>>> Tarball because we would like to use the NOX solver in a open source project as
>>> 3rdparty software. Therefore we need only the NOX solver and keep the code as
>>> small as possible.
>>> Best regards
>>> Niklas.
>>> 
>>>> Am 12.01.2017 um 15:27 schrieb Bartlett, Roscoe A <rabartl at sandia.gov>:
>>>> 
>>>> Just curious, but why are you going through the trouble to create a tarball just
>>> to untar it to build and install?  Why not just configure, build, and install from the
>>> original source tree?  It will only build and install what you enable.  That will
>>> eliminate the error you are seeing.
>>>> 
>>>> Trilinos can't test every combination of enable and disable and somethings
>>> these things happen.  But we can likely add some logic to avoid errors like you
>>> show below.
>>>> 
>>>> -Ross
>>>> 
>>>> 
>>>>> -----Original Message-----
>>>>> From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On
>>>>> Behalf Of Niklas
>>>>> Sent: Thursday, January 12, 2017 8:01 AM
>>>>> To: trilinos-users at trilinos.org
>>>>> Subject: [EXTERNAL] [Trilinos-Users] Build of NOX library stops with
>>>>> errors
>>>>> 
>>>>> Hello,
>>>>> We would like to build the Nox library. Therefore we generated a
>>>>> tarball for the NOX source code to reduce the source to a minimum.
>>>>> We used this CMake call for this:
>>>>> 
>>>>> cmake \
>>>>>   -G "MSYS Makefiles" \
>>>>>               -DGIT_EXEC:FILEPATH="path to git" \
>>>>>               -DBLAS_LIBRARY_DIRS="path to blas library" \
>>>>>               -DLAPACK_LIBRARY_DIRS="path to lapack library" \
>>>>>               -DBUILD_SHARED_LIBS:BOOL=ON \
>>>>>               -DTrilinos_ENABLE_ALL_PACKAGES=OFF \
>>>>>               -DTrilinos_ENABLE_TESTS=OFF \
>>>>>               -DTrilinos_ENABLE_NOX:BOOL=ON \
>>>>>               -DTrilinos_ENABLE_NOX_LAPACK:BOOL=ON \
>>>>>               -D Trilinos_ENABLE_CPACK_PACKAGING=ON \
>>>>>               -DCMAKE_INSTALL_PREFIX:STRING= Trilinos_install \
>>>>>               ../trilinos
>>>>> make package_source
>>>>> 
>>>>> After we generated the tarball for the nox source code, we called the
>>>>> build command with the following settings:
>>>>> 
>>>>> cmake \
>>>>>   -G "MSYS Makefiles" \
>>>>>               -DGIT_EXEC:FILEPATH=" path to git " \
>>>>>               -DBLAS_LIBRARY_DIRS=" path to blas library " \
>>>>>               -DLAPACK_LIBRARY_DIRS=" path to lapack library " \
>>>>>               -DTrilinos_ENABLE_ALL_PACKAGES=OFF \
>>>>>               -DTrilinos_ENABLE_TESTS=OFF \
>>>>>               -DBUILD_SHARED_LIBS:BOOL=ON \
>>>>>               -DTrilinos_ENABLE_NOX:BOOL=ON \
>>>>>               -DTrilinos_ENABLE_NOX_LAPACK:BOOL=ON \
>>>>>               -DTrilinos_ASSERT_MISSING_PACKAGES=OFF \
>>>>>               -DCMAKE_INSTALL_PREFIX:STRING= Trilinos_install \
>>>>>               ./trilinos-12.11-serial-12.11-Source
>>>>> make install
>>>>> 
>>>>> Unfortunately we get some build errors we cannot fix
>>>>> 
>>>>> Configuring individual enabled Trilinos packages ...
>>>>> 
>>>>> Processing enabled package: Kokkos (Core, Containers) Processing
>>>>> enabled
>>>>> package: Teuchos (Core, ParameterList, Comm, Numerics, Remainder,
>>>>> KokkosCompat, KokkosComm)
>>>>> -- C++ compiler supports __attribute__((constructor)) syntax
>>>>> -- C++ compiler supports __attribute__((weak)) syntax and testing
>>>>> weak functions
>>>>> -- C++ compiler does NOT support #pragma weak syntax and testing weak
>>>>> functions Processing enabled package: RTOp (Libs) Processing enabled
>>> package:
>>>>> Epetra (Libs) Processing enabled package: Triutils (Libs) Processing
>>>>> enabled
>>>>> package: EpetraExt (Libs) Processing enabled package: Thyra (Core,
>>>>> EpetraAdapters, EpetraExtAdapters, TpetraAdapters) Processing enabled
>>>>> package: Xpetra (Libs) CMake Error at
>>>>> cmake/tribits/core/utils/AssertDefined.cmake:79 (MESSAGE):
>>>>> Error, the variable Xpetra_ENABLE_Tpetra is not defined!
>>>>> Call Stack (most recent call first):
>>>>> packages/xpetra/CMakeLists.txt:28 (ASSERT_DEFINED)
>>>>> 
>>>>> We thought if we disable all packages the xpetra should also be disabled.
>>>>> Can someone please help us with the build problem, Thank you for your
>>>>> help in advance and best regards Niklas
>>>>> 
>>>>> _______________________________________________
>>>>> Trilinos-Users mailing list
>>>>> Trilinos-Users at trilinos.org
>>>>> https://trilinos.org/mailman/listinfo/trilinos-users
>> 



More information about the Trilinos-Users mailing list