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

error: identifier "siginfo_t" is undefined #13

Open
FritzPeppone opened this issue Feb 3, 2022 · 16 comments
Open

error: identifier "siginfo_t" is undefined #13

FritzPeppone opened this issue Feb 3, 2022 · 16 comments

Comments

@FritzPeppone
Copy link

I'm getting an error trying to compile GKlib on a CentOS 7 cluster (therefore, I have to build it myself) using cmake 3.6.1 and gcc 8.1.0. The error while executing make reads as follows:

[ 47%] Building C object CMakeFiles/GKlib.dir/string.c.o
/apps/gcc/gcc-8.1.0-x86_64/bin/gcc   -I/home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/. -I/home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/test  -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99 -fno-strict-aliasing -march=native -fPIC -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3   -o CMakeFiles/GKlib.dir/string.c.o   -c /home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/string.c
In file included from /home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/./GKlib.h:41,
                 from /home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/string.c:21:
/usr/include/signal.h:156:29: Fehler: unbekannter Typname: »siginfo_t«
 extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
                             ^~~~~~~~~
make[3]: *** [CMakeFiles/GKlib.dir/string.c.o] Fehler 1
make[3]: Leaving directory `/home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/build/Linux-x86_64'
make[2]: *** [CMakeFiles/GKlib.dir/all] Fehler 2
make[2]: Leaving directory `/home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/build/Linux-x86_64'
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/home/hpc/iwsp/iwsp041h/PBFSim_Debug/GKlib/build/Linux-x86_64'
make: *** [all] Fehler 2

Does anyone know a solution to this issue?

@FritzPeppone
Copy link
Author

I found a workaround for this issue! The latest commit (Jan. 2022, valgrind) added changes in string.c. Here, the feature test macro _XOPEN_SOURCE is defined, then time.h include and _XOPEN_SOURCE is undefined again. This undefining seems to lead to inconsistencies when including headers later.
I was able to build GKlib on my Cluster by using an older commit (1403a04) which built without any issues.

However I should add, that this build issue only turned up when I tried to build on Cluster. On my local (Ubuntu) machine, both versions compiled without any problems.
I'd be happy to provide more information on this, if required to solve the issue in the latest version.

@nourgaliev
Copy link

I have the same issue on our toss3 system.

@nourgaliev
Copy link

Commenting out also fixed the problem.

@nourgaliev
Copy link

This got to be fixed properly.

@Jeff-Hadley
Copy link

I also ran into the same issue. If you're trying to build GKlib for use with METIS, using the next commit (33b8c8b) along with the current master branch of METIS seems to have worked on our cluster.

@nourgaliev
Copy link

nourgaliev commented Jun 2, 2022

It does not look like GKlib was updated lately. Which branch you are talking about?

@nourgaliev
Copy link

This commit is from January. I made a fresh new clone from master branch in May - still having the issue.

@nourgaliev
Copy link

(Unless it was not merged to master...)

@Jeff-Hadley
Copy link

Jeff-Hadley commented Jun 2, 2022

Sorry, I originally misspoke, our cluster is running Debian and not CentOS, however I was getting the same siginfo_t is undefined error.

As for branch and the commits: The latest commit (a7f8172 from January 30th) on the master branch was causing the siginfo_t issue for us due to some of the changes to the string.h file. I was able to successfully compile the the earlier 33b8c8b commit from Jan 8th and use that build with the most up to date master branch of METIS (commit 94c03a6). The 1403a04 GKlib commit previously suggested as a solution was causing errors when trying to link with the most up to date version of METIS.

@nourgaliev
Copy link

nourgaliev commented Jun 2, 2022

OK. Livermore Computing is using toss3 (transitioning to toss4), RedHat. The solution I have for the latest versions of both MeTiS and GKLib is to comment out these lines. This is not really a solution, rather bandaids. I think the one who put these lines needs to figure out a proper fix.

@nourgaliev
Copy link

It might not be OS related, but rather compiler related. I am building with the latest oneAPI intel compiler. I have not tested if this is needed for gcc11 and clang12. Apparently, commenting these out works for all 3 compilers I am using on toss3.

@jverdicchio
Copy link

jverdicchio commented Jun 30, 2022

I also ran into the same issue. If you're trying to build GKlib for use with METIS, using the next commit (33b8c8b) along with the current master branch of METIS seems to have worked on our cluster.

From a clean "git clone" I attempted to build GKlib on CentOS 7 with gnu9.2 I obtained the same problem and the same fix (early version checkout) also worked.

@vidurayashan
Copy link

I found a workaround for this issue! The latest commit (Jan. 2022, valgrind) added changes in string.c. Here, the feature test macro _XOPEN_SOURCE is defined, then time.h include and _XOPEN_SOURCE is undefined again. This undefining seems to lead to inconsistencies when including headers later. I was able to build GKlib on my Cluster by using an older commit (1403a04) which built without any issues.

However I should add, that this build issue only turned up when I tried to build on Cluster. On my local (Ubuntu) machine, both versions compiled without any problems. I'd be happy to provide more information on this, if required to solve the issue in the latest version.

Worked for me on CentOS 7

@tormentliang
Copy link

Also hit by this, finally I found the reason:
The siginfo_t type conforms to IEEE Std 1003.1-2004 ("POSIX.1").

A _POSIX_C_SOURCE version should be set for the preprocessor to activate siginfo_t.
Adding set(GKlib_COPTIONS "${GKlib_COPTIONS} -D_POSIX_C_SOURCE=199309L") to GKlibSystem.cmake works for me.

@Fern-Parker
Copy link

I also ran into the same issue. If you're trying to build GKlib for use with METIS, using the next commit (33b8c8b) along with the current master branch of METIS seems to have worked on our cluster.

Worked for me on CentOS7

@tianninglyu
Copy link

Also hit by this, finally I found the reason: The siginfo_t type conforms to IEEE Std 1003.1-2004 ("POSIX.1").

A _POSIX_C_SOURCE version should be set for the preprocessor to activate siginfo_t. Adding set(GKlib_COPTIONS "${GKlib_COPTIONS} -D_POSIX_C_SOURCE=199309L") to GKlibSystem.cmake works for me.

It's a pity that this doesn't work for me... Do you have any other ideas? Any help will be highly appreciated.

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

8 participants