[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Missing file "config.h"
From: |
Pádraig Brady |
Subject: |
Re: Missing file "config.h" |
Date: |
Fri, 5 Jul 2024 10:45:38 +0100 |
User-agent: |
Mozilla Thunderbird Beta |
On 05/07/2024 09:51, Björn Försterling via GNU coreutils General Discussion
wrote:
Hello,
I cloned the repository https://github.com/coreutils/coreutils.git and
tried to compile some of the programs it contains.
But the files include a file called "config.h".
$ gcc -Wall hostname.c
hostname.c:19:10: fatal error: config.h: No such file or directory
19 | #include <config.h>
| ^~~~~~~~~~
compilation terminated.
How can I get this file? Is it included in some package? Or do I have
to run a specific tool or script first?
The process for building from the git repo is detailed at:
https://github.com/coreutils/coreutils/blob/master/README-hacking
For a bit less involved method (with less developer oriented dependencies)
you may prefer to build from a tarball, like for example:
wget https://ftp.gnu.org/gnu/coreutils/coreutils-9.5.tar.xz
tar -xf coreutils-9.5.tar.xz
cd coretuils-9.5
./configure --quiet && make
The configure process generates the required config.h
Note `hostname` isn't built by default,
but you can then do so manually with:
make V=1 src/hostname
If you wanted to persist the building of `hostname` in a build system,
the best way to do that would be with the '--enable-install-program=hostname'
configure option.
cheers,
Pádraig