This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
getting fatal error: asm/prctl.h: No such file or directory
- From: Stephen Kirby <thinjogger at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Fri, 11 Oct 2019 12:49:59 -0600
- Subject: getting fatal error: asm/prctl.h: No such file or directory
Hi,
I'm trying to build a GCC cross-compiler, more specifically, I want to
compile on my x86_64-linux-gnu system and execute on Android ARM OS.
I'm following the recipe at
https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler
At step 2, from above, I built the Linux kernel headers, using linux-5.3, I
built with:
%make ARCH=arm INSTALL_HDR_PATH=/home/me/android-29/arm-android-eabi
headers_install
Then step 3, built c,c++,fortran compilers using GCC-9.2.0 with:
configure --prefix=/home/me/android-29 --target=arm-android-eabi
--enable-languages=c,c++,fortran --disable-multilib
%make -j4 all-gcc
%make install-gcc
All is fine to this point.
Step 4 - Build C library headers and startup files using glib-2.30
***This is the problem area***
I configure with:
configure --prefix=/home/me/android-29/arm-android-eabi
--build=x86_64-linux-gnu --target=arm-android-eabi
--with-headers=/home/me/android-29/arm-android-eabi/include
--disable-multilib libc_cv_forced_unwind=yes
**NOTE HERE -- the author of this guide "Preshing" states that GLIBC
"requires" that "build", "host", and "target" must all be specified in the
configure step. He further states that unlike other software packages, for
GLIBC, "both the --host and --target options are meant to describe the
system on which Glibc's libraries will ultimately run on." (Is Preshing
correct on this?) However, when I specify --build=x86_64-linux-gnu
--host=arm-android-eabi and --target=arm-android-eabi in Glibc configure, I
get:
"checking for systems preconfigure fragments... aarch64 alpha arm
configure: WARNING: arm/preconfigure: Did not find ARM architecture type;
using default.
csky hippo i386 m68k microblaze mips nios2 powerpc ryscv s390 sh sparc
x86_64 configure: error: The GNU C Library is currently unavailable for
this platform."
I was able to circumvent this error by NOT specifying --host, but only
specifying --build=x86_64-linux-gnu and --target=arm-android-eabi.
However, not sure this is the proper solution here.
**Any ideas here as to whether what I have done here is reasonable?
I then run in my build-glibc directory,
%make install-bootstrap-headers=yes install-headers
This ran ok.
However, the next command creates the error in the subject line:
%make -j4 csu/subdir_lib
This runs for a bit before saying:
../sysdeps/unix/sysv/linux/x86/include/asm/prctl.h:5:28: fatal error:
asm/prctl.h: No such file or directory #include_next <asm/prctl.h>
I welcome any and all suggestions as to where to go from here regarding
this error.
TIA,
Steve