On Apr 6, 2011, at 1:27 PM, Jason Palmer wrote:

> Hello,
>  
> I’m trying again with the 1.4.3 version to use compile openmpi statically 
> with my program … but I’m running into a more basic problem, similar to one I 
> previously encountered and solved using LD_LIBRARY_PATH.
>  
> The configure script is dying when it tries to run the “simple C++ program”. 
> I define CC, CXX to refer to installed gcc-4.4.3 versions, and F77 and FC to 
> gcc-4.4.3 gfortran, and I set LD_LIBRARY_PATH to be the corresponding 
> gcc-4.4.3-install/lib64.
>  
> I didn’t have a problem with the c++ configure last time I tried this … One 
> odd thing is that it seems to be using the lib directory instead of the lib64 
> directory, despite my setting LD_LIBRARY_FLAGS to lib64, and defining CFLAGS 
> and LDFLAGS to point to the lib64 library as well. I wonder if that is 
> causing the C++ program to fail.

Did you set CXXFLAGS too? I believe that is what gets used for C++ programs, 
not CFLAGS

If you don't need c++ bindings, you can always just configure to ignore it.


>  
> The relevant output from config.log is pasted below. Thanks very much for 
> your help!  -Jason
>  
> configure:23457: checking for the C++ compiler vendor
> configure:23490: /home/jason/gcc-4.4.3-install/bin/g++ -c -DNDEBUG   
> conftest.cpp >&5
> conftest.cpp:2:2: error: #error "condition defined(__INTEL_COMPILER) || 
> defined(__ICC) not met"
> conftest.cpp:3: error: 'choke' does not name a type
> configure:23497: $? = 1
> configure: failed program was:
> | #if !( defined(__INTEL_COMPILER) || defined(__ICC) )
> | #error "condition defined(__INTEL_COMPILER) || defined(__ICC) not met"
> | choke me
> | #endif
> configure:23529: /home/jason/gcc-4.4.3-install/bin/g++ -c -DNDEBUG   
> conftest.cpp >&5
> configure:23536: $? = 0
> configure:24651: result: gnu
> configure:24673: checking if C++ compiler works
> configure:24754: /home/jason/gcc-4.4.3-install/bin/g++ -o conftest -DNDEBUG   
> -L/home/jason/gcc-4.4.3-install/lib64 conftest.cpp
> >&5
> In file included from 
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/bits/loca
> lefwd.h:42,
>                  from 
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/string:45
> ,
>                  from conftest.cpp:111:
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c
> ++locale.h:52: error: 'uselocale' was not declared in this scope
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c
> ++locale.h:52: error: invalid type in declaration before ';' token
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c
> ++locale.h: In function 'int std::__convert_from_v(__locale_struct* const&, 
> char*, int, const char*, ...)':
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c
> ++locale.h:72: error: '__gnu_cxx::__uselocale' cannot be used as a function
> /home/jason/gcc-4.4.3-install/lib/gcc/x86_64-unknown-linux-gnu/4.4.3/../../../../include/c++/4.4.3/x86_64-unknown-linux-gnu/bits/c
> ++locale.h:97: error: '__gnu_cxx::__uselocale' cannot be used as a function
> configure:24758: $? = 1
> configure: program exited with status 1
> configure: failed program was:
> | /* confdefs.h.  */
> | #define PACKAGE_NAME "Open MPI"
> | #define PACKAGE_TARNAME "openmpi"
> | #define PACKAGE_VERSION "1.4.3"
> | #define PACKAGE_STRING "Open MPI 1.4.3"
> | #define PACKAGE_BUGREPORT "http://www.open-mpi.org/community/help/";
> | #define OMPI_MAJOR_VERSION 1
> | #define OMPI_MINOR_VERSION 4
> | #define OMPI_RELEASE_VERSION 3
> | #define OMPI_GREEK_VERSION ""
> | #define OMPI_VERSION "3"
> | #define OMPI_RELEASE_DATE "Oct 05, 2010"
> | #define ORTE_MAJOR_VERSION 1
> | #define ORTE_MINOR_VERSION 4
> | #define ORTE_RELEASE_VERSION 3
> | #define ORTE_GREEK_VERSION ""
> | #define ORTE_VERSION "3"
> | #define ORTE_GREEK_VERSION ""
> | #define ORTE_VERSION "3"
> | #define ORTE_RELEASE_DATE "Oct 05, 2010"
> | #define OPAL_MAJOR_VERSION 1
> | #define OPAL_MINOR_VERSION 4
> | #define OPAL_RELEASE_VERSION 3
> | #define OPAL_GREEK_VERSION ""
> | #define OPAL_VERSION "3"
> | #define OPAL_RELEASE_DATE "Oct 05, 2010"
> | #define OMPI_ENABLE_PROGRESS_THREADS 0
> | #define OMPI_ARCH "x86_64-unknown-linux-gnu"
> | #define OMPI_ENABLE_MEM_DEBUG 0
> | #define OMPI_ENABLE_MEM_PROFILE 0
> | #define OMPI_ENABLE_DEBUG 0
> | #define OMPI_GROUP_SPARSE 0
> | #define OMPI_WANT_MPI_CXX_SEEK 1
> | #define MPI_PARAM_CHECK ompi_mpi_param_check
> | #define OMPI_WANT_PRETTY_PRINT_STACKTRACE 1
> | #define OMPI_WANT_PERUSE 0
> | #define OMPI_ENABLE_PTY_SUPPORT 1
> | #define OMPI_ENABLE_HETEROGENEOUS_SUPPORT 0
> | #define OPAL_ENABLE_TRACE 0
> | #define ORTE_DISABLE_FULL_SUPPORT 0
> | #define OPAL_ENABLE_FT 0
> | #define OPAL_ENABLE_FT_CR 0
> | #define OMPI_WANT_HOME_CONFIG_FILES 1
> | #define OPAL_ENABLE_IPV6 1
> | #define ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT 0
> | #define OPAL_PACKAGE_STRING "Open MPI jason@guessing Distribution"
> | #define OPAL_IDENT_STRING "1.4.3"
> | #define OMPI_OPENIB_PAD_HDR 0
> | #define OMPI_CC "/home/jason/gcc-4.4.3-install/bin/gcc"
> | #define STDC_HEADERS 1
> | #define _GNU_SOURCE 1
> | #define OMPI_C_HAVE_BUILTIN_EXPECT 1
> | #define OMPI_C_HAVE_BUILTIN_PREFETCH 1
> | #define OMPI_CC_USE_PRAGMA_IDENT 0
> | #define OMPI_CC_USE_IDENT 1
> | #define OMPI_CC_USE_PRAGMA_COMMENT
> | #define OMPI_CC_USE_CONST_CHAR_IDENT 0
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_STDINT_H 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_LONG_LONG 1
> | #define HAVE_LONG_DOUBLE 1
> | #define HAVE_INT8_T 1
> | #define HAVE_UINT8_T 1
> | #define HAVE_INT16_T 1
> | #define HAVE_UINT16_T 1
> | #define HAVE_INT32_T 1
> | #define HAVE_UINT32_T 1
> | #define HAVE_INT64_T 1
> | #define HAVE_UINT64_T 1
> | #define HAVE_INTPTR_T 1
> | #define HAVE_UINTPTR_T 1
> | #define HAVE_MODE_T 1
> | #define HAVE_SSIZE_T 1
> | #define HAVE_PTRDIFF_T 1
> | #define SIZEOF_CHAR 1
> | #define SIZEOF_SHORT 2
> | #define SIZEOF_INT 4
> | #define SIZEOF_LONG 8
> | #define SIZEOF_LONG_LONG 8
> | #define SIZEOF_LONG_DOUBLE 16
> | #define SIZEOF_FLOAT 4
> | #define SIZEOF_DOUBLE 8
> | #define SIZEOF_VOID_P 8
> | #define SIZEOF_SIZE_T 8
> | #define SIZEOF_SSIZE_T 8
> | #define SIZEOF_PTRDIFF_T 8
> | #define OMPI_ALIGNMENT_CHAR 1
> | #define OMPI_ALIGNMENT_SHORT 2
> | #define OMPI_ALIGNMENT_WCHAR 4
> | #define OMPI_ALIGNMENT_INT 4
> | #define OMPI_ALIGNMENT_LONG 8
> | #define OMPI_ALIGNMENT_LONG_LONG 8
> | #define OMPI_ALIGNMENT_FLOAT 4
> | #define OMPI_ALIGNMENT_DOUBLE 8
> | #define OMPI_ALIGNMENT_LONG_DOUBLE 16
> | #define OMPI_ALIGNMENT_VOID_P 8
> | #define OMPI_NEED_C_BOOL 1
> | #ifndef __cplusplus
> | #define inline __inline__
> | #endif
> | #define restrict __restrict
> | #define OMPI_ENABLE_MPI_PROFILING 1
> | #define OMPI_HAVE_WEAK_SYMBOLS 1
> | #define OMPI_CXX "/home/jason/gcc-4.4.3-install/bin/g++"
> | /* end confdefs.h.  */
> | #include <string>
> | int
> | main ()
> | {
> | std::string foo = "Hello, world"
> |   ;
> |   return 0;
> | }
> configure:24791: result: no
> configure:24805: error: Could not run a simple C++ program.  Aborting.
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users

Reply via email to