microsoft / GSL

Guidelines Support Library
Other
6.13k stars 737 forks source link

GSL compile error in loongarch64(cpu) #1055

Closed chinchilla-forest closed 1 year ago

chinchilla-forest commented 1 year ago

I use vcpkg to build GSL.The error is "src/vcpkg/base/system.cpp:131:2: error: #error "Unknown host architecture" #error "Unknown host architecture" ". From system.cpp:131,the reason is that my cpu (loongarch64) doesn't matched any of the gsl support.So does gsl has the plan to support loongarch64? this is all output [root@loongson-10 build]# cd ../../vcpkg/ [root@loongson-10 vcpkg]# ./bootstrap-vcpkg.sh Unable to determine a binary release of vcpkg; attempting to build from source. Building vcpkg-tool... -- The CXX compiler identification is GNU 8.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting the C++ compiler in use -- Detecting the C++ compiler in use - gcc -- Module support is disabled. -- Version: 9.1.0 -- Build type: Release -- CXX_STANDARD: 17 -- Performing Test has_std_17_flag -- Performing Test has_std_17_flag - Success -- Performing Test has_std_1z_flag -- Performing Test has_std_1z_flag - Success -- Required features: cxx_variadic_templates -- Performing Test CPP_ATOMIC_BUILTIN -- Performing Test CPP_ATOMIC_BUILTIN - Success -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Configuring done -- Generating done -- Build files have been written to: /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/build [0/2] Re-checking globbed directories... [14/157] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/base/system.cpp.o FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/base/system.cpp.o /usr/bin/g++ -DVCPKG_BASE_VERSION=2999-12-31 -DVCPKG_VERSION=unknownhash -I/home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/include -I/home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/build/_deps/fmt-src/include -O3 -DNDEBUG -include /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/include/pch.h -pthread -std=c++17 -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/base/system.cpp.o -MF CMakeFiles/vcpkglib.dir/src/vcpkg/base/system.cpp.o.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/base/system.cpp.o -c /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/src/vcpkg/base/system.cpp /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/src/vcpkg/base/system.cpp:131:2: error: #error "Unknown host architecture"

error "Unknown host architecture"

^~~~~ /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/src/vcpkg/base/system.cpp: In function ‘vcpkg::CPUArchitecture vcpkg::get_host_processor()’: /home/hz_dev/s_code/tt/vcpkg/buildtrees/_vcpkg/src/vcpkg-tool-2022-09-20/src/vcpkg/base/system.cpp:134:5: warning: no return statement in function returning non-void [-Wreturn-type]

chinchilla-forest commented 1 year ago

sorry,it's vcpkg's problem not gsl.