Skip to content

Instantly share code, notes, and snippets.

@bradfa
Created August 6, 2013 03:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bradfa/6161750 to your computer and use it in GitHub Desktop.
Save bradfa/6161750 to your computer and use it in GitHub Desktop.
GCC 4.7.2 final failing to build with clfs embedded
make[2]: Entering directory `/opt/clfs/clfs-armv7/sources/gcc-build/gcc'
gawk -f ../../gcc-4.7.3/gcc/opt-functions.awk -f ../../gcc-4.7.3/gcc/opt-read.awk \
-f ../../gcc-4.7.3/gcc/opth-gen.awk \
< optionlist > tmp-options.h
/bin/sh ../../gcc-4.7.3/gcc/../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -DGENERATOR_FILE -Wl,-rpath,/opt/clfs/clfs-armv7/cross-tools/lib -o build/genconstants \
build/genconstants.o build/read-md.o build/errors.o ../build-x86_64-cross-linux-gnu/libiberty/libiberty.a
build/errors.o: In function `warning':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/errors.c:52: undefined reference to `__fputc_unlocked'
build/errors.o: In function `error':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/errors.c:67: undefined reference to `__fputc_unlocked'
build/errors.o: In function `fatal':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/errors.c:84: undefined reference to `__fputc_unlocked'
build/errors.o: In function `internal_error':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/errors.c:99: undefined reference to `__fputc_unlocked'
build/genconstants.o: In function `print_enum_type':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/genconstants.c:63: undefined reference to `__fputc_unlocked'
build/read-md.o: In function `read_char':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
build/read-md.o: In function `print_c_condition':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.c:226: undefined reference to `__fputc_unlocked'
build/read-md.o: In function `read_char':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
build/read-md.o: In function `fatal_with_file_and_line':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.c:284: undefined reference to `__fputc_unlocked'
build/read-md.o: In function `read_char':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: undefined reference to `__fgetc_unlocked'
build/read-md.o:/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.h:101: more undefined references to `__fgetc_unlocked' follow
build/read-md.o: In function `message_with_line_1':
/opt/clfs/clfs-armv7/sources/gcc-build/gcc/../../gcc-4.7.3/gcc/read-md.c:240: undefined reference to `__fputc_unlocked'
collect2: error: ld returned 1 exit status
make[2]: *** [build/genconstants] Error 1
make[2]: Leaving directory `/opt/clfs/clfs-armv7/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/opt/clfs/clfs-armv7/sources/gcc-build'
make: *** [all] Error 2
@bradfa
Copy link
Author

bradfa commented Aug 6, 2013

One of a few possible reasons for this:

  1. I am not using a sane uClibc config
  2. Newer uClibc fixes this
  3. Somehow host headers are contaminating the build somewhere in GCC or uClibc.
  4. fat fingering?

@Sfnr
Copy link

Sfnr commented Aug 31, 2016

Did you solve the errors? If you solved them, could you help me?How could you do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment