lacker / seticore

A high-performance implementation of some core SETI algorithms that can be included in other programs.
MIT License
3 stars 7 forks source link

gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory #2

Closed texadactyl closed 2 years ago

texadactyl commented 2 years ago

git pull

remote: Enumerating objects: 6, done. remote: Counting objects: 100% (5/5), done. remote: Total 6 (delta 4), reused 5 (delta 4), pack-reused 1 Unpacking objects: 100% (6/6), done. From https://github.com/lacker/seticore 157951d..8e0c0de master -> origin/master Updating 157951d..8e0c0de Fast-forward h5_file.cpp | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-)

./make.sh

-- HDF5: Using hdf5 compiler wrapper to determine C configuration CMake Warning at /home/obs/cmake/share/cmake-3.10/Modules/FindHDF5.cmake:687 (message): HDF5 found for language C is not parallel but previously found language is parallel. Call Stack (most recent call first): CMakeLists.txt:7 (find_package)

-- Boost 1.40 found. -- Found Boost components: program_options -- Module support is disabled. -- Version: 8.1.2 -- Build type: -- CXX_STANDARD: 11 -- Required features: cxx_variadic_templates -- Configuring done -- Generating done -- Build files have been written to: /home/texadactyl/seticore/build [ 33%] Built target fmt Scanning dependencies of target seticore [ 44%] Building CXX object CMakeFiles/seticore.dir/h5_file.cpp.o [ 55%] Linking CUDA device code CMakeFiles/seticore.dir/cmake_device_link.o gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory compilation terminated. nvcc fatal : Failed to preprocess host compiler properties. CMakeFiles/seticore.dir/build.make:182: recipe for target 'CMakeFiles/seticore.dir/cmake_device_link.o' failed make[2]: [CMakeFiles/seticore.dir/cmake_device_link.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/seticore.dir/all' failed make[1]: [CMakeFiles/seticore.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

texadactyl commented 2 years ago

Same thing happens using berkeley_make.sh

-- HDF5: Using hdf5 compiler wrapper to determine C configuration
CMake Warning at /home/obs/cmake/share/cmake-3.10/Modules/FindHDF5.cmake:687 (message):
  HDF5 found for language C is not parallel but previously found language is
  parallel.
Call Stack (most recent call first):
  CMakeLists.txt:7 (find_package)

-- Boost 1.40 found.
-- Found Boost components:
   program_options
-- Module support is disabled.
-- Version: 8.1.2
-- Build type: 
-- CXX_STANDARD: 11
-- Required features: cxx_variadic_templates
-- Configuring done
-- Generating done
-- Build files have been written to: /home/texadactyl/seticore/build
[ 33%] Built target fmt
[ 44%] Linking CUDA device code CMakeFiles/seticore.dir/cmake_device_link.o
gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
compilation terminated.
nvcc fatal   : Failed to preprocess host compiler properties.
CMakeFiles/seticore.dir/build.make:182: recipe for target 'CMakeFiles/seticore.dir/cmake_device_link.o' failed
make[2]: *** [CMakeFiles/seticore.dir/cmake_device_link.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/seticore.dir/all' failed
make[1]: *** [CMakeFiles/seticore.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
lacker commented 2 years ago

I think this indicates something is awry with your c++ installation. For example see:

https://stackoverflow.com/questions/22414109/g-error-trying-to-exec-cc1plus-execvp-no-such-file-or-directory

Maybe you just need to sudo apt-get install g++ ? I suppose I never explicitly mentioned that g++ was required, I will add that to the readme.

texadactyl commented 2 years ago

This is the data centre. Rawspec uses C++ for its GPU code.

texadactyl commented 2 years ago

dpkg -l g++

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                          Version                             Architecture                        Description
+++-=============================================================-===================================-===================================-================================================================================================================================
ii  g++                                                           4:5.3.1-1ubuntu1                    amd64                               GNU C++ compiler
texadactyl commented 2 years ago

cpp --version cpp (conda-forge gcc 11.2.0-16) 11.2.0 Copyright (C) 2021 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.

texadactyl commented 2 years ago

By the way, that error (today) is new. It did not happen yesterday.

texadactyl commented 2 years ago

FWIW, here is how rawspec compiles and creates a shared object (.so). You can probably ignore "-gencode arch=compute_NN,code=sm_NN" for the moment. The key phrase here is nvcc -ccbin g++

COMPILE

/usr/local/cuda/bin/nvcc -ccbin g++ -m64 -g -Xcompiler=-fPIC -I/usr/local/cuda/samples/common/inc -dc \
-gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 \
-gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 \
-o rawspec_gpu.o -c rawspec_gpu.cu

SHARED OBJECT

/usr/local/cuda/bin/nvcc -ccbin g++ -shared -m64 -g -Xcompiler=-fPIC -I/usr/local/cuda/samples/common/inc \
-gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 \
-gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 \
-o librawspec.so rawspec_gpu.o rawspec_fbutils.o rawspec_rawutils.o fbh5_open.o fbh5_close.o fbh5_write.o fbh5_util.o -lcufft_static -lculibos -L/usr/local/lib -l :libhdf5.so -l :libhdf5_hl.so
lacker commented 2 years ago

From Slack it sounds like you got this problem fixed