[Bug other/82708] libmpx fails to compile due to PATH_MAX
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 25 16:39:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82708
--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Wed, 25 Oct 2017, keno at juliacomputing dot com wrote:
> First, the build process looking for the headers in <path>/sys-include rather
> than <path>/include where glibc installs them. Leads to the same symptoms as
> reported in this issue.
You should be using a sysroot; directories such as $target/include and
$target/sys-include should only ever have libc headers in bare-metal cases
where you're using e.g. newlib and the concept of a native directory
structure is meaningless. The sysroot must *not* be the same as the
$prefix where the compiler is installed, or as $prefix/$target; it needs
to be another directory, e.g. $prefix/$target/sysroot. glibc must be
configured with --prefix=/usr and installed under the sysroot.
> Then, I tried using --with-sysroot which I wasn't using before, but then I got
> confusion between <sysroot>/usr/include and <sysroot>/include (most parts of
$sysroot/include should not exist. Again, sysroot must not be
$prefix/$target.
(However, sysroot/lib and sysroot/usr/lib must exist even for
configurations using directories such as lib64, though they can be empty
directories in that case. Again, see how build-many-glibcs.py does
things.)
More information about the Gcc-bugs
mailing list