Author Topic: Noob question on setting up toolchain  (Read 1965 times)

Stephanie

  • Guest
Noob question on setting up toolchain
« on: April 29, 2010, 03:37:54 pm »
I've downloaded and unpacked the toolchain from the google code website, and I've been successfully compiling dingux kernels for a few days now, so I know that I'm able to cross-compile and get code that works on my Dingoo.

However, when I try to compile anything other than the kernel, I run into a bunch of errors with missing libs. Eg. I've been trying to compile dmenu, and this morning I tried to compile noiz2sa and both times it fails on a bunch of libs not found. If I go into where I put the toolchain files and look around, I can find all the libs that it says are missing, but for whatever reason the compiler can't.

I'm sure I've missed some blatantly obvious step, maybe an environment setting or whatever, that tells the compiler where to look to find the appropriate libs and includes...

Can someone give me some guidance, or an example on how they have things set up?

My toolchain is in /home/dingux and the stuff I'm working on are in their own subdirectories in /home/steph/projects/dingux

My platform is an Ubuntu variant. I'm able to compile normally (i.e. not crosscompile), it's just the dingux applications that are failing for me.

Thanks!

darfgarf

  • Guest
Re: Noob question on setting up toolchain
« Reply #1 on: April 29, 2010, 03:41:56 pm »
first, you need the library flag when you compile, so -l then the library name, e.g. -lSDL -lSDL_image -lSDL_mixer etc etc

if the libraries/include files aren't in the same place as the toolchain, it'll need to know where they are ( -I/path/to/includes -L/path/to/libraries), but that shouldn't be needed unless there's extra stuff needed etc

Stephanie

  • Guest
Re: Noob question on setting up toolchain
« Reply #2 on: April 29, 2010, 04:07:56 pm »
Thanks darfgarf!

The -l flags do appear to be there, when make is trying to compile it shows the commands it is using. The error then comes out that ld cannot find the library in question.  The output from make doesn't show the full path though, just the library name, which I'm sure is where the problem lies. It's probably looking in the normal /usr/lib or /usr/include instead of the dingux ones.

I've edited the Makefile to change all the references I could find from /usr/whatever to /home/dingux/whatever but it still comes up with missing stuff... I'm at work now but when I get home I'll post an actual example, maybe that will shed some light on it.

Thanks again!

zear

  • * Moderator
  • Posts: 2381
Re: Noob question on setting up toolchain
« Reply #3 on: April 29, 2010, 05:29:20 pm »
Toolchain should be put to /opt, or else you might get a lot of weird errors like that

Stephanie

  • Guest
Re: Noob question on setting up toolchain
« Reply #4 on: April 30, 2010, 07:34:49 am »
Ah thanks very much! I moved the toolchain into /opt and now things are compiling!

Cheers!

 

Post a new topic