Hi, I have been trying to build the cross unix/linux compiler and using
the following document;
http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
and all is good until I get to step 6 (of the document and I get this
error. I'm not sure where I need to go to fix this error. I have put in
#ifndef RTLD_PRIVATE_ERRNO
#define RTLD_PRIVATE_ERRNO 1
#endif
in the sysdep.h and dl-sysdep.h header files which cleared some of the
undefined rtld_errno but not all. Please help and steer me in the right
direction.
make[2]: Entering directory '/home/MarkEngel/downloads/glibc-2.26/elf'
make -f /home/MarkEngel/downloads/build-glibc/elf/librtld.mk -f
rtld-Rules
make[3]: Entering directory '/home/MarkEngel/downloads/glibc-2.26/elf'
make subdir=dirent -C ../dirent ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-closedir.os
rtld-readdir.os rtld-rewinddir.os rtld-getdents64.os rtld-fdopendir.os'
make subdir=elf -C ../elf ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-dl-addr-obj.os'
make subdir=gmon -C ../gmon ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-profil.os
rtld-prof-freq.os'
make subdir=io -C ../io ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-xstat.os
rtld-fxstat.os rtld-lxstat.os rtld-open64.os rtld-read.os
rtld-write.os rtld-lseek64.os rtld-access.os rtld-fcntl.os
rtld-close.os'
make[4]: Entering directory '/home/MarkEngel/downloads/glibc-2.26/elf'
make subdir=misc -C ../misc ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-mmap64.os
rtld-munmap.os rtld-mprotect.os'
make subdir=nptl -C ../nptl ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-libc-lowlevellock.os
rtld-libc-cancellation.os rtld-libc_multiple_threads.os rtld-forward.os'
make subdir=posix -C ../posix ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-uname.os rtld-_exit.os
rtld-getpid.os rtld-environ.os'
make[4]: Leaving directory '/home/MarkEngel/downloads/glibc-2.26/elf'
make subdir=setjmp -C ../setjmp ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-setjmp.os
rtld-__longjmp.os'
make subdir=signal -C ../signal ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-sigaction.os'
make subdir=stdlib -C ../stdlib ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-exit.os
rtld-cxa_atexit.os rtld-cxa_thread_atexit_impl.os'
make subdir=string -C ../string ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-strchr.os
rtld-strcmp.os rtld-strcspn.os rtld-strdup.os rtld-strlen.os
rtld-strnlen.os rtld-memchr.os rtld-memcmp.os rtld-memmove.os
rtld-memset.os rtld-mempcpy.os rtld-stpcpy.os rtld-memcpy.os
rtld-rawmemchr.os rtld-strchrnul.os rtld-memcpy_generic.os
rtld-memcpy_thunderx.os'
make subdir=time -C ../time ..=../
objdir=/home/MarkEngel/downloads/build-glibc -f Makefile -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
make[4]: Entering directory '/home/MarkEngel/downloads/glibc-2.26/nptl'
make[4]: Leaving directory '/home/MarkEngel/downloads/glibc-2.26/nptl'
make[3]: Leaving directory '/home/MarkEngel/downloads/glibc-2.26/elf'
aarch64-linux-gcc -nostdlib -nostartfiles -shared -o
/home/MarkEngel/downloads/build-glibc/elf/ld.so.new \
-Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
-Wl,-z,defs \
/home/MarkEngel/downloads/build-glibc/elf/librtld.os
-Wl,--version-script=/home/MarkEngel/downloads/build-glibc/ld.map \
-Wl,-soname=ld-linux-aarch64.so.1 \
-Wl,-defsym=_begin=0
/home/MarkEngel/downloads/build-glibc/elf/librtld.os: In function
`_dl_map_object_from_fd':
/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890: undefined
reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890: undefined
reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890: undefined
reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890: undefined
reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890: undefined
reference to `rtld_errno'
/home/MarkEngel/downloads/build-glibc/elf/librtld.os:/home/MarkEngel/downloads/glibc-2.26/elf/dl-load.c:890:
more undefined references to `rtld_errno' follow
/home/MarkEngel/downloads/build-glibc/elf/librtld.os: In function
`_dl_sysdep_start':
/home/MarkEngel/downloads/glibc-2.26/elf/../elf/dl-sysdep.c:251:
undefined reference to `__libc_check_standard_fds'
/home/MarkEngel/downloads/build-glibc/elf/librtld.os: In function
`__brk':
/home/MarkEngel/downloads/glibc-2.26/elf/../sysdeps/unix/sysv/linux/generic/brk.c:39:
undefined reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/../sysdeps/unix/sysv/linux/generic/brk.c:39:
undefined reference to `rtld_errno'
/home/MarkEngel/downloads/build-glibc/elf/librtld.os: In function
`__sbrk':
/home/MarkEngel/downloads/glibc-2.26/elf/../misc/sbrk.c:54:
undefined reference to `rtld_errno'
/home/MarkEngel/downloads/glibc-2.26/elf/../misc/sbrk.c:54:
undefined reference to `rtld_errno'
/home/MarkEngel/downloads/build-glibc/elf/librtld.os: In function
`__getcwd':
/home/MarkEngel/downloads/glibc-2.26/elf/../sysdeps/unix/sysv/linux/getcwd.c:129:
undefined reference to `rtld_errno'
/home/MarkEngel/downloads/build-glibc/elf/librtld.os:/home/MarkEngel/downloads/glibc-2.26/elf/../sysdeps/unix/sysv/linux/getcwd.c:129:
more undefined references to `rtld_errno' follow
/opt/cross/lib/gcc/aarch64-linux/7.2.0/../../../../aarch64-linux/bin/ld:
/home/MarkEngel/downloads/build-glibc/elf/ld.so.new: hidden symbol
`__libc_check_standard_fds' isn't defined
/opt/cross/lib/gcc/aarch64-linux/7.2.0/../../../../aarch64-linux/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:464:
/home/MarkEngel/downloads/build-glibc/elf/ld.so] Error 1
make[2]: Leaving directory '/home/MarkEngel/downloads/glibc-2.26/elf'
make[1]: *** [Makefile:215: elf/subdir_lib] Error 2
make[1]: Leaving directory '/home/MarkEngel/downloads/glibc-2.26'
make: *** [Makefile:9: all] Error 2
Mark ***@Mark-Development ~/downloads/build-glibc
--
Mark Engel
Software Engineer
630 960-5300
***@comcast.net