cannot find -lg when linking hello_world.elf

support for the ARM toolchain
Post Reply
r4b00f3r
Posts: 2
Joined: Tue Jan 11, 2011 1:58 am

cannot find -lg when linking hello_world.elf

Post by r4b00f3r » Tue Jan 11, 2011 2:20 am

I've just installed devkitARM using the "Alternative installation script" at http://devkitpro.org/wiki/Getting_Started/devkitARM. I'm running OS X 10.6.6. I tried make-ing examples/nds/hello_world, but I get an error during linking (hello_world.elf): cannot find -lg. Here's the full output:

Code: Select all

main.cpp
arm-eabi-g++ -MMD -MP -MF /opt/devkitpro/examples/nds/hello_world/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/opt/devkitpro/examples/nds/hello_world/include -I/opt/devkitpro/examples/nds/hello_world/build -I/opt/devkitpro/libnds/include -I/opt/devkitpro/libnds/include -I/opt/devkitpro/examples/nds/hello_world/build -DARM9 -fno-rtti -fno-exceptions -c /opt/devkitpro/examples/nds/hello_world/source/main.cpp -o main.o 
linking hello_world.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: cannot find -lg
collect2: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/examples/nds/hello_world/hello_world.elf] Error 1
make: *** [build] Error 2
What do I need to do in order to build and link successfully? Thanks for the help.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: cannot find -lg when linking hello_world.elf

Post by WinterMute » Tue Jan 11, 2011 10:12 am

We managed to solve this on IRC after some checking of environment variables and files. It turned out to be a problem caused by extraction with "The Unarchiver" - a replacement for "Archive Utility.app", the built-in archive unpacker program on Mac OS X. Somehow it managed to create some files as symbolic links to non existent files.
Help keep devkitPro toolchains free, Donate today

Personal Blog

r4b00f3r
Posts: 2
Joined: Tue Jan 11, 2011 1:58 am

Re: cannot find -lg when linking hello_world.elf

Post by r4b00f3r » Thu Jan 13, 2011 3:13 am

Thanks for updating this thread, WinterMute.

To clarify, I removed the entire devkitpro directory and started over. I used tar instead of The Unarchiver and all symlinks were either gone or correctly linked.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests