Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: stdlib.h #1

Open
vitduck opened this issue Jun 22, 2022 · 0 comments
Open

Compilation error: stdlib.h #1

vitduck opened this issue Jun 22, 2022 · 0 comments

Comments

@vitduck
Copy link

vitduck commented Jun 22, 2022

OS: Ubuntu 18.04
GCC: 7.5
ROCM: 5.1.3
GPU: MI200

  1. Steps to reproduce:
mkdir build 
cmake .. -DGMX_GPU_USE_AMD=on -DGMX_BUILD_OWN_FFTW=ON  -DCMAKE_CXX_FLAGS="-I/usr/include"
make 
  1. Error message:
[  1%] Building CXX object src/programs/CMakeFiles/mdrun_objlib.dir/mdrun/mdrun.cpp.o
cd [...] && /usr/bin/c++ -DGMX_DOUBLE=0 -DHAVE_CONFIG_H -I/global/home/tyhong/build/src/gromacs-rocm/build/src/external/build-fftw/fftwBuild-prefix/include -I/global/home/tyhong/build/src/gromacs-rocm/build/src -I/global/home/tyhong/build/src/gromacs-rocm/src -isystem /global/home/tyhong/build/src/gromacs-rocm/src/external/thread_mpi/include -isystem /usr/include -I/usr/include -O3 -DNDEBUG -mavx2 -mfma -Wall -Wextra -Wno-missing-field-initializers -Wpointer-arith -Wmissing-declarations -Wundef -fexcess-precision=fast -funroll-all-loops -Wno-array-bounds -std=c++14 -o CMakeFiles/mdrun_objlib.dir/mdrun/mdrun.cpp.o -c /global/home/tyhong/build/src/gromacs-rocm/src/programs/mdrun/mdrun.cpp
In file included from /usr/include/c++/7/ext/string_conversions.h:41:0,
                 from /usr/include/c++/7/bits/basic_string.h:6361,
                 from /usr/include/c++/7/string:52,
                 from /usr/include/c++/7/stdexcept:39,
                 from /usr/include/c++/7/array:39,
                 from /usr/include/c++/7/tuple:39,
                 from /usr/include/c++/7/bits/unique_ptr.h:37,
                 from /usr/include/c++/7/memory:80,
                 from /global/home/tyhong/build/src/gromacs-rocm/src/programs/mdrun/mdrun.cpp:57:
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.

Actually the C stdlib.h is already located under /usr/include.

$ ls /usr/include/stdlib.h
/usr/include/stdlib.h

I not sure why it was not picked up.
Please kindly advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant