xcfem / xc

finite element analysis package for civil engineering structures.
http://www.xcengineering.xyz/html_files/software.html
GNU General Public License v3.0
266 stars 54 forks source link

cc1plus: error: bad value ('tigerlake') for '-march' switch #106

Closed GJoe2 closed 2 years ago

GJoe2 commented 2 years ago

Describe the bug $ make -j 2 gives some errors in a docker container (ubuntu 20.04)

cc1plus: error: bad value ('tigerlake') for '-march=' switch
cc1plus: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 native
cc1plus: error: bad value ('tigerlake') for '-march=' switch
cc1plus: error: bad value ('tigerlake') for '-mtune=' switch
cc1plus: note: valid arguments to '-mtune=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native
cc1plus: note: valid arguments to '-march=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 native
cc1plus: error: bad value ('tigerlake') for '-mtune=' switch
cc1plus: note: valid arguments to '-mtune=' switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native
make[2]: *** [CMakeFiles/xc_utils.dir/build.make:63: CMakeFiles/xc_utils.dir/utility/sqlite/SqLiteObject.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/xc_utils.dir/build.make:76: CMakeFiles/xc_utils.dir/utility/sqlite/SqLiteQuery.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:174: CMakeFiles/xc_utils.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

To Reproduce 1- docker pull ubuntu 2- docker exec -it ID bash 3-apt-get update && apt-get install -y sudo wget && \ useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo 3- wget https://raw.githubusercontent.com/xcfem/xc/master/install/packages_install_ubuntu_focal_fossa.sh 4- sudo bash packages_install_ubuntu_focal_fossa.sh 5- wget https://raw.githubusercontent.com/xcfem/xc/master/install/gmsh_code_install.sh 6-bash gmsh_code_install.sh 7- copy each line of https://github.com/xcfem/xc/blob/master/install/xc_code_install.sh (error in line 57: $ make -j 2 )

Expected behavior Get installed xc on a docker image (ubuntu 20.04)

Desktop (please complete the following information):

Additional context I tried using the instruction provided by https://hub.docker.com/r/antonsurv/xcfem

There are some weird logs in

$ ~/build_xc/build-xc# cmake ../xc/src
Make version is greater than 2.8.4
-- xc project dir: /root/build_xc/xc/
-- xc include dir: /root/build_xc/xc/src/
-- xc lib dir: /root/build_xc/xc/lib
-- ************* find packages begins ****************
-- The imported target "vtkHashSource" references the file
   "/usr/bin/vtkHashSource-6.3"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

LOGS make -j 2.txt cmake ..⁄xc⁄src.txt

lcpt commented 2 years ago

Hi, @GJoe2

The weird messages about the VTK imported targets are not important. I've tried to make them disappear some years ago, but it was not worth it. All works perfectly fine despite those messages.

On the other hand, the c++ compiler message:

cc1plus: error: bad value ('tigerlake') for '-march=' switch

Makes me think that there is a problem using the cross-compiling options for g++. Could this be related to the use of docker?

Sorry, I've never used docker, so I don't understand very well what's going on. Maybe @antonsurv could give us a hand.

Josileissu commented 2 years ago

i'm getting same error on my new notebook..

lcpt commented 2 years ago

Are you using Docker? Ubuntu? Debian?

Josileissu commented 2 years ago

Hm, i used an solution from internet to correct this. It occurs with gcc-9 e g++-9. Then i update this for gcc-10 e g++-10. And now i'm able to study the scripts... thx

lcpt commented 2 years ago

Great!. Could you post here a link to the web page you used to solve this?

Josileissu commented 2 years ago

here i see the same error: https://stackoverflow.com/questions/64493692/cc1plus-error-bad-value-tigerlake-for-march-switch-compilation-error

lcpt commented 2 years ago

Thanks for the reference! I think we can close this issue now :)