Hello Everybody,
 I've been trying to compile openbabel for a hpc lsf environment. I'm having a 
problem with cmake and ld.  It can't find -pthreads. Can someone shed some 
light on this? The error is below:
Determining if the include file conio.h exists failed with the following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_126b6/fast
/bin/gmake -f CMakeFiles/cmTC_126b6.dir/build.make 
CMakeFiles/cmTC_126b6.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_126b6.dir/CheckIncludeFile.c.o
/appl/gcc-4.9.4/bin/cc   -fPIE   -o 
CMakeFiles/cmTC_126b6.dir/CheckIncludeFile.c.o   -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:19:
 fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
gmake[1]: *** [CMakeFiles/cmTC_126b6.dir/CheckIncludeFile.c.o] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_126b6/fast] Error 2


Determining if the rint exist failed with the following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_71986/fast
/bin/gmake -f CMakeFiles/cmTC_71986.dir/build.make 
CMakeFiles/cmTC_71986.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_71986.dir/CheckSymbolExists.c.o
/appl/gcc-4.9.4/bin/cc   -fPIE   -o 
CMakeFiles/cmTC_71986.dir/CheckSymbolExists.c.o   -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_71986
/appl/cmake-3.14.5/bin/cmake -E cmake_link_script 
CMakeFiles/cmTC_71986.dir/link.txt --verbose=1
/appl/gcc-4.9.4/bin/cc      -rdynamic 
CMakeFiles/cmTC_71986.dir/CheckSymbolExists.c.o  -o cmTC_71986
CMakeFiles/cmTC_71986.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `rint'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_71986] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_71986/fast] Error 2

File 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <math.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef rint
  return ((int*)(&rint))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the sranddev exist failed with the following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_c4a93/fast
/bin/gmake -f CMakeFiles/cmTC_c4a93.dir/build.make 
CMakeFiles/cmTC_c4a93.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c4a93.dir/CheckSymbolExists.c.o
/appl/gcc-4.9.4/bin/cc   -fPIE   -o 
CMakeFiles/cmTC_c4a93.dir/CheckSymbolExists.c.o   -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
 In function ‘main’:
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19:
 error: ‘sranddev’ undeclared (first use in this function)
   return ((int*)(&sranddev))[argc];
                   ^
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19:
 note: each undeclared identifier is reported only once for each function it 
appears in
gmake[1]: *** [CMakeFiles/cmTC_c4a93.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_c4a93/fast] Error 2

File 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdlib.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef sranddev
  return ((int*)(&sranddev))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Performing C SOURCE FILE Test SCANDIR_NEEDS_CONST failed with the following 
output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_9679c/fast
/bin/gmake -f CMakeFiles/cmTC_9679c.dir/build.make 
CMakeFiles/cmTC_9679c.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9679c.dir/src.c.o
/appl/gcc-4.9.4/bin/cc   -DSCANDIR_NEEDS_CONST -Werror -fPIE   -o 
CMakeFiles/cmTC_9679c.dir/src.c.o   -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.c
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.c: In 
function ‘main’:
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.c:7:46: 
error: passing argument 3 of ‘scandir’ from incompatible pointer type [-Werror]
      int count = scandir ("./", &entries_pp, matchFiles, 0);
                                              ^
In file included from 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.c:3:0:
/usr/include/dirent.h:255:12: note: expected ‘int (*)(const struct dirent *)’ 
but argument is of type ‘int (*)(struct dirent *)’
 extern int scandir (const char *__restrict __dir,
            ^
cc1: all warnings being treated as errors
gmake[1]: *** [CMakeFiles/cmTC_9679c.dir/src.c.o] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_9679c/fast] Error 2

Source file was:

   #include <sys/types.h>
   #include <dirent.h>
    int main(){
     extern int matchFiles (struct dirent *entry_p);
     struct dirent **entries_pp;
     int count = scandir ("./", &entries_pp, matchFiles, 0);
     return count;
    }

Performing C++ SOURCE FILE Test HAVE_STD_TR1_SHARED_PTR failed with the 
following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_d9e1e/fast
/bin/gmake -f CMakeFiles/cmTC_d9e1e.dir/build.make 
CMakeFiles/cmTC_d9e1e.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d9e1e.dir/src.cxx.o
/appl/gcc-4.9.4/bin/c++    -std=c++11 -pthread -DHAVE_STD_TR1_SHARED_PTR 
-Werror -fPIE   -o CMakeFiles/cmTC_d9e1e.dir/src.cxx.o -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.cxx
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.cxx: In 
function ‘int main()’:
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.cxx:2:45: 
error: ‘std::tr1’ has not been declared
                            int main(){ std::tr1::shared_ptr<int> p; return 0; }
                                             ^
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/src.cxx:2:61: 
error: expected primary-expression before ‘int’
                            int main(){ std::tr1::shared_ptr<int> p; return 0; }
                                                             ^
gmake[1]: *** [CMakeFiles/cmTC_d9e1e.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_d9e1e/fast] Error 2

Source file was:
#include <memory>
                           int main(){ std::tr1::shared_ptr<int> p; return 0; }
Determining if the pthread_create exist failed with the following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_26311/fast
/bin/gmake -f CMakeFiles/cmTC_26311.dir/build.make 
CMakeFiles/cmTC_26311.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_26311.dir/CheckSymbolExists.c.o
/appl/gcc-4.9.4/bin/cc   -Werror -fPIE   -o 
CMakeFiles/cmTC_26311.dir/CheckSymbolExists.c.o   -c 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_26311
/appl/cmake-3.14.5/bin/cmake -E cmake_link_script 
CMakeFiles/cmTC_26311.dir/link.txt --verbose=1
/appl/gcc-4.9.4/bin/cc  -Werror    -rdynamic 
CMakeFiles/cmTC_26311.dir/CheckSymbolExists.c.o  -o cmTC_26311
CMakeFiles/cmTC_26311.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_26311] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_26311/fast] Error 2

File 
/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with 
the following output:
Change Dir: /appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/bin/gmake cmTC_56164/fast
/bin/gmake -f CMakeFiles/cmTC_56164.dir/build.make 
CMakeFiles/cmTC_56164.dir/build
gmake[1]: Entering directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_56164.dir/CheckFunctionExists.c.o
/appl/gcc-4.9.4/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create -Werror -fPIE   
-o CMakeFiles/cmTC_56164.dir/CheckFunctionExists.c.o   -c 
/appl/cmake-3.14.5/share/cmake-3.14/Modules/CheckFunctionExists.c
Linking C executable cmTC_56164
/appl/cmake-3.14.5/bin/cmake -E cmake_link_script 
CMakeFiles/cmTC_56164.dir/link.txt --verbose=1
/appl/gcc-4.9.4/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create -Werror    
-rdynamic CMakeFiles/cmTC_56164.dir/CheckFunctionExists.c.o  -o cmTC_56164 
-lpthreads
/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_56164] Error 1
gmake[1]: Leaving directory 
`/misc/appl/src/openbabel-openbabel-3-0-0/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_56164/fast] Error 2


--David Weise



David Weise
Linux Systems Admin
Penn Medicine Academic Computing Services (PMACS)
Richards Medical Labs
3700 Hamilton Walk | Philadelphia, PA 19104
http://www.med.upenn.edu/pmacs/



_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to