Created attachment 381590 [details] build.log Emerging fails with following errors: pbmtojbg.c:11:18: fatal error: jbig.h: No such file or directory #include "jbig.h" ^ compilation terminated. make[1]: *** [pbmtojbg.o] Error 1 make[1]: *** Waiting for unfinished jobs.... jbgtopbm.c:11:18: fatal error: jbig.h: No such file or directory #include "jbig.h" ^ compilation terminated. make[1]: *** [jbgtopbm.o] Error 1 pbmtojbg85.c:11:20: fatal error: jbig85.h: No such file or directory #include "jbig85.h" ^ compilation terminated. make[1]: *** [pbmtojbg85.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/media-libs/jbigkit-2.1/work/jbigkit-2.1-abi_x86_64.amd64/pbmtools' make: *** [pbm] Error 2
Created attachment 381592 [details] emerge --info '=media-libs/jbigkit-2.1::gentoo'
Your build.log is showing: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -W -march=native -O2 -pipe -c -o pbmtojbg85.o pbmtojbg85.c pbmtojbg.c:11:18: fatal error: jbig.h: No such file or directory But mine is showing: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -frecord-gcc-switches -Wimplicit-function-declaration -W -I../libjbig -c -o jbgtopbm85.o jbgtopbm85.c So your build is missing CPPFLAGS that come from Makefile: ssuominen@null /usr/portage/media-libs/jbigkit $ grep CPPFLAGS files/jbigkit-2.1-build.patch -CPPFLAGS = -I../libjbig +CPPFLAGS += -I../libjbig Now to figure out why...
(In reply to Samuli Suominen from comment #2) > Your build.log is showing: > > x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -W -march=native -O2 -pipe > -c -o pbmtojbg85.o pbmtojbg85.c > pbmtojbg.c:11:18: fatal error: jbig.h: No such file or directory > > But mine is showing: > > x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -frecord-gcc-switches > -Wimplicit-function-declaration -W -I../libjbig -c -o jbgtopbm85.o > jbgtopbm85.c > > So your build is missing CPPFLAGS that come from Makefile: > > ssuominen@null /usr/portage/media-libs/jbigkit $ grep CPPFLAGS > files/jbigkit-2.1-build.patch > -CPPFLAGS = -I../libjbig > +CPPFLAGS += -I../libjbig > > Now to figure out why... Looks like it dislike using CPPFLAGS in make.conf and want to redefine it.
This shouldn't be breaking it, but you have invalid flags in your `emerge --info` output in CPPFLAGS None of these are CPPFLAGS: CPPFLAGS="-march=native -O2 -pipe" CPPFLAGS are preprocessor flags like -DKENNY_WAS_HERE
(In reply to Samuli Suominen from comment #4) > This shouldn't be breaking it, but you have invalid flags in your `emerge > --info` output in CPPFLAGS > > None of these are CPPFLAGS: > > CPPFLAGS="-march=native -O2 -pipe" > > CPPFLAGS are preprocessor flags like -DKENNY_WAS_HERE It builds with commented CPPFLAGS. I have set it because `emerge --info` have shown that it is unset and make.conf.example and man page don't state what it means. I think it should be explained.
I will file a bug against Portage to explain that CPPFLAGS shouldn't be set.
Sorry, you must have misunderstood me, it's OK if you set flags like CPPFLAGS="-DARTEM_RULES_THE_WORLD" in make.conf, and it shouldn't be breaking this build There is something wrong with the multilib conversion of this ebuild, because I see others ignored as well, like "tc-export AR RANLIB" in the ebuild, and then `ar` and `ranlib` directly used instead of full name CCing multilib@g.o since I'm not spotting any obvious error in the ebuild
Figured one part of the bug, + 26 Jul 2014; Samuli Suominen <ssuominen@gentoo.org> jbigkit-2.1.ebuild: + Move tc-export from multilib_src_compile() to src_prepare() so it gets passed + from phase to phase wrt #518150 But the CPPFLAGS += is still unsolved... Howto reproduce: # CPPFLAGS="-DTESTTESTTESTTEST" emerge jbigkit The Makefile's CPPFLAGS += -I../libjbig disappears and doesn't show in the build
ping: The bug still exists. Only most people do no run into it: If you do not build with CPPFLAGS, there is no problem. Moreover, once you emerged successfully without CPPFLAGS, you also do not run into this bug directly, since the corresponding *.h files are then in /usr/include and thus need no CPPFLAGS. However, the latter is a timebomb since it is of course false to use the installed *.h files instead of the provided "fresh" ones. I no better solution exists, perhaps unset the CPPFLAGS in the ebuild.
I've tried "CPPFLAGS="-DBLAHBLAHBLAH" emerge jbigkit" and the build still fails. Is there any way to install this package?
the issue is that the build uses `make -e`. that means env vars are injected as if they were set on the command line. further, the += operator does not append values set on the command line (you might find this surprising, but it's been this way forever). it's why the "override" keyword exists: https://www.gnu.org/software/make/manual/make.html#Override-Directive two ways to fix: (1) don't use the -e flag (it's probably used because they want to pass vars set in the top level Makefile) (2) use override the issue with (2) is that it's not portable afaik (can't find it in POSIX), but then again neither is ?= or += which we use. so blamo: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5aed3a461b936573cff5cfc5cbab1cf28d5ef98e