GLIBC 2.14 not found

Programming, for all ages and all languages.
Post Reply
shyoso
Posts: 2
Joined: Tue Feb 11, 2014 5:14 pm

GLIBC 2.14 not found

Post by shyoso »

Hi, I am new to OSDev and have been following the tutorials on this wiki, as well as Bran's Kernel Development Tutorial. I compiled the GCC cross compiler yesterday and everything worked fine. Today my cross compiler gave the following error:

nasm -felf boot.asm -o boot.o
i586-elf-gcc -std=c99 -ffreestanding -O2 -Wall -Wextra -c gdt.c
i586-elf-gcc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by i586-elf-gcc)
make: *** [gdt.o] Error 1

Why does it require the C library? I tried adding -nostdlib and -nodefaultlibs to CFLAGS but it gave the same error message. Is there a way to get around this? Thanks.
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: GLIBC 2.14 not found

Post by Nable »

Common, turn on your common sense.
Flags has nothing to do with the fact that executable of your cross-compiler cannot be executed due to missing library.
Maybe you moved it, maybe it was some update but you have to get this library back or recompile your cross-compiler with new versions of libraries.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: GLIBC 2.14 not found

Post by sortie »

Your cross-compiler doesn't work. It was built on another system and your libc is not compatible. You must recompile it. Don't download other people's builds.

Additionally, you are not using gcc correctly. Go read Bare Bones from the wiki again, carefully.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: GLIBC 2.14 not found

Post by pcmattman »

Alternatively, check your system logs to make sure that between when it 'worked' and when it no longer works you haven't managed to get an automatic glibc update (how exciting).
shyoso
Posts: 2
Joined: Tue Feb 11, 2014 5:14 pm

Re: GLIBC 2.14 not found

Post by shyoso »

Thanks for the replies. This is what I did today:

- First, I ran make distclean and tried to recompile my cross compiler, following the steps in the "Bare Bones" section. This did not work and gave me the same error.
- Then, I went to /var/log and searched for mentions of glibc. I found it in installer/status:

"Package: libc6-udeb
Status: install ok installed
Priority: extra
Section: debian-installer
Installed-Size: 2490
Maintainer: GNU Libc Maintainers <[email protected]>
Version: 2.13-38+deb7u1
Provides: glibc-2.13-1, libc-udeb, libc6"

- I tried looking for ways to upgrade it, but apt-get tells me this is the latest version.
- Last, I used apt-get to remove it, just to see if it would work:

"sudo apt-get remove libc6-dev
The following packages will be REMOVED:
g++ g++-4.7 libc6-dev libstdc++6-4.7-dev
0 upgraded, 0 newly installed, 4 to remove and 3 not upgraded.
After this operation, 38.5 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 146998 files and directories currently installed.)
Removing g++ ...
Removing libstdc++6-4.7-dev ...
Removing libc6-dev:amd64 ...
Removing g++-4.7 ...
Processing triggers for man-db ..."

Here is the output of i586-elf-gcc:
"i586-elf-gcc -std=c99 -ffreestanding -O2 -Wall -Wextra -c gdt.c
gdt.c:4:6: error: conflicting types for 'gdt_set_gate'
void gdt_set_gate(struct gdt_entry *gdt, int num, uint64_t base, uint64_t limit, uint8_t access, uint8_t gran) {"

...so it works. I was able to compile like before, but as you can see, I had to remove g++ as well. So I reinstalled g++ with libc6-dev to see if it would break my cross compiler again, yet it still works. Not sure what to make of this.

Sorry for the newbie questions. I am pretty new to Linux and didn't have formal schooling in CS, so thanks again for your replies and patience.
Post Reply