You are not logged in.

#1 2013-07-26 20:43:56

phillme
Member
Registered: 2013-07-26
Posts: 10

[SOLVED] fatal error: config.h: No such file or directory in builds

Hello everyone!
I enjoy archlinux a lot since a few years. However, I found a problem I cannot solve although I searched forums, web and wiki.

Since a few months packages / programs do not longer build correctly for me. The errors always relate to a missing config.h. The following example is from gcc. Language errors result from setting the LANG variable for the build to get English error messages. It does not work if not setting LANG either. The log is from extracted from a paktahn build.

# end of configure

configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (EN)
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (EN)
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (EN)

#make starts here

make[3]: Entering directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build/libiberty'
if [ x"-fpic" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  -fpic ../../libiberty/regex.c -o pic/regex.o; \
else true; fi
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (EN)
../../libiberty/regex.c:39:22: fatal error: config.h: No such file or directory
 #  include <config.h>
                      ^
compilation terminated.
make[3]: *** [regex.o] Error 1
make[3]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build/libiberty'
make[2]: *** [all-stage1-libiberty] Error 2
make[2]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build'
make: *** [all] Error 2

I do not know what to do. It is my third try to get this working but regrettably to no avail. I would be really glad if someone could point me into the right direction.

Thanks in advance
phillme

Last edited by phillme (2013-09-11 17:41:13)

Offline

#2 2013-07-26 20:45:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

What is the output of locale and locale -a?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-07-27 03:16:21

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

locale

LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME=de_DE.UTF-8
LC_COLLATE=C
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

locale -a

C
POSIX
de_DE
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
deutsch
en_US
en_US.iso88591
en_US.utf8
german

I called paktahn with "LC_ALL=EN paktahn -S gcc-gcj"  to get English error output for this post. Without doing this the errors are the same.

Errors without setting LC_ALL

configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
make[3]: Entering directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build/libiberty'
if [ x"-fpic" != x ]; then \
  gcc -c -DHAVE_CONFIG_H -g  -I. -I../../libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  -fpic ../../libiberty/regex.c -o pic/regex.o; \
else true; fi
../../libiberty/regex.c:39:22: schwerwiegender Fehler: config.h: Datei oder Verzeichnis nicht gefunden
 #  include <config.h>
                      ^
Kompilierung beendet.
make[3]: *** [regex.o] Fehler 1
make[3]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build/libiberty'
make[2]: *** [all-stage1-libiberty] Fehler 2
make[2]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build'
make[1]: *** [stage1-bubble] Fehler 2
make[1]: Leaving directory `/home/caspar/.paktahn/aur/gcc-gcj/src/gcc-4.8.1/build'
make: *** [all] Fehler 2

Last edited by phillme (2013-07-27 03:21:43)

Offline

#4 2013-07-27 03:25:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

Do builds work with makepkg? That is without using paktahn?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-07-29 07:52:42

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

jasonwryan wrote:

Do builds work with makepkg? That is without using paktahn?

No. Regrettably not.

Offline

#6 2013-07-29 20:16:42

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

Is there nothing I can do? I am no C expert, but it seems that autoconf is not generating needed config.h files. However, I really do not know why as the build environment worked perfectly several months ago.

Offline

#7 2013-07-29 20:47:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

Is your systemd fully up-to-date? What versions of makepkg and gcc are you using?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2013-07-30 08:17:42

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

System is fully up to date. Last update was 24 hours ago or so.

makepkg (pacman) 4.1.2
gcc (GCC) 4.8.1
core/systemd 204-3

Offline

#9 2013-07-30 09:04:48

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

phillme wrote:

config.h: No such file or directory
#  include <config.h>

So, which config.h is it looking for? My first suspect is /usr/include/isl/config.h from isl, used by cloog & gcc.

Offline

#10 2013-07-31 07:58:46

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

I started the gcc-gcj build with makepkg again. The corresponding line seems to be "../../libiberty/regex.c:39:22: fatal error: config.h: No such file or directory"
You can also see the full output at http://pastebin.com/UrgXDUxk .

Last edited by phillme (2013-07-31 07:59:03)

Offline

#11 2013-07-31 08:13:19

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no

You have 0.12, so compile with:

--disable-isl-version-check

Offline

#12 2013-08-01 07:54:45

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

Same error :-( http://pastebin.com/YSu2JCXY .
Could it be that autoconf is somehow not generating config.h files? Could it be a makepkg configuration issue as I have the same errors in many other builds?

Last edited by phillme (2013-08-01 07:55:42)

Offline

#13 2013-08-02 01:02:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

Did you try brebs's suggestion?

If you think it is a makepkg config issue, try using the default config file and see if it works. If you think autoconf is not creating config.h files, take a look and see if they are created or not.

Note that gcc-gcj is a pain (https://aur.archlinux.org/packages/gcc-gcj/) which takes forever to compile even when it does work. It's been especially dicey lately, though.

Last edited by cfr (2013-08-02 01:03:46)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2013-08-04 12:27:46

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

cfr wrote:

Did you try brebs's suggestion?

If you think it is a makepkg config issue, try using the default config file and see if it works. If you think autoconf is not creating config.h files, take a look and see if they are created or not.

Note that gcc-gcj is a pain (https://aur.archlinux.org/packages/gcc-gcj/) which takes forever to compile even when it does work. It's been especially dicey lately, though.

post
I tried breb's suggestion. The output from my last post shows the result. I will try your suggestions and revalidate if autoconf is not creating files (I already checked a few months ago and do not remember the results exactly).

GCC-ecj is really a "big" build. I will try to find a smaller build which also shows the error. So far so good. I'll post the results.

Thanks so far.

Offline

#15 2013-09-11 17:40:27

phillme
Member
Registered: 2013-07-26
Posts: 10

Re: [SOLVED] fatal error: config.h: No such file or directory in builds

I finally found a solution. However, I do not know which problem it has been exactly ;-). It seems that I messed up my build environment somehow.
Simply do the following to fix the error:

  1. Identify files not owned by any package and afterwards identify and delete library files you find in there and which you do not need. Look here on how to do this https://wiki.archlinux.org/index.php/Pa … ny_package

  2. Delete /var/cache/ldconfig/aux-cache and rerun ldconfig like described here https://bbs.archlinux.org/viewtopic.php?id=83944

  3. Run paktahn from aur "paktahn -Su --aur" and remove all packages which are not longer available

  4. Reinstall all packages and force overwriting of existing files like so "pacman -Qenq | pacman -S --force -" . Be sure that forced overwrite does not destroy something for you.

  5. Reboot

After that the error of a missing config.h file was resolved for me in all builds.
Thank you all for your hints! This really is a relief as I had this problem for months.

Last edited by phillme (2013-09-17 11:59:18)

Offline

Board footer

Powered by FluxBB