|
Building to chroot OR how to remove "built-in values" -
01-19-2009, 04:36 AM
Hi
My problem is this. I have a Ubuntu distro (actually a vmware partition but this is irrelevant) installed running Eclipse ganymede. In this distro I also have a Midinux env starting at (/home/user/DEK/virbuild) for which I need to compile.
To switch to the the Midinux env i use chroot from inside Ubuntu.
Since I have not been able to get Eclipse working directly when chrooted in Midinux I will need to have Eclipse running on Ubuntu but set up so that it points out gcc, includes and libraries using Midinux paths instead.
1. Is it possible to somehow chroot Eclipse to use the midinux root (/home/user/DEK/virbuild) after it has started?
2. When trying to change env paths manually in Eclipse I only manage to point gcc and as to midinux env (/home/user/DEK/virbuild/usr/bin). The compiling finishes fine but linking does not.
I have added include directories relative to the midinux root in "Eclipse->C/C++ General->Paths and Symbols->Includes". But somehow when I build I still get
Invoking: GCC C Linker
gcc -L/home/user/DEK/virbuild/usr/lib -o"PhotoFlow_GTK" ./src/PAdriver.o -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
/usr/bin/../lib/libatk-1.0.so.0: undefined reference to `g_assertion_message_expr'
collect2: ld returned 1 exit status
make: *** [PhotoFlow_GTK] Error 1
As you can see even though i stated -L/home/user/DEK/virbuild/usr/lib it is using /usr/bin/../lib/*. This must be because Eclipse insists on using "built-in values" path /usr/bin and resolves this first.
I have the following "built-in values":
/usr/bin
/usr/include
/usr/lib/gcc/i486-linux-gnu/4.2.4/include
In "Eclipse->C/C++ General->Paths and Symbols->Library Paths" I have added the midinux lib include base (/home/user/DEK/virbuild/usr/lib) but this doesn't seem to be sufficient.
In Eclipse->C/C++ Build->Environment" I have checked the "replace native environment with specified one" and added only pahts relative to (/home/user/DEK/virbuild/(usr|bin|lib etc)).
I think everythin would be fine if I could remove the "built-in values".
Is there anyway to do this and to make Eclipse only use the search paths I specify, alternatively start Eclipse chrooted?
- Martin
|