Note that there are some explanatory texts on larger screens.

plurals
  1. POLFS:gcc compile error: fatal error: string.h: No such file or directory
    primarykey
    data
    text
    <p>I'm trying to work my way through <a href="http://www.linuxfromscratch.org/lfs/view/stable/index.html" rel="nofollow">Linux From Scratch</a>. I am running into the compiler:</p> <blockquote> <p>error : string.h: No such file or directory</p> </blockquote> <p>when trying to compile gcc for the target system as per <a href="http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass1.html" rel="nofollow">Chapter 5: gcc-4.8.1-pass 1</a>. </p> <p>More details about the error:</p> <blockquote> <p>-fexceptions -fnon-call-exceptions -fvisibility=hidden -DHIDE_EXPORTS /mnt/lfs/sources/gcc-build/./gcc/xgcc -B/mnt/lfs/sources/gcc-build/./gcc/ -B/tools /x86_64-lfs-linux-gnu/bin/ -B/tools/x86_64-lfs-linux-gnu/lib/ -isystem /tools/x86_64- lfs-linux-gnu/include -isystem /tools/x86_64-lfs-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual<br> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include<br> -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc-4.8.1/libgcc -I../../../gcc-4.8.1/libgcc/. -I../../../gcc-4.8.1/libgcc/../gcc -I../../../gcc-4.8.1/libgcc/../include -I../../../gcc-4.8.1/libgcc/../libdecnumber/no -I../../../gcc-4.8.1/libgcc/../libdecnumber -DHAVE_CC_TLS -DUSE_TLS -o decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c ../../../gcc-4.8.1/libgcc/../libdecnumber/decContext.c ../../../gcc-4.8.1/libgcc/../libdecnumber/decContext.c:33:43: fatal error: string.h: No such file or directory #include /* for strcmp <em>/ ^ compilation terminated. make[2]: <strong></em> [decContext.o] Error 1 make[2]: Leaving directory <code>/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory</code>/mnt/lfs/sources/gcc-build' make: *</strong> [all] Error 2</p> </blockquote> <p>Additional information that might be of use:</p> <ol> <li>I am running ubuntu linux with gcc 4.8.1</li> <li>I have installed the build-essential package and it is the most recent version</li> <li>The file string.h <em>is</em> present</li> </ol> <p>Thanks in advance for any help.</p> <p>This is the code I am running:</p> <pre><code>../gcc-4.8.1/configure \ --target=$LFS_TGT \ --prefix=/tools \ --with-sysroot=$LFS \ --with-newlib \ --without-headers \ --with-local-prefix=/tools \ --with-native-system-header-dir=/tools/include \ --disable-nls \ --disable-shared \ --disable-multilib \ --disable-decimal-float \ --disable-threads \ --disable-libatomic \ --disable-libgomp \ --disable-libitm \ --disable-libmudflap \ --disable-libquadmath \ --disable-libsanitizer \ --disable-libssp \ --disable-libstdc++-v3 \ --enable-languages=c,c++ \ --with-mpfr-include=$(pwd)/../gcc-4.8.1/mpfr/src \ --with-mpfr-lib=$(pwd)/mpfr/src/.libs </code></pre> <p>then it breaks on <code>make</code>. I am executing this command from <code>$LFS/sources/gcc-build</code>. <code>gcc-4.8.1</code> is located in <code>$LFS/sources</code>. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload