1

I am a client of a server and don't have root access, so I need to build glbic from binaries. I have downloaded Glibc from this source. Here is my error log.

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for readelf... readelf
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... yes
configure: error: you must configure in a separate build directory

I am following this answer so here is my command.

 adnan@2080Ti:~/Packages/glbic-build$./configure --prefix=$HOME/Packages/glibc-2.27/

I have copied all files from glibc-2.27 to glbic-build , and running from glbic-build but it seems like both are same folder, glbic-build folder should have all files or some specific files or what. It is not clear to me. Please consider that English is not my first language, maybe I am not understanding it right.

What am I doing wrong here?

Update: I installed it as suggested by @MadScientist answer, but after all the hustle, when I use ~$ ldd --version it still shows the 2.23.

Adnan Ali
  • 2,851
  • 5
  • 22
  • 39

1 Answers1

1

You shouldn't copy all the files. Delete the glibc-build directory, then create it again as a completely empty directory. Then from the glibc-build directory run the configure file that's in the source directory. So, like this:

~/Packages$ ls
glibc-2.27     glibc-build

~/Packages$ rm -rf glibc-build

~/Packages$ mkdir glibc-build

~/Packages$ cd glibc-build

~/Packages/glibc-build$ ../glibc-2.27/configure <whatever args you want>

~/Packages/glibc-build$ make

(you may want to pass the -jN option to make, replacing N with the number of CPUs in your system, to speed up the build).

MadScientist
  • 92,819
  • 9
  • 109
  • 136
  • I am running in the conda env here is error i got. *** LD_LIBRARY_PATH shouldn't contain the current directory when *** building glibc. Please change the environment variable *** and run configure again. – Adnan Ali Dec 20 '21 at 06:13
  • output of echo $LD_LIBRARY_PATH /usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64: – Adnan Ali Dec 20 '21 at 06:14
  • I tried outside of the conda. same error. – Adnan Ali Dec 20 '21 at 06:18
  • The problem is you should remove the `:` at the end of your `LD_LIBRARY_PATH` setting. An empty directory on that PATH implies the current directory. – MadScientist Dec 20 '21 at 14:45
  • done, but i think i can not install it with ../glibc-2.27/configure --disable-sanity-checks as i am not admin. so i tried with ../glibc-2.27/configure --prefix="$HOME/local/glibc" and after make and make install i end up with warning: /home/adnan/Packages/glibc-build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /home/adnan/local/glibc/etc/ld.so.conf: No such file or directory make[1]: Leaving directory '/home/adnan/Packages/glibc-2.27' and still old version 2.23 – Adnan Ali Dec 22 '21 at 06:04
  • That is a different question, and not related to building or makefiles. Maybe you can find info by searching for how to install a local version of libc and what needs to be done to allow it. – MadScientist Dec 22 '21 at 14:43