[Clfs-dev] HELP ME: issue about arm cross toolchain (cannot find gmp.so, mpfr.so...)

lee sudo desoxydate at gmail.com
Wed May 23 22:03:12 PDT 2012


Dear Andrew,

Thanks for your answer.
It works well after put it all back where it was as you said.

But I find some cross toolchains (e.g. cross toolchain in android source
code) could work well after change its path(anywhere).
This is the script i tested lasy night, it works well and finally succeed.
And i cross compile kernel3.0.23 a moment ago, it also works well.

If i change its path from "/home/sudolee/cross/cross_toolchain" to
"/home/sudolee/cross_toolchain/", this issue occured.
Pls check the log below.
-----log-----
/home/sudolee/cross_toolchain/bin/../libexec/gcc/arm-none-
linux-gnueabi/4.6.0/cc1:
error while loading shared libraries: libcloog.so.0: cannot open shared
object file: No such file or directory
---------------

i know this issue occured due to the path changed, but i want find a way to
avoid this.
Maybe compiling all the library as static could avoid this issue(all the
libaray set by disable-shared). But i
tried many times, build process will abort with some errors, the error log
list below:
-------log--------
/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o):
In function `~Watchdog':
/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'
/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>
>)'
/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'
/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o):
In function `Init':
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469:
undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'
/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>':
/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'
/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&)'
/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'
/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_implementation_common.o):
In function `~Init':
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1476:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1476:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1478:
undefined reference to `Parma_Watchdog_Library::Watchdog::finalize()'
/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_Polyhedron.o): In
function `Init':
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469:
undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'
/home/sudolee/cross/cross_toolchain/lib/libppl_c.a(ppl_c_Pointset_Powerset_C_Polyhedron.o):
In function `Init':
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1467:
undefined reference to `Parma_Watchdog_Library::Init::count'
/home/sudolee/cross/packages/ppl-0.11.2/interfaces/C/../../Watchdog/src/pwl.hh:1469:
undefined reference to `Parma_Watchdog_Library::Watchdog::initialize()'
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory
`/home/sudolee/cross/packages/gcc_build_final/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/home/sudolee/cross/packages/gcc_build_final'
make: *** [install] Error 2
-------------------

Do you know the root cause?
And how to?

2012/5/24 Andrew Bradford <andrew at bradfordembedded.com>

> On Wed, 23 May 2012 19:28:18 +0800
> lee sudo <desoxydate at gmail.com> wrote:
>
> > I built arm cross toolchain using the script in attachment. And finally
> > succeed.
> > But I moved the toolchain from the dir (it was) to another one, e.g.
> > from "/home/sudolee/toolchain/cross_toolchain"
> > to "/home/sudolee/".
> > Then i compile my source code by new cross toolchain, but it cannot find
> > some *.so, e.g. gmp.so mpfr.so cloog.so...
>
> When you built the toolchain, you told it where to find the libraries
> and everything else it needs (your $PREFIX and $PRO_ROOT variables it
> looks like). Now you've moved the toolchain and the libraries, so it
> can't find them anymore. Put it all back where it was when you built
> the toolchain, then it should work.  Or, when compiling other sources,
> you can tell each thing you are compiling where to find the libraries
> (this may be easier said than done depending on the build system being
> used).
>
> To see this, if you run the gcc you built with the '-v' switch, it'll
> tell you where it expects to find libraries.  Yours probably aren't
> there anymore.  Put them back and it should be happy.
>
> -Andrew
>



-- 
Thanks & BR,
Li Panfeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-dev-clfs.org/attachments/20120524/fc59641c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-toolchain-0.4.sh
Type: application/x-sh
Size: 5757 bytes
Desc: not available
URL: <http://lists.clfs.org/pipermail/clfs-dev-clfs.org/attachments/20120524/fc59641c/attachment-0002.sh>


More information about the Clfs-dev mailing list