Hi Cahit, I guess you forgot to clean: $ make clean $ rm CMakeCache.txt
Building statically is usually not necessary and not recommended, with cmake shared libs even work on AIX. cmake can also links "half-static", e.g. linking a static libgsl into a shared version of libvotca_tools and vice versa. If one really really wants a static libs, one needs pkg-config or has to specify the full linkflags (-DXXX_LIBRARY) by hand. Have fun with Votca 1.2, Christoph 2011/7/1 cdalgicdir <[email protected]>: > Hi Christoph, > > I did a clean install using shared libraries and it worked. It seems some of > the libraries were compiled with static option, so I recompiled them using > the shared libraries and then installed votca 1.2. > I couldn't figure out the problem with the static building though. > > Thanks, > Cahit > > > On 07/01/2011 01:15 PM, Christoph Junghans wrote: >> >> Hi Cahit, >> >> when building statically (BUILD_SHARED_LIBS=OFF, not recommended) >> cmake needs to know what are the dependency libraries of libgmx.a. >> Usually that is done by pkg-config (see >> csg/CMakeModules/FindGMX.cmake) and that is where /usr/lib64/libm.so >> in ccmake comes from. >> >> However libgmx also depends on libpthread and libdl, but libpthread >> and libdl don't show up in the output of pkg-config (run pkg-config >> --libs libgmx). That is why the undefined reference appear. So this is >> actually a bug in gromacs autotools build system. >> >> To workaround that issue, just add libpthread and libdl by hand to >> GMX_LIBRARY, e.g. >> >> -DGMX_LIBRARY="$HOME/progs/gromacs-4.5.3/lib/libgmx.a;/usr/lib64/libpthread.so;/usr/lib64/libdl.so;/usr/lib64/libm.so" >> >> Cheers, >> >> Christoph >> >> 2011/7/1 cdalgicdir<[email protected]>: >>> >>> Hi all, >>> >>> I am trying to install Votca 1.2 using ccmake. I have managed to install >>> tools without problem. However while installing csg, I receive an error >>> concerning the gromacs library file. Is there any specific way I should >>> specify the gromacs library? >>> >>> Thanks, >>> Cahit >>> >>> My command is: >>> >>> ccmake -DGSL_LIBRARY=/home/cdalgicdir/progs/gsl-1.14/lib/libgsl.so >>> -DCBLAS_LIBRARY=/home/cdalgicdir/progs/gsl-1.14/lib/libgslcblas.so >>> -DCMAKE_INSTALL_PREFIX=/home/cdalgicdir/progs/votca/votca-1.2/ >>> -DBoost_INCLUDE_DIR=/home/cdalgicdir/progs/boost-1.46.1/include/ >>> >>> -DBoost_LIBRARY=/home/cdalgicdir/progs/boost-1.46.1/lib/libboost_filesystem.so >>> >>> -DBoost_PROGRAM_OPTIONS_LIBRARY=/home/cdalgicdir/progs/boost-1.46.1/lib/libboost_program_options.so >>> -DBUILD_SHARED_LIBS=OFF -DWITH_SQLITE3=OFF >>> -DGMX_INCLUDE_DIR=$HOME/progs/gromacs-4.5.3/include >>> -DGMX_LIBRARY=$HOME/progs/gromacs-4.5.3/lib/libgmx.a . >>> >>> GMX_LIBRARY in ccmake window is : >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a;/usr/lib64/libm.so >>> >>> >>> >>> Error output: >>> >>> txt2tags not found, help cmake to find it by setting TXT2TAGS_EXECUTABLE >>> >>> CMake Warning at src/libcsg/CMakeLists.txt:41 (message): >>> gromacs-4.5 double precision not found failback to single precision >>> >>> >>> >>> CMake Error at CMakeModules/FindGMX.cmake:63 (message): >>> Could not find GromacsVersion in >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a;/usr/lib64/libm.so, >>> take >>> look at the error message in >>> /home/cdalgicdir/progs/tars/votca-csg-1.2/CMakeFiles/CMakeError.log to >>> find >>> out what was going wrong. If you don't have pkg-config installed you >>> will >>> most likely have to set GMX_LIBRARY by hand and include all it's deps >>> in >>> there (i.e. >>> >>> -DGMX_LIBRARY='/path/to/libgmx.so;/path/to/libblas.so;/path/to/libm.so') ! >>> Call Stack (most recent call first): >>> src/libcsg/CMakeLists.txt:42 (find_package) >>> >>> Error log: >>> >>> Determining if the function GromacsVersion exists in the >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a;/usr/lib64/libm.so >>> failed >>> with the following output: >>> Change Dir: /home/cdalgicdir/progs/tars/votca-csg-1.2/CMakeFiles/CMakeTmp >>> >>> Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" >>> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make >>> CMakeFiles/cmTryCompileExec.dir/build >>> gmake[1]: Entering directory >>> `/home/cdalgicdir/progs/tars/votca-csg-1.2/CMakeFiles/CMakeTmp' >>> /home/cdalgicdir/progs/cmake-2.8.4/bin/cmake -E cmake_progress_report >>> /home/cdalgicdir/progs/tars/votca-csg-1.2/CMakeFiles/CMakeTmp/CMakeFiles >>> 1 >>> Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o >>> /usr/bin/gcc -DCHECK_FUNCTION_EXISTS=GromacsVersion -o >>> CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -c >>> >>> /home/cdalgicdir/progs/cmake-2.8.4/share/cmake-2.8/Modules/CheckFunctionExists.c >>> Linking C executable cmTryCompileExec >>> /home/cdalgicdir/progs/cmake-2.8.4/bin/cmake -E cmake_link_script >>> CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 >>> /usr/bin/gcc -DCHECK_FUNCTION_EXISTS=GromacsVersion >>> CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o >>> cmTryCompileExec >>> -rdynamic /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a -lm >>> gmake[1]: Leaving directory >>> `/home/cdalgicdir/progs/tars/votca-csg-1.2/CMakeFiles/CMakeTmp' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_key_delete': >>> pthreads.c:(.text+0x5b6): undefined reference to `pthread_key_delete' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_key_create': >>> pthreads.c:(.text+0x658): undefined reference to `pthread_key_create' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_join': >>> pthreads.c:(.text+0x790): undefined reference to `pthread_join' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_create': >>> pthreads.c:(.text+0x839): undefined reference to `pthread_create' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_cancel': >>> pthreads.c:(.text+0x164): undefined reference to `pthread_cancel' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_setspecific': >>> pthreads.c:(.text+0x1eb): undefined reference to `pthread_setspecific' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_getspecific': >>> pthreads.c:(.text+0x1f8): undefined reference to `pthread_getspecific' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(pthreads.o): In >>> function >>> `tMPI_Thread_mutex_trylock': >>> pthreads.c:(.text+0x9b7): undefined reference to `pthread_mutex_trylock' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(vmddlopen.o): In >>> function >>> `vmddlclose': >>> vmddlopen.c:(.text+0x1): undefined reference to `dlclose' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(vmddlopen.o): In >>> function >>> `vmddlsym': >>> vmddlopen.c:(.text+0x11): undefined reference to `dlsym' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(vmddlopen.o): In >>> function >>> `vmddlerror': >>> vmddlopen.c:(.text+0x21): undefined reference to `dlerror' >>> /home/cdalgicdir/progs/gromacs-4.5.3/lib/libgmx.a(vmddlopen.o): In >>> function >>> `vmddlopen': >>> vmddlopen.c:(.text+0x36): undefined reference to `dlopen' >>> collect2: ld returned 1 exit status >>> gmake[1]: *** [cmTryCompileExec] Error 1 >>> gmake: *** [cmTryCompileExec/fast] Error 2 >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "votca" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/votca?hl=en. >>> >>> >> >> > > -- > You received this message because you are subscribed to the Google Groups > "votca" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/votca?hl=en. > > -- Dr. Christoph Junghans Votca Core Developer Web: http://www.votca.org -- You received this message because you are subscribed to the Google Groups "votca" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/votca?hl=en.
