← Back to team overview

yade-users team mailing list archive

error: bad value (native) for -march= switch, while compiling on a cluster

 

Hi, all:

Have anyone ever met this problem while compiling YADE on a cluster? The scons check has passed but when begin compiling the source:

/data/DEM_CFD/build-svn1942/core/core.cpp:1: error: bad value (native) for -march= switch

The whole error output is:

----------------------------------------------------------------------------------
@@@ Using profile default (scons.profile-default) @@@
Yade version is `svn1942', installed files will be suffixed with `-svn1942'.
All intermediary files will be in `/data/DEM_CFD/build-svn1942'.
Checking whether c++ compiler "g++" works...(cached) yes
Checking for pthread_exit(NULL) in C library pthread... (cached) yes
Checking for boost::system::error_code(); /* non-essential */ in C++ library boost_system-mt... (cached) yes
Checking for boost::thread::thread() in C++ library boost_thread-mt... (cached) yes
Checking for boost::posix_time::time_duration::time_duration() in C++ library boost_date_time-mt... (cached) yes
Checking for boost::filesystem::path() in C++ library boost_filesystem-mt... (cached) yes
Checking for boost::iostreams::file_sink("") in C++ library boost_iostreams-mt... (cached) yes
Checking for boost::regex("") in C++ library boost_regex-mt... (cached) yes
Checking for try{} catch (const boost::archive::archive_exception& e) {} in C++ library boost_serialization-mt... (cached) no
Checking for try{} catch (const boost::archive::archive_exception& e) {} in C++ library boost_serialization... (cached) yes
Checking for boost::program_options::options_description o in C++ library boost_program_options-mt... (cached) yes
Checking for C++ header file boost/foreach.hpp... (cached) yes
Checking for sqlite3_close(0L) in C++ library sqlite3... (cached) yes
Checking for glutGetModifiers() in C library glut... (cached) yes
Checking for qt-mt in /usr/lib64/qt-3.3... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
C /data/DEM_CFD/build-svn1942/core/core.cpp
/data/DEM_CFD/build-svn1942/core/core.cpp:1: error: bad value (native) for -march= switch
/data/DEM_CFD/build-svn1942/core/core.cpp:1: error: bad value (native) for -mtune= switch
C /data/DEM_CFD/build-svn1942/lib/miniWm3.cpp
/data/DEM_CFD/build-svn1942/lib/miniWm3.cpp:1: error: bad value (native) for -march= switch
/data/DEM_CFD/build-svn1942/lib/miniWm3.cpp:1: error: bad value (native) for -mtune= switch
C /data/DEM_CFD/build-svn1942/lib/yade-support.cpp
/data/DEM_CFD/build-svn1942/lib/yade-support.cpp:1: error: bad value (native) for -march= switch
/data/DEM_CFD/build-svn1942/lib/yade-support.cpp:1: error: bad value (native) for -mtune= switch
C lib/sqlite3x/sqlite3x_command.cpp
scons: *** [/data/DEM_CFD/build-svn1942/core/core.o] Error 1
scons: *** [/data/DEM_CFD/build-svn1942/lib/miniWm3.os] Error 1
scons: *** [/data/DEM_CFD/build-svn1942/lib/yade-support.os] Error 1
lib/sqlite3x/sqlite3x_command.cpp:1: error: bad value (native) for -march= switch
lib/sqlite3x/sqlite3x_command.cpp:1: error: bad value (native) for -mtune= switch
scons: *** [/data/DEM_CFD/build-svn1942/lib/sqlite3x/sqlite3x_command.os] Error 1
scons: building terminated because of errors.
----------------------------------------------------------------------------------

I have searched previous posts and found the discussions:

https://lists.launchpad.net/yade-users/msg01271.html
and
http://www.mail-archive.com/yade-users@xxxxxxxxxxxxxxxxxxx/msg00006.html

Jerome Duriez has suggested a solution of upgrading the compiler to g++4.3.3, however, after I have upgraded to g++4.3.3, the problem remains, should I set some value for the CXXFLAGS?

[fchen3@newton0 trunk]$ g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++ --with-pkgversion=OpenFOAM --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-system-zlib --prefix=/home/dm2/henry/OpenFOAM/ThirdParty/gcc-4.3.3/platforms/linux64 --with-mpfr=/home/dm2/henry/OpenFOAM/ThirdParty/mpfr-2.4.1/platforms/linux64 --with-gmp=/home/dm2/henry/OpenFOAM/ThirdParty/gmp-4.2.4/platforms/linux64
Thread model: posix
gcc version 4.3.3 (OpenFOAM) 

Any suggestion is welcome, thank you very much!

Feng Chen
Geotechnical Engineer
HNTB Federal
9100 Bluebonnet Centre Blvd Suite 301
Baton Rouge, LA 70809
http://fchen3.googlepages.com/home


Follow ups