View previous topic :: View next topic |
Author |
Message |
jmontejo n00b
Joined: 23 Jul 2008 Posts: 2
|
Posted: Wed Jul 23, 2008 1:22 pm Post subject: cross-compiling lua for ARM |
|
|
Hi.
I am trying to use gentoo, to crosscompile for an ARM platform. For this, I use crossdev on my pentium 4 PC, and follow the steps indicated in the embedded handbook.
The thing is that when I execute xmerge lua, the process runs OK, but makes the compilation for the x86, instead of the ARM.
I can see in the output that libtool is called with gcc as the compiler argument, instead of being called with arm-linux-gnu-gcc, that is, the cross compiler. I think this argument is taken from the environment variable CC, but although I set it manually before calling xmerge, it does not change anything.
I have set the following environment variables (among others):
Code: | CBUILD=i686-pc-linux-gnu
CC=arm-linux-gnu-gcc
CHOST=arm-linux-gnu
|
This is the output I get:
Code: | crossdev # xmerge -v lua
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] dev-lang/lua-5.1.1-r2 to /usr/arm-linux-gnu/ USE="-readline -static" 0 kB
Total: 1 package (1 new), Size of downloads: 0 kB
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) dev-lang/lua-5.1.1-r2 to /usr/arm-linux-gnu/
* lua-5.1.1.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking lua-5.1.1.tar.gz ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking lua-5.1.1.tar.gz to /var/tmp/portage/dev-lang/lua-5.1.1-r2/work
* Applying lua-5.1-make.patch ... [ ok ]
* Applying lua-5.1-module_paths.patch ... [ ok ]
* Applying lua-5.1-readline.patch ... [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/dev-lang/lua-5.1.1-r2/work/lua-5.1.1 ...
Makefile:197: atención: se imponen comandos para el objetivo `liblua.a'
Makefile:51: atención: se ignoran las instrucciones viejas para el objetivo `liblua.a'
Makefile:200: atención: se imponen comandos para el objetivo `lua'
Makefile:55: atención: se ignoran las instrucciones viejas para el objetivo `lua'
Makefile:206: atención: se imponen comandos para el objetivo `luac'
Makefile:58: atención: se ignoran las instrucciones viejas para el objetivo `luac'
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lapi.lo lapi.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lcode.lo lcode.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ldebug.lo ldebug.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ldo.lo ldo.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ldump.lo ldump.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lfunc.lo lfunc.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lgc.lo lgc.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o llex.lo llex.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lmem.lo lmem.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lobject.lo lobject.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lopcodes.lo lopcodes.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lparser.lo lparser.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lstate.lo lstate.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lstring.lo lstring.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ltable.lo ltable.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ltm.lo ltm.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lundump.lo lundump.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lvm.lo lvm.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lzio.lo lzio.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lauxlib.lo lauxlib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lbaselib.lo lbaselib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ldblib.lo ldblib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o liolib.lo liolib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lmathlib.lo lmathlib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o loslib.lo loslib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o ltablib.lo ltablib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lstrlib.lo lstrlib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o loadlib.lo loadlib.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o linit.lo linit.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o lua.o lua.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o luac.o luac.c
libtool --quiet --tag=CC --mode=compile gcc -c -DLUA_USE_LINUX -Os -pipe -o print.o print.c
libtool --quiet --tag=CC --mode=link gcc -version-info 6:1:1 \
-rpath /usr/lib/ -o liblua.la lapi.lo lcode.lo ldebug.lo ldo.lo ldump.lo lfunc.lo lgc.lo llex.lo lmem.lo lobject.lo lopcodes.lo lparser.lo lstate.lo lstring.lo ltable.lo ltm.lo lundump.lo lvm.lo lzio.lo lauxlib.lo lbaselib.lo ldblib.lo liolib.lo lmathlib.lo loslib.lo ltablib.lo lstrlib.lo loadlib.lo linit.lo -lm -ldl
libtool --quiet --tag=CC --mode=link gcc -static -o liblua.a lapi.lo lcode.lo ldebug.lo ldo.lo ldump.lo lfunc.lo lgc.lo llex.lo lmem.lo lobject.lo lopcodes.lo lparser.lo lstate.lo lstring.lo ltable.lo ltm.lo lundump.lo lvm.lo lzio.lo lauxlib.lo lbaselib.lo ldblib.lo liolib.lo lmathlib.lo loslib.lo ltablib.lo lstrlib.lo loadlib.lo linit.lo
libtool --quiet --tag=CC --mode=link gcc -static -Wl,-E -o lua_test lua.o liblua.la
libtool --quiet --tag=CC --mode=link gcc -Wl,-E -o lua lua.o -llua
libtool --quiet --tag=CC --mode=link gcc -static -o luac luac.o print.o liblua.la
>>> Source compiled.
>>> Test phase [not enabled]: dev-lang/lua-5.1.1-r2
>>> Install lua-5.1.1-r2 into /var/tmp/portage/dev-lang/lua-5.1.1-r2/image/ category dev-lang
mkdir -p /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr//bin /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr//include /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr/lib/
cd src; libtool --quiet --tag=CC --mode=install install -m 0755 lua luac /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr//bin
cd src; install -m 0644 lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr//include
cd src; libtool --quiet --tag=CC --mode=install install -m 0644 liblua.la /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr/lib/
libtool: install: warning: remember to run `libtool --finish /usr/lib/'
cd src; libtool --quiet --tag=CC --mode=install install -m 0644 liblua.a /var/tmp/portage/dev-lang/lua-5.1.1-r2/image//usr/lib/
>>> Completed installing lua-5.1.1-r2 into /var/tmp/portage/dev-lang/lua-5.1.1-r2/image/
strip: arm-linux-gnu-strip --strip-unneeded -R .comment
usr/lib/liblua.so.5.1.1
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.so.5.1.1'
usr/bin/luac
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/bin/luac'
usr/bin/lua
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/bin/lua'
usr/lib/liblua.a
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lcode.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ldebug.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ldo.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ldump.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lfunc.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lgc.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(llex.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lmem.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lobject.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lopcodes.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lparser.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lstate.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lstring.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ltable.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ltm.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lundump.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lvm.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lzio.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lauxlib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lbaselib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ldblib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(liolib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lmathlib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(loslib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(ltablib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(lstrlib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(loadlib.o)'
arm-linux-gnu-strip: Unable to recognise the format of the input file `/var/tmp/portage/dev-lang/lua-5.1.1-r2/image/usr/lib/liblua.a(linit.o)'
making executable: usr/lib/liblua.so.5.1.1
* checking 22 files for package collisions
>>> Merging dev-lang/lua-5.1.1-r2 to /usr/arm-linux-gnu/
* Removing /usr/share/man
* Removing /usr/share/info
* Removing /usr/share/doc
--- /usr/arm-linux-gnu/usr/
--- /usr/arm-linux-gnu/usr/lib/
>>> /usr/arm-linux-gnu/usr/lib/liblua.so.5.1.1
>>> /usr/arm-linux-gnu/usr/lib/liblua.a
>>> /usr/arm-linux-gnu/usr/lib/liblua.so.5 -> liblua.so.5.1.1
>>> /usr/arm-linux-gnu/usr/lib/liblua.la
>>> /usr/arm-linux-gnu/usr/lib/liblua.so -> liblua.so.5.1.1
>>> /usr/arm-linux-gnu/usr/lib/pkgconfig/
>>> /usr/arm-linux-gnu/usr/lib/pkgconfig/lua.pc
--- /usr/arm-linux-gnu/usr/bin/
>>> /usr/arm-linux-gnu/usr/bin/luac
>>> /usr/arm-linux-gnu/usr/bin/lua
--- /usr/arm-linux-gnu/usr/share/
>>> /usr/arm-linux-gnu/usr/share/pixmaps/
>>> /usr/arm-linux-gnu/usr/share/pixmaps/lua.ico
--- /usr/arm-linux-gnu/usr/include/
>>> /usr/arm-linux-gnu/usr/include/lua.h
>>> /usr/arm-linux-gnu/usr/include/lualib.h
>>> /usr/arm-linux-gnu/usr/include/luaconf.h
>>> /usr/arm-linux-gnu/usr/include/lua.hpp
>>> /usr/arm-linux-gnu/usr/include/lauxlib.h
>>> Regenerating /usr/arm-linux-gnu/etc/ld.so.cache...
>>> dev-lang/lua-5.1.1-r2 merged.
>>> Recording dev-lang/lua in "world" favorites file...
>>> Using system located in ROOT tree /usr/arm-linux-gnu/
>>> No packages selected for removal by clean
>>> Auto-cleaning packages...
>>> Using system located in ROOT tree /usr/arm-linux-gnu/
>>> No outdated packages were found on your system. |
Can anybody help me? |
|
Back to top |
|
|
SnakeByte Apprentice
Joined: 04 Oct 2002 Posts: 177 Location: Europe - Germany
|
Posted: Thu Aug 07, 2008 1:13 pm Post subject: |
|
|
Hi,
as I faced similar issues during a glib MIPS crosscompile there might be some thing to look out for:
Check the build directory Quote: | /var/tmp/portage/dev-lang/lua-5.1.1-r2/work/lua-5.1.1 ... |
if there is a local copy if libtool.
Removing it can help or install a cross libtool and link to the cross libtool can help too.
regards |
|
Back to top |
|
|
jmontejo n00b
Joined: 23 Jul 2008 Posts: 2
|
Posted: Fri Aug 08, 2008 10:27 am Post subject: |
|
|
SnakeByte wrote: | Hi,
as I faced similar issues during a glib MIPS crosscompile there might be some thing to look out for:
Check the build directory Quote: | /var/tmp/portage/dev-lang/lua-5.1.1-r2/work/lua-5.1.1 ... |
if there is a local copy if libtool.
Removing it can help or install a cross libtool and link to the cross libtool can help too.
regards |
Sorry for my ignorance, but I can not look for that directory, as it is deleted on emerge completion. Any way to avoid deleting the temporary directory?
I do think I have installed a cross libtool, as I have been able to compile ncurses, and I have libs for arm under my /usr/arm-linux-gnu/lib directory. How can I now if emerge is linking to the right libraries?
Thank you very much |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|