<span style>Dear Andrew,</span><br style><br style><span style>Thanks for your answer.</span><br style><span style>It works well after put it all back where it was as you said.</span><br style><br style><span style>But I find some cross toolchains (e.g. cross toolchain in android source</span><br style>
<span style>code) could work well after change its path(anywhere).</span><br style><span style>This is the script i tested lasy night, it works well and finally succeed</span><span style>.</span><br style><span style>And i cross compile kernel3.0.23 a moment ago, it also works well.</span><br style>
<br style><span style>If i change its path from "/home/sudolee/cross/cross_</span><span style>toolchain" to</span><br style><span style>"/home/sudolee/cross_</span><span style>toolchain/", this issue occured.</span><br style>
<span style>Pls check the log below.</span><br style><span style>-----log-----</span><br style><span style>/home/sudolee/cross_toolchain/</span><span style>bin/../libexec/gcc/arm-none-</span><span style>linux-gnueabi/4.6.0/cc1:</span><br style>
<span style>error while loading shared libraries: libcloog.so.0: cannot open shared</span><br style><span style>object file: No such file or directory</span><br style><span style>---------------</span><br style><br style>
<span style>i know this issue occured due to the path changed, but i want find a way to</span><br style><span style>avoid this.</span><br style><span style>Maybe compiling all the library as static could avoid this issue(all the libaray set by disable-shared). But i</span><br style>
<span style>tried many times, build process will abort with some errors, the error log list below:</span><div>-------log--------</div><div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o): In function `~Watchdog':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1452: undefined reference to `Parma_Watchdog_Library::Watchdog::in_critical_section'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1453: undefined reference to `Parma_Watchdog_Library::Watchdog::remove_watchdog_event(Parma_Watchdog_Library::EList_Iterator<Parma_Watchdog_Library::Pending_Element<Parma_Watchdog_Library::Time> >)'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1454: undefined reference to `Parma_Watchdog_Library::Watchdog::in_critical_section'</div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o): In function `Init':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469: undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'</div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o): In function `Watchdog<Parma_Polyhedra_Library::Throwable, Parma_Polyhedra_Library::Interfaces::C::timeout_exception>':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1433: undefined reference to `Parma_Watchdog_Library::Watchdog::in_critical_section'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1434: undefined reference to `Parma_Watchdog_Library::Watchdog::new_watchdog_event(unsigned int, Parma_Watchdog_Library::Handler const&, bool&)'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1435: undefined reference to `Parma_Watchdog_Library::Watchdog::in_critical_section'</div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o): In function `~Init':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1476: undefined reference to `Parma_Watchdog_Library::Init::count'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1476: undefined reference to `Parma_Watchdog_Library::Init::count'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1478: undefined reference to `Parma_Watchdog_Library::Watchdog::finalize()'</div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_Polyhedron.o): In function `Init':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469: undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'</div><div>/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_Pointset_Powerset_C_Polyhedron.o): In function `Init':</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div><div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467: undefined reference to `Parma_Watchdog_Library::Init::count'</div>
<div>/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469: undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'</div><div>collect2: ld returned 1 exit status</div><div>
make[2]: *** [cc1] Error 1</div><div>make[2]: Leaving directory `/home/sudolee/cross/packages/gcc_build_final/gcc'</div><div>make[1]: *** [install-gcc] Error 2</div><div>make[1]: Leaving directory `/home/sudolee/cross/packages/gcc_build_final'</div>
<div>make: *** [install] Error 2</div></div><div>-------------------<br style><br style><span style>Do you know the root cause?</span><br style><span style>And how to?</span></div><br><div class="gmail_quote">2012/5/24 Andrew Bradford <span dir="ltr"><<a href="mailto:andrew@bradfordembedded.com" target="_blank">andrew@bradfordembedded.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 23 May 2012 19:28:18 +0800<br>
lee sudo <<a href="mailto:desoxydate@gmail.com">desoxydate@gmail.com</a>> wrote:<br>
<br>
> I built arm cross toolchain using the script in attachment. And finally<br>
> succeed.<br>
> But I moved the toolchain from the dir (it was) to another one, e.g.<br>
> from "/home/sudolee/toolchain/cross_toolchain"<br>
> to "/home/sudolee/".<br>
> Then i compile my source code by new cross toolchain, but it cannot find<br>
> some *.so, e.g. gmp.so mpfr.so cloog.so...<br>
<br>
</div>When you built the toolchain, you told it where to find the libraries<br>
and everything else it needs (your $PREFIX and $PRO_ROOT variables it<br>
looks like). Now you've moved the toolchain and the libraries, so it<br>
can't find them anymore. Put it all back where it was when you built<br>
the toolchain, then it should work.  Or, when compiling other sources,<br>
you can tell each thing you are compiling where to find the libraries<br>
(this may be easier said than done depending on the build system being<br>
used).<br>
<br>
To see this, if you run the gcc you built with the '-v' switch, it'll<br>
tell you where it expects to find libraries.  Yours probably aren't<br>
there anymore.  Put them back and it should be happy.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Andrew<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Thanks & BR,</div><div>Li Panfeng</div><br>