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

Cannot build EMsoft Release/Debug on Ubuntu 20.04, possibly due to missing import in in msleep.c #144

Open
hakonanes opened this issue Apr 18, 2021 · 0 comments

Comments

@hakonanes
Copy link
Contributor

Trying to build EMsoft Release or Debug on Ubuntu 20.04 with latest commits from EMsoft (7cf74b5) and EMsoftSuperbuild (f28e122) throws this error:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/hakon/kode/emsoft/EMsoftBuild/Release
Scanning dependencies of target EMsoftLib_Generate_StringConstants
Scanning dependencies of target EMsoftLib_Cpp
Scanning dependencies of target DIWorkflowTestPrep
Scanning dependencies of target EMsoftLib_C
[  1%] Generating StringConstants files....
[  1%] Building CXX object Test/CMakeFiles/DIWorkflowTestPrep.dir/DIWorkflowTestPrep.cpp.o
[  1%] Building CXX object EMsoftLib/CMakeFiles/EMsoftLib_Cpp.dir/sht_file.cpp.o
[  1%] Building C object EMsoftLib/CMakeFiles/EMsoftLib_C.dir/msleep.c.o
/home/hakon/kode/emsoft/EMsoft/Source/EMsoftLib/msleep.c: In function ‘msleep’:
/home/hakon/kode/emsoft/EMsoft/Source/EMsoftLib/msleep.c:12:16: error: ‘NULL’ undeclared (first use in this function)
   12 |     select (0, NULL, NULL, NULL, &tv);
      |                ^~~~
/home/hakon/kode/emsoft/EMsoft/Source/EMsoftLib/msleep.c:5:1: note: ‘NULL’ is defined in header ‘<stddef.h>; did you forget to ‘#include <stddef.h>’?
    4 | #include <sys/time.h>
  +++ |+#include <stddef.h>
    5 | #endif
/home/hakon/kode/emsoft/EMsoft/Source/EMsoftLib/msleep.c:12:16: note: each undeclared identifier is reported only once for each function it appears in
   12 |     select (0, NULL, NULL, NULL, &tv);
      |                ^~~~
make[2]: *** [EMsoftLib/CMakeFiles/EMsoftLib_C.dir/build.make:63: EMsoftLib/CMakeFiles/EMsoftLib_C.dir/msleep.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1499: EMsoftLib/CMakeFiles/EMsoftLib_C.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Linking CXX executable ../Bin/DIWorkflowTestPrep
[  1%] Built target DIWorkflowTestPrep
[  1%] Built target EMsoftLib_Generate_StringConstants
[  1%] Linking Fortran static library ../Bin/libEMsoftLib_Cpp.a
[  1%] Built target EMsoftLib_Cpp
make: *** [Makefile:163: all] Error 2

After including the suggested import in msleep.c, the Release (haven't tried Debug) build finished successfully.

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