Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using scratchbox2 with a crossdev created toolchain
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
tenspd137
Guru
Guru


Joined: 22 Aug 2006
Posts: 391

PostPosted: Fri Oct 08, 2010 6:33 am    Post subject: Using scratchbox2 with a crossdev created toolchain Reply with quote

Hi all,

I posted this to the scratchbox-users mailing list, but I thought I wold try here to and see if anyone has used scratchbox2 with a toolchain created with crossdev. I was following directions from
http://www.webos-internals.org/wiki/WebOS_Internals_PDK

but was trying to avoid downloading the codesourcery toolchain, instead using the one I already had:
Quote:

I was trying to use scratchbox2 with a Gentoo cross-dev toolchain. The
lib directory is in /usr/arm-unknown-linux-gnueabi/lib and cc1 lives
in /usr/libexec/gcc/arm-unknown-linux-gnueabi/4.4.4/cc1. When I run
sb2-init -c /usr/bin/qemu-arm armv7 arm-unknown-linux-gnueabi-gcc it
fails with:

During the libtool compilation, it fails:

checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

The config.log says:

configure:2882: checking for C compiler default output file name
configure:2909: gcc conftest.c >&5
arm-unknown-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No
such file or directory

Usually, I am doing something wrong - but I can't figure out what.
When I run
collin@Krypton ~/.scratchbox2/libtool_build
$arm-unknown-linux-gnueabi-gcc -print-search-dirs
install: /usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/ programs:
=/usr/libexec/gcc/arm-unknown-linux-gnueabi/4.4.4/:/usr/libexec/gcc/arm-unknown-linux-gnueabi/4.4.4/:/usr/libexec/gcc/arm-unknown-linux-gnueabi/:/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/:/usr/lib/gcc/arm-unknown-linux-gnueabi/:/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/../../../../arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi/4.4.4/:/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/../../../../arm-unknown-linux-gnueabi/bin/
libraries:
=/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/:/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/../../../../arm-unknown-linux-gnueabi/lib/arm-unknown-linux-gnueabi/4.4.4/:/usr/lib/gcc/arm-unknown-linux-gnueabi/4.4.4/../../../../arm-unknown-linux-gnueabi/lib/:/usr/arm-unknown-linux-gnueabi/lib/arm-unknown-linux-gnueabi/4.4.4/:/usr/arm-unknown-linux-gnueabi/lib/:/usr/arm-unknown-linux-gnueabi/usr/lib/arm-unknown-linux-gnueabi/4.4.4/:/usr/arm-unknown-linux-gnueabi/usr/lib/

and

collin@Krypton ~/.scratchbox2/libtool_build
$arm-unknown-linux-gnueabi-gcc -print-prog-name=cc1
/usr/libexec/gcc/arm-unknown-linux-gnueabi/4.4.4/cc1

So it seems to know where it lives.

Could someone help me figure this one out? I think I am doing
everything correctly, but I could be (and most likely am) wrong.

Thanks!


I also tried running from [/post]/usr/arm-unknown-linux-gnueabi/ with no luck. If anyone knows how to make this work, that would be great - otherwise, I guess I will just try the codesourcery stuff.

Thanks again!
Back to top
View user's profile Send private message
lkraav
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2004
Posts: 125
Location: Estonia

PostPosted: Tue Nov 16, 2010 12:11 am    Post subject: Reply with quote

did you manage to get anywhere with this? i'm about to look into it.
Back to top
View user's profile Send private message
tenspd137
Guru
Guru


Joined: 22 Aug 2006
Posts: 391

PostPosted: Thu Nov 18, 2010 5:16 am    Post subject: Reply with quote

No - I gave up on scratchbox2 and just played with cross-tools a bit and finally moved onto other stuff. But, if you decide to look at it, figure anything out and want to share, I am all ears.

Thanks!
Back to top
View user's profile Send private message
lkraav
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2004
Posts: 125
Location: Estonia

PostPosted: Thu Nov 18, 2010 9:11 am    Post subject: Reply with quote

i don't actually know yet whether i need scratchbox, my goal is to have a maemo app compilation environment in my gentoo boxen. but i haven't started looking and digging through any documentation yet about what exactly i need to do.
Back to top
View user's profile Send private message
nebojsa42
n00b
n00b


Joined: 09 Jan 2011
Posts: 2

PostPosted: Sun Jan 09, 2011 6:39 pm    Post subject: Reply with quote

I've got it working just fine:
crossdev -S armv4tl-softfloat-linux-gnueabi
#in my case this created gcc-4.4.3-r2
#make your build root somewhere
mkdir buildroot
cp -a /usr/armv4tl-softfloat-linux-gnueabi/* buildroot/
cp -a /usr/lib/gcc/armv4tl-softfloat-linux-gnueabi/4.4.3/*.so* buildroot/lib/
cd buildroot/
export PATH=/usr/libexec/gcc/armv4tl-softfloat-linux-gnueabi:/opt/sbox2/sb2/bin:/usr/i686-pc-linux-gnu/armv4tl-softfloat-linux-gnueabi/gcc-bin/4.4.3:$PATH
# it is important that /usr/libexec/gcc/armv4tl-softfloat-linux-gnueabi is at the beginning. sbox2 had some problems detecting which ar tool should be used, host or cross version... I am using sbox2 1.99.0.31-rc-320f82d, maybe this is fixed now.
# modify /opt/sbox2/sb2/share/scratchbox2/lua_scripts/pathmaps/simple/00_default.lua to include this:
{prefix = "/usr/libexec/gcc/armv4tl-softfloat-linux-gnueabi", use_orig_path = true},
{prefix = "/usr/lib/gcc/armv4tl-softfloat-linux-gnueabi", use_orig_path = true},

sb2-init -m simple -c /opt/sbox2/sb2/bin/qemu-arm your_target_name armv4tl-softfloat-linux-gnueabi-gcc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
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