Building and Testing Glibc Library

I will be following the instructions on this site:

The testing will be performed on a x86_64 architecture system.

Here is the code:

mkdir $HOME/src
cd $HOME/src
git clone git://
mkdir -p $HOME/build/glibc
cd $HOME/build/glibc
$HOME/src/glibc/configure –prefix=/usr

I will be using another directory for testing:

mkdir -p $HOME/testdir/src
cd $HOME/testdir/src
git clone git://
mkdir -p $HOME/testdir/build/glibc
cd $HOME/testdir/build/glibc
$HOME/testdir/src/glibc/configure –prefix=/usr

The make command took about 17 minute.

I tried to test the build with the command: make test

The make test command failed as the build was not installed.

I did not realize it until reading the instructions further.

Returning to the site:

I found the instructions:

cd $HOME/build/glibc
./ /path/to/test/application

I changed the instructions to represent my current testing directory:

cd $HOME/testdir/build/glibc
./ /home/dcchen/testdir/lab2/hello

The output was:

Hello World!

I copied my program and named it hello3.

I also added an improper code into the hello3 program by putting a 1 at the very beginning of the program as seen here:


I re-ran the compiler using the command:

./ /home/dcchen/testdir/lab2/hello3

This was the result:


I can conclude that the package works as it was running from my testing build directory.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s