/usr/bin/ld: cannot find -lcr
I am currently trying to build some finite difference code with a parallel compiler (MPICH2) but I continue to get the following error message when trying to configure the code:
checking for C++ compiler default output... configure: error: C++ compiler cannot create executables I then checked to see if my compiler was linked to mpicc (using the -cc option) but upon trying I get the message: /usr/bin/ld: cannot find -lcr I am new to configuring linux systems and am unsure what this means. Thanks for the help. Also in case something else is the issue here is the config.log contents: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.57. Invocation command line was $ ../SAMRAI/configure --prefix=~/SAMRAI-v2.1.0 --with-CC=mpicc --with-CXX=mpicc --with-pvode=~/SAMRAI/CVODE.10.2000-noreal --with-kinsol=~/SAMRAI/kinsol.4.2000-noreal --with-hdf5=/usr/local/hdf5_parallel ## --------- ## ## Platform. ## ## --------- ## hostname = ubuntu uname -m = x86_64 uname -r = 2.6.38-8-generic uname -s = Linux uname -v = #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:1429: CONFIG_SHELL is '/bin/bash' configure:1467: checking build system type configure:1485: result: x86_64-unknown-linux-gnu configure:1493: checking host system type configure:1507: result: x86_64-unknown-linux-gnu configure:1515: checking target system type configure:1529: result: x86_64-unknown-linux-gnu configure:1553: target_cpu is 'x86_64' configure:1553: target_vendor is 'unknown' configure:1553: target_os is 'linux-gnu' configure:1723: LD_LIBRARY_PATH is unset configure:1730: checking the architecture configure:1761: result: LINUX configure:1782: ARCH is 'LINUX' configure:1811: before running compiler search: with_CXX is 'mpicc' configure:1811: before running compiler search: CXX is 'mpicc' configure:1811: before running compiler search: CCC is unset configure:1909: checking for C++ compiler version configure:1912: mpicc --version </dev/null >&5 gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:1915: $? = 0 configure:1917: mpicc -v </dev/null >&5 mpicc for MPICH2 version 1.3.1 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) configure:1920: $? = 0 configure:1922: mpicc -V </dev/null >&5 gcc: '-V' must come at the start of the command line configure:1925: $? = 1 configure:1949: checking for C++ compiler default output configure:1952: mpicc conftest.cc -lm >&5 /usr/bin/ld: cannot find -lcr collect2: ld returned 1 exit status configure:1955: $? = 1 configure: failed program was: | #line 1928 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:1994: error: C++ compiler cannot create executables See `config.log' for more details. ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=x86_64-unknown-linux-gnu ac_cv_build_alias=x86_64-unknown-linux-gnu ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXCPP_set= ac_cv_env_CXXCPP_value= ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=x86_64-unknown-linux-gnu ac_cv_host_alias=x86_64-unknown-linux-gnu ac_cv_target=x86_64-unknown-linux-gnu ac_cv_target_alias=x86_64-unknown-linux-gnu ## ----------------- ## ## Output variables. ## ## ----------------- ## AR='' ARCH='LINUX' CC='' CFLAGS='' CPP='' CPPFLAGS='' CXX='mpicc' CXXCPP='' CXXFLAGS='' CXXLD_FLAGS='' CXX_FLAGS='' C_FLAGS='' DEFS='' DEPENDS_ON_TEMPLATE_IMPLEMENTATION='' DEVELOPER_MAKEFILE='' DOT_PATH='' DOXYGEN_BIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' F77='' F77LIBFLAGS='' F77_FLAGS='' FFLAGS='' HAVE_DOT='' INC_PATH='' INSTDIR='' LDFLAGS='' LD_FLAGS='' LIBOBJS='' LIBS='-lm' LIB_NAME='-lm' LIB_PATH='' LIB_SUFFIX='.a' LTLIBOBJS='' M4='' MPICC='' MPIFLAGS='' MPIINCLUDE='' MPILIBDIRS='' MPILIBS='' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_VERSION='' PARALLEL_RUN_BIN='' PATH_SEPARATOR=':' PVODE_C_FILES='' SAMRAI_OPTIONAL_LIBS='' SAMRAI_PERL='' SAMRAI_TARGET='' SHELL='/bin/bash' SRCDIR_COMPILE_PREFIX='' TAU_INCLUDE='' TEST_NPROCS='' XARGS='' X_CFLAGS='' X_EXTRA_LIBS='' X_LIBS='' X_PRE_LIBS='' ac_ct_CC='' ac_ct_CXX='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='' build_cpu='x86_64' build_os='linux-gnu' build_vendor='unknown' datadir='${prefix}/share' dox_output_dir='' exec_prefix='NONE' host='x86_64-unknown-linux-gnu' host_alias='' host_cpu='x86_64' host_os='linux-gnu' host_vendor='unknown' includedir='${prefix}/include' infodir='${prefix}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localstatedir='${prefix}/var' mandir='${prefix}/man' oldincludedir='/usr/include' prefix='/home/nick/SAMRAI-v2.1.0' program_transform_name='s,x,x,' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target='x86_64-unknown-linux-gnu' target_alias='' target_cpu='x86_64' target_os='linux-gnu' target_vendor='unknown' ## ----------- ## ## confdefs.h. ## ## ----------- ## #define PACKAGE_BUGREPORT "" #define PACKAGE_NAME "" #define PACKAGE_STRING "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" configure: exit 77 |
Hello and welcome to LQ.
Blind guess: your system seems to have a 64 bit architecture. May be some parts of it are for 32 bit though ? Or maybe you are missing some needed program ? See his thread for instance. |
Welcome to LQ.
No libcr ? ( lcr = libcr.so ) And no g++ ? sudo apt-get install g++ libcr-dev |
All times are GMT -5. The time now is 09:25 PM. |