Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
Thanks, Jon
On Thu, 1 May 2014 12:34:43 +0100 Jon Kent jon.kent@gmail.com wrote:
Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
I guess the CFLAGS set on the make command line override the project's Makefile ones causing the header not being found. You should merge the Fedora flags with the relevant ones from the project.
Dan
Thats an idea, hadn't thought of that. Will take a look.
Thanks
On Thu, May 1, 2014 at 12:46 PM, Dan Horák dan@danny.cz wrote:
On Thu, 1 May 2014 12:34:43 +0100 Jon Kent jon.kent@gmail.com wrote:
Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
I guess the CFLAGS set on the make command line override the project's Makefile ones causing the header not being found. You should merge the Fedora flags with the relevant ones from the project.
Dan
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
On Thu 01 May 2014 01:34:43 PM CEST Jon Kent wrote:
Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
Another (relatively common) problem is the parallelization (-j4) tripping the makefile up. I.e. dependencies for some targets are incomplete and config.h is not yet generated when they execute.
-- Stanislav Ochotnicky sochotnicky@redhat.com Business System Analyst, Hosted and Shared Services
PGP: 7B087241 Red Hat Inc. http://cz.redhat.com
On Fri, 2014-05-02 at 07:07 +0200, Stanislav Ochotnicky wrote:
On Thu 01 May 2014 01:34:43 PM CEST Jon Kent wrote:
Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
Another (relatively common) problem is the parallelization (-j4) tripping the makefile up. I.e. dependencies for some targets are incomplete and config.h is not yet generated when they execute.
Any time this turns out to be the problem, add a comment explaining that parallel build is disabled because it causes problems. Otherwise, when someone else comes to handle the .spec, they won't be sure whether parallel make not being used is simply a mistake or an oversight, and may enable it, breaking things again.
On Tue, Jun 10, 2014 at 9:23 PM, Adam Williamson awilliam@redhat.com wrote:
On Fri, 2014-05-02 at 07:07 +0200, Stanislav Ochotnicky wrote:
On Thu 01 May 2014 01:34:43 PM CEST Jon Kent wrote:
Hi,
I'm trying to get a GnuBatch package into Fedora, which is currently being reviewed. One of the points raised in the review was that I was running make without any Fedora options. I've added these as requested so the make line now looks like:
make %{?_smp_mflags} CFLAGS="%{optflags}" BINDIR=%{_bindir}
This expands out to :
make -j4 CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" BINDIR=/usr/bin
However with these options the build is now failing where is was working fine before using just make. The errors are related to being unable to find the header files (i.e. config.h). I've tried added -I option pointing to the header directory but this did not help.
What I don't understand is why this worked before, where as with these make options set the build now fails. Any pointers much appreciated as I'm just going in circles here trying to resolve this problem.
The below is an part of the output I get when this fails:
make[4]: Entering directory `/home/jon/rpmbuild/BUILD/gnubatch-1.10/util' gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c -o helpparse.o helpparse.c helpparse.c:18:20: fatal error: config.h: No such file or directory #include "config.h"
Another (relatively common) problem is the parallelization (-j4) tripping the makefile up. I.e. dependencies for some targets are incomplete and config.h is not yet generated when they execute.
Any time this turns out to be the problem, add a comment explaining that parallel build is disabled because it causes problems.
While this is an option its a kludge ... how about "fix it and send the patch upstream" ?
On Wed, 2014-06-11 at 16:11 +0200, drago01 wrote:
Another (relatively common) problem is the parallelization (-j4) tripping the makefile up. I.e. dependencies for some targets are incomplete and config.h is not yet generated when they execute.
Any time this turns out to be the problem, add a comment explaining that parallel build is disabled because it causes problems.
While this is an option its a kludge ... how about "fix it and send the patch upstream" ?
Obviously better, if you *can*. :)