Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on Linux #172

Closed
aleixpinardell opened this issue Mar 27, 2017 · 7 comments
Closed

Compile error on Linux #172

aleixpinardell opened this issue Mar 27, 2017 · 7 comments

Comments

@aleixpinardell
Copy link
Member

I am able to compile my Tudat branch on Mac OS X, but when I try to compile it on the server (Linux) I get the following error:

[100%] Linking CXX executable /home/aleix/tudatBundle/tudatApplications/bin/applications/tesp
/home/aleix/tudatBundle/tudat/lib/libtudat_aerodynamics.a(nrlmsise00Atmosphere.cpp.o): In function `tudat::aerodynamics::NRLMSISE00Atmosphere::computeProperties(double, double, double, double)':
nrlmsise00Atmosphere.cpp:(.text+0xa94): undefined reference to `gtd7'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::convertJulianDateToEphemerisTime(double)':
spiceInterface.cpp:(.text+0xb): undefined reference to `j2000_c'
spiceInterface.cpp:(.text+0x20): undefined reference to `spd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::convertEphemerisTimeToJulianDate(double)':
spiceInterface.cpp:(.text+0x3b): undefined reference to `j2000_c'
spiceInterface.cpp:(.text+0x45): undefined reference to `spd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::convertDateStringToEphemerisTime(std::string const&)':
spiceInterface.cpp:(.text+0x86): undefined reference to `str2et_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getBodyCartesianStateAtEpoch(std::string const&, std::string const&, std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0xcb): undefined reference to `spkezr_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getBodyCartesianPositionAtEpoch(std::string const&, std::string const&, std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0x1d8): undefined reference to `spkpos_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::computeRotationQuaternionBetweenFrames(std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0x256): undefined reference to `pxform_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::computeRotationMatrixDerivativeBetweenFrames(std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0x53b): undefined reference to `sxform_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getAngularVelocityVectorOfFrameInOriginalFrame(std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0x5d0): undefined reference to `sxform_c'
spiceInterface.cpp:(.text+0x5e5): undefined reference to `xf2rav_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::computeRotationQuaternionAndRotationMatrixDerivativeBetweenFrames(std::string const&, std::string const&, double)':
spiceInterface.cpp:(.text+0x669): undefined reference to `sxform_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getBodyGravitationalParameter(std::string const&)':
spiceInterface.cpp:(.text+0xa0c): undefined reference to `bodvrd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getAverageRadius(std::string const&)':
spiceInterface.cpp:(.text+0xa4c): undefined reference to `bodvrd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::convertBodyNameToNaifId(std::string const&)':
spiceInterface.cpp:(.text+0xa92): undefined reference to `bods2c_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::checkBodyPropertyInKernelPool(std::string const&, std::string const&)':
spiceInterface.cpp:(.text+0xab6): undefined reference to `bods2c_c'
spiceInterface.cpp:(.text+0xac2): undefined reference to `bodfnd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getTotalCountOfKernelsLoaded()':
spiceInterface.cpp:(.text+0xaff): undefined reference to `ktotal_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::getBodyProperties(std::string const&, std::string const&, int)':
spiceInterface.cpp:(.text+0xb59): undefined reference to `bodvrd_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::loadSpiceKernelInTudat(std::string const&)':
spiceInterface.cpp:(.text+0xae4): undefined reference to `furnsh_c'
/home/aleix/tudatBundle/tudat/lib/libtudat_spice_interface.a(spiceInterface.cpp.o): In function `tudat::spice_interface::clearSpiceKernels()':
spiceInterface.cpp:(.text+0xb11): undefined reference to `kclear_c'
collect2: error: ld returned 1 exit status
tudatApplications/tesp/CMakeFiles/tesp.dir/build.make:121: recipe for target '/home/aleix/tudatBundle/tudatApplications/bin/applications/tesp' failed
make[3]: *** [/home/aleix/tudatBundle/tudatApplications/bin/applications/tesp] Error 1
CMakeFiles/Makefile2:8726: recipe for target 'tudatApplications/tesp/CMakeFiles/tesp.dir/all' failed
make[2]: *** [tudatApplications/tesp/CMakeFiles/tesp.dir/all] Error 2
CMakeFiles/Makefile2:8738: recipe for target 'tudatApplications/tesp/CMakeFiles/tesp.dir/rule' failed
make[1]: *** [tudatApplications/tesp/CMakeFiles/tesp.dir/rule] Error 2
Makefile:2526: recipe for target 'tesp' failed
make: *** [tesp] Error 2

The version of gcc is:

eudoxos /home/aleix> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --program-suffix=-4.8 --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 4.8.5 (SUSE Linux) 
@DominicDirkx
Copy link
Member

Have you compiled the full bundle (including spice and nrlmsise) on the server or just Tudat?

@magnific0
Copy link
Member

The version of GCC is rather old, but it should work. I have suspicion that it might find some spice kernels on the system instead. Can you copy spice related items from your CMakeCache.txt (inside build folder)?

cat CMakeCache.txt | grep -i spice

@aleixpinardell
Copy link
Member Author

CSpice_BINARY_DIR:STATIC=/home/aleix/build-tudatBundle-Desktop-Default/cspice
CSpice_SOURCE_DIR:STATIC=/home/aleix/tudatBundle/cspice
SPICE_BASE_PATH:PATH=/home/aleix/tudatBundle/cspice/include
SPICE_LIBRARIES:FILEPATH=/home/aleix/tudatBundle/cspice/lib/libcspice.a
//build Tudat with CSPICE enabled
USE_CSPICE:BOOL=ON
cspice_LIB_DEPENDS:STATIC=
tudat_spice_interface_LIB_DEPENDS:STATIC=
//Details about finding SPICE
FIND_PACKAGE_MESSAGE_DETAILS_SPICE:INTERNAL=[/home/aleix/tudatBundle/cspice/include/../..][v()]

@DominicDirkx
Copy link
Member

Was spice compiled by you on the server, or did you copy the libraries (including .a files) from your system?

@aleixpinardell
Copy link
Member Author

aleixpinardell commented Mar 27, 2017

I'm uploading the whole tudatBundle, running CMake and then running make my_app as I would do on my computer. I get this messages before the error:

[  1%] Built target nrlmsise00
[  1%] Built target tudat_basics
[  1%] Built target tudat_numerical_integrators
[  2%] Built target tudat_relativity
[  2%] Built target tudat_propulsion
[  3%] Built target tudat_electro_magnetism
[  3%] Built target tudat_reference_frames
[  3%] Built target tudat_spice_interface
[  3%] Built target tudat_basic_mathematics
[  3%] Built target tudat_geometric_shapes
[  3%] Built target tesp_library
[  3%] Built target tudat_basic_astrodynamics
[  3%] Built target tudat_mission_segments
[  4%] Built target tudat_aerodynamics
[  4%] Built target tudat_ephemerides
[  5%] Built target tudat_input_output
[  7%] Built target tudat_gravitation
[  7%] Built target tudat_propagators
[ 98%] Built target cspice
[100%] Built target tudat_simulation_setup
[100%] Linking CXX executable /home/aleix/tudatBundle/tudatApplications/bin/applications/tesp

so I guess spice and nrlmsise00 are indeed being compiled.

@DominicDirkx
Copy link
Member

Not necessarilly, it says it is already built. Please, be specific. What do you mean when you say 'upload the whole bundle'? Refer to my previous question.

@aleixpinardell
Copy link
Member Author

I removed the build directory and tried compiling again. Now it compiles with no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants