To have a really clean environment for testing, I just tried it with a docker container based on centos/devtoolset-7-toolchain-centos7 and just added bison and make. So that’s my docker file: ``` FROM centos/devtoolset-7-toolchain-centos7 USER 0 RUN yum install -y --setopt=tsflags=nodocs bison devtoolset-7-make && yum clean all -y USER 1001 ``` From there I was just running `configure —prefix=/my/new/dir` and then make Still facing the same error: ``` make[3]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27/elf' gcc -nostdlib -nostartfiles -r -o /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os '-Wl,-(' /builddir/rpmbuild/SOURCES/glibc-build/elf/dl-allobjs.os /builddir/rpmbuild/SOURCES/glibc-build/elf/rtld-libc.a -lgcc '-Wl,-)' \ -Wl,-Map,/builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os.map gcc -nostdlib -nostartfiles -shared -o /builddir/rpmbuild/SOURCES/glibc-build/elf/ld.so.new \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os -Wl,--version-script=/builddir/rpmbuild/SOURCES/glibc-build/ld.map \ -Wl,-soname=ld-linux-x86-64.so.2 \ -Wl,-defsym=_begin=0 /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: In function `process_envvars': /builddir/rpmbuild/SOURCES/glibc-2.27/elf/rtld.c:2677: undefined reference to `__open' /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: In function `dl_main': /builddir/rpmbuild/SOURCES/glibc-2.27/elf/rtld.c:1629: undefined reference to `__access' /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: In function `process_envvars': /builddir/rpmbuild/SOURCES/glibc-2.27/elf/rtld.c:2651: undefined reference to `__access' /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: In function `lose': /builddir/rpmbuild/SOURCES/glibc-2.27/elf/dl-load.c:780: undefined reference to `__close' /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: In function `_dl_get_file_id': /builddir/rpmbuild/SOURCES/glibc-2.27/elf/../sysdeps/posix/dl-fileid.h:37: undefined reference to `__GI___fxstat64' /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: /builddir/rpmbuild/SOURCES/glibc-build/elf/librtld.os: relocation R_X86_64_PC32 against undefined symbol `__GI___fxstat64' can not be used when making a shared object; recompile with -fPIC /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make[2]: *** [Makefile:478: /builddir/rpmbuild/SOURCES/glibc-build/elf/ld.so] Error 1 make[2]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27/elf' make[1]: *** [Makefile:215: elf/subdir_lib] Error 2 make[1]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27' make: *** [Makefile:9: all] Error 2 ``` And as a side note, if I try it with `make -j6` I get this error: ``` make[2]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27/locale' make subdir=localedata -C localedata ..=../ subdir_lib make[2]: Entering directory '/builddir/rpmbuild/SOURCES/glibc-2.27/localedata' .././scripts/mkinstalldirs /builddir/rpmbuild/SOURCES/glibc-build/localedata .././scripts/mkinstalldirs /builddir/rpmbuild/SOURCES/glibc-build/localedata .././scripts/mkinstalldirs /builddir/rpmbuild/SOURCES/glibc-build/localedata mkdir -p -- /builddir/rpmbuild/SOURCES/glibc-build/localedata mkdir -p -- /builddir/rpmbuild/SOURCES/glibc-build/localedata rm -f /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.o; > /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.o mkdir -p -- /builddir/rpmbuild/SOURCES/glibc-build/localedata rm -f /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.os; > /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.os rm -f /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.oS; > /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.oS /bin/sh: /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.oS: File exists make[2]: *** [../Makerules:920: /builddir/rpmbuild/SOURCES/glibc-build/localedata/stamp.oS] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27/localedata' make[1]: *** [Makefile:215: localedata/subdir_lib] Error 2 make[1]: Leaving directory '/builddir/rpmbuild/SOURCES/glibc-2.27' make: *** [Makefile:9: all] Error 2 ``` Any suggestions what am I missing or how can make this finally compile? > Am 29.05.2018 um 14:04 schrieb Andreas Hubert : > > Basically just run > configure —prefix=/somewhere/else > make > > I tried with different options and CFLAGS etc. but currently I always end up with the same error. > Currently I try with CC=“gcc -fPIC” but make takes really a while on my machine.. > When I use make -j6 then I get another error that some .os file does not exist, which I guess in this case is because the multiple jobs disturb each other. > I tried to attach config.log and make.log, but it seemed it didn’t came through on this mailinglist then. > >> Am 29.05.2018 um 13:25 schrieb Florian Weimer : >> >> On 05/29/2018 11:21 AM, Andreas Hubert wrote: >>> I’d like to build glibc under a CentOS to be packed in a RPM and a different root dir. >>> But currently I have problems with my build and hope someone can help me. >> >> I regularly build upstream glibc with DTS 7 and have not seen anything like this. How do you invoke configure and make? >> >> Thanks, >> Florian >