make can't find sys/signal.h - c

I’m trying to install m4 in MINGW
After ./configure ended normally I tried make but error was occurred.
make[1]: Entering directory `/c/src/autotools/build_m4/src'
gcc -c -DHAVE_CONFIG_H -I.. -I../../m4-1.4/src -I../../m4-1.4/src/../lib -g -O
../../m4-1.4/src/m4.c
../../m4-1.4/src/m4.c:22:24: fatal error: sys/signal.h: No such file or director
y
#include <sys/signal.h>
^
compilation terminated.
make[1]: *** [m4.o] Error 1
make[1]: Leaving directory `/c/src/autotools/build_m4/src'
make: *** [all] Error 1
signal.h is in \c\mingw\include that is set in PATH environment.
How can I tell make where signal.h is?

Converting a comment into an answer:
On most Unix systems, the file /usr/include/signal.h contains #include <sys/signal.h>. It seems that m4 is assuming that there will be a <sys/signal.h> — presumably without having autoconf check that it exists. This could be a bug in (the configuration process for) m4, or it could be a problem with your setup.
Have you been able to compile other GNU programs before? Is there a directory /c/mingw/include/sys (or \c\mingw\include\sys)? If not, you may be able to get going by creating a sys subdirectory in \c\mingw\include (if it is missing) and copying signal.h into it. But it is a hack workaround for a probable bug.
If this works — as it seems to — check whether your MinGW installation was correct and up to date. If so, report the problem to the maintainers of m4 (email bug-m4 at gnu.org), but check the web site for instructions on how to do that.
Consider removing the copied signal.h as it wasn't there originally. OTOH, you may need it again in the future — but personally, I'd feel happier if the installation were in its pristine state normally and the hack was only made when absolutely necessary.

Related

How to compile this dll using SDL with MinGW?

Okay so I have been working on this fork for over a year now and this thing doesn't want to compile as dll on x86-64 mingw running on Windows 10. I am following the original instructions: https://github.com/kometbomb/klystron/wiki/libksnd#compiling-the-library
And this is what it tells (there are other errors which can be fixed but this infuriates me the most):
Building ksndstatic.lib...
make: lib: No such file or directory
make: [Makefile:117: bin.release/libksndstatic.a] Error 127 (ignored)
Linking ksnd.dll...
Building ksnd.lib...
make: lib: No such file or directory
make: [Makefile:127: bin.release/ksnd.dll] Error 127 (ignored)
What the hell is lib?! Is this Visual Studio thing or outdated name for dlltool or libtool? What kind of zombie toolchain is this even made for? (hint: year 2007 or even earlier)
This can be relatively easy compiled as a submodule using the same windows mingw toolchain: https://github.com/kometbomb/klystrack
Or, if this does not work, try my fork: https://github.com/ltva1/klystrack
So the question is how to compile it at least with SDL linkage? Maybe I will be able to get it to work with native OSes APIs but at least I want a dll I can use in other C/C++ project.
Okay, the static linking works at least. There are some problems with audio buffer but this is outside of this question scope. I followed the advices in the thread above: undefined COMSPEC and added linkage to winmm in the case COMSPEC is not defined. See makefile changes there: https://github.com/LTVA1/klystron/commit/47e4c31c86833ce8d879d4474ba4045e95ea1a22 (COMSPEC undefine thing is commented out so main project which uses the repo as submodule gets compiled; -lwsock32 thing is unneded actually). At least I get the sound from the thing. Will wait 2 days to accept as answer.

Trouble Installing CompCert C compiler on Ubuntu

I'm installing CompCert C compiler as instructed here: https://compcert.org/man/manual002.html.
However I'm stuck at the stage where I "Run the configure script with appropriate options: ./configure [option …] target "
The console output is:
~/compcert/CompCert-3.8$ ./configure -use-external-MenhirLib x86_64-linux
Testing assembler support for CFI directives... yes
Testing linker support for '-no-pie' / '-nopie' option... yes, '-no-pie'
Testing Coq... version 8.11.0 -- good!
Testing OCaml... version 4.08.1 -- good!
Testing OCaml native-code compiler...yes
Testing OCaml .opt compilers... yes
Testing Menhir... version 20200123 -- good!
Error: cannot determine the location of the Menhir API library.
This can be due to an incorrect Menhir package.
Consider using the OPAM package for Menhir.
Testing GNU make... version 4.2.1 (command 'make') -- good!
One or several required tools are missing or too old. Aborting.
I'm running Ubuntu 20.04 LTS.
[Edit: I managed to run the ./configure. However I cannot reproduce the exact method how I did it. Now I'm stuck in a different part.]
Follow-up question:
When running make all I receive the following output:
/compcert/CompCert-3.8$ make all
make proof
make[1]: Entering directory '/home/user/compcert/CompCert-3.8'
COQC Axioms.v
Error: Can't find file ./Axioms.v
make[1]: *** [Makefile:226: Axioms.vo] Error 1
make[1]: Leaving directory '/home/user/compcert/CompCert-3.8'
make: *** [Makefile:155: all] Error 2
I fixed that problem by copying lib/Axiom.v to the root. The make all then complained about another library in lib/ so I moved a bunch of them until I received the following error:
~/compcert/CompCert-3.8$ make all
make proof
make[1]: Entering directory '/home/user/compcert/CompCert-3.8'
COQC Ordered.v
File "./Ordered.v", line 90, characters 16-19:
Error: The reference int was not found in the current environment.
make[1]: *** [Makefile:226: Ordered.vo] Error 1
make[1]: Leaving directory '/home/user/compcert/CompCert-3.8'
make: *** [Makefile:155: all] Error 2
And now I'm stuck once again.
It seems that you have an incorrect version of the menhirLib. See these lines in the configure script in the build system which lead to this error. I think the problem is that you installed a different version of menhirLib, possibly using your package manager.
I suggest you to run the following commands to install the latest menhirLib from the opam:
opam update
opam install menhir menhirLib
This should help.

Unable to integrate CBMC into build systems

I'm trying to use CBMC (C Bounded Model Checking: https://www.cprover.org/cbmc/) on open-source C projects from GitHub. For the purpose of this question, let's consider the following project: https://github.com/reubenhwk/radvd
The problem arises when I compile the project with gcc. I'm able to obtain the executable file on which call cbmc like
cbmc radvd
but I obtain the following error message:
CBMC version 5.8 64-bit x86_64 linux
failed to open input file radvd`
The reason should be the fact that I used gcc instead of goto-cc (as explained here: http://www.cprover.org/cprover-manual/goto-cc.html), so might it's unable to recognize the file.
I also tried to use goto-cc as explained in the previous link and in some example like http://www.cprover.org/goto-cc/examples/nanosat.html. However, since they are guided examples it seems to be easy to make cbmc work. When I do the same process with other project, like the linked one (radvd) and use goto-cc instead of gcc I obtain the following message when running make CC=goto-cc command:
make all-am
make[1]: Entering directory '/home/stefano/Documents/github/radvd'
YACC gram.c
updating gram.h
CC libradvd_parser_a-gram.o
/usr/include/stdlib.h:133:1: error: syntax error before 'strtof128'
PARSING ERROR
Makefile:941: recipe for target 'libradvd_parser_a-gram.o' failed
make[1]: *** [libradvd_parser_a-gram.o] Error 1
make[1]: Leaving directory '/home/stefano/Documents/github/radvd'
Makefile:755: recipe for target 'all' failed
make: *** [all] Error 2`
I'm currently using the version 5.8 of cbmc on a virtual Linux machine (Ubuntu 17.10).
Do you have any idea on how make it work?
Thank you

HAWQ installation on Redhat

I am installing HAWQ on RedHat servers provisioned on Amazon EC2. I already have HDP 2.3 setup on the cluster.
I have cloned HAWQ from Github.
First I run ./configure --prefix=/opt/hawq.
In the second step, I run make.
The dependencies are compiling correctly when I run make from the root folder of incubator-hawq. The following error occours when make moves to compiling from src folder in the root directory (incubator-hawq):
make[2]: Entering directory `/root/incubator-hawq/src/port'
gcc -O3 -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -I/usr/include/libxml2 -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/root/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include -I/root/incubator-hawq/depends/libyarn/build/install/usr/local/hawq/include -c -o copydir.o copydir.c
In file included from copydir.c:25:0:
../../src/include/storage/fd.h:61:23: fatal error: hdfs/hdfs.h: No such file or directory
#include "hdfs/hdfs.h"
^
compilation terminated.
make[2]: *** [copydir.o] Error 1
make[2]: Leaving directory `/root/incubator-hawq/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/incubator-hawq/src'
make: *** [all] Error 2
I know the compiler cannot find hdfs/hdfs.h, but as the dependencies (libhdfs3) compiled successfully, I don't understand why the particular file isn't found. Please help if somebody has come across the same problem as I am pretty much stuck here.
Could you check file /root/incubator-hawq/depends/libhdfs3/build/install/usr/local/hawq/include/hdfs/hdfs.h exists?
If not, then it should be build defect, please open defect to hawq team or email to: dev#hawq.incubator.apache.org. Thanks.
Do you have a folder in incubator-hawq/depends/libhdfs3/build/installafter make?
The problem seems that libhdfs3 dependency is not successfully built. There are some possible reasons for that: using a old version gcc(<4.7), configuration error of libhdfs3.
To test my words, you could try this:
cd incubator-hawq/depends/libhdfs3
mkdir build_debug && cd build_debug
cmake ..
make
If you could successfully do that, I think there is another reason for your problem. In this case, could you paste the information with more building lines?
Another possible reason is that you use different configuration prefix. In this case, you should run make distclean before another configuration.

kernel source 3.10.0-229.11.1.el7.x86_64 compilation fails

I updated my gcc from 4.8 to 5.2. After updating gcc I am trying to compile kernel with newer gcc. I am getting a compilation issue
make[1]: *** No rule to make target `/usr/src/kernels/3.10.0-229.11.1.el7.x86_64/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'. Stop.
make: *** [archheaders] Error 2
Even after googling several hours. I could not find solution to this problem. Please help!
That target file is part of the source code. Maybe you or someone else deleted it accidentally?

Resources