|
From: Chris B. <chr...@po...> - 2008-10-15 16:59:44
|
Hi All, I'm trying to cross-compile Valgrind 3.3.1 on a x86 running Linux 2.6.9 for a PPC8313 that will be running Linux 2.6.21. I tried the following for my configure script: ./configure --prefix=/home/cbornman/bin/valgrind --host=i686-intel-linux --target=powerpc-linux --disable-tls My CC environment variable is set to: /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wrs-linux-gnu-gcc --sysroot /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot When I run configure I see at the very beginning: configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. Configure finishes but when I then do the make I see: ...stuff... make[3]: Entering directory `/home/cbornman/valgrind/valgrind-3.3.1/coregrind' /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wrs-linux-gnu-gcc --sysroot /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../VEX/pub -DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -m32 -g -Wno-long-long -c -o libcoregrind_x86_linux_a-m_cpuid.o `test -f 'm_cpuid.S' || echo './'`m_cpuid.S m_cpuid.S: Assembler messages: m_cpuid.S:39: Error: Unrecognized opcode: `pushl' m_cpuid.S:40: Error: Unrecognized opcode: `movl' ...more unrecognized opcodes... The VG_PLATFORM and VGA_x86 defines indicate that make thinks it's compiling for x86. I also tried not setting --host but got the following: ./configure --prefix=/home/cbornman/bin/valgrind --target=powerpc-linux --disable-tls checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking whether ln -s works... yes checking for gcc... /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wrs-linux-gnu-gcc --sysroot /tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. Does anybody have experience with configure and cross-compiling who can point to what I'm doing wrong? Any suggestions for other things to try? Thanks! - chris |
|
From: Bart V. A. <bar...@gm...> - 2008-10-15 17:39:44
|
On Wed, Oct 15, 2008 at 6:58 PM, Chris Bornmann <chr...@po...> wrote: > Does anybody have experience with configure and cross-compiling who can > point to what I'm doing wrong? Any suggestions for other things to try? Did you already notice the following bug report, the attached compilation script and the attached patch ? https://bugs.kde.org/show_bug.cgi?id=162295 Bart. |
|
From: Chris P. <jud...@gm...> - 2008-10-15 20:14:05
|
Also have a look at the buildroot projects makefile for valgrind http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/valgrind/ They're currently building version 3.2.3 but with a little tweaking I've used buildroot to cross compile valgrind 3.3.1 for ppc. On Thu, Oct 16, 2008 at 6:37 AM, Bart Van Assche <bar...@gm...>wrote: > On Wed, Oct 15, 2008 at 6:58 PM, Chris Bornmann > <chr...@po...> wrote: > > Does anybody have experience with configure and cross-compiling who can > > point to what I'm doing wrong? Any suggestions for other things to try? > > Did you already notice the following bug report, the attached > compilation script and the attached patch ? > > https://bugs.kde.org/show_bug.cgi?id=162295 > > Bart. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: GUPTA R. NMG-B. <Ri...@fr...> - 2008-10-16 04:50:22
|
Hi,
I cross compiled valgrind for ppc32 and that worked fine for me. Below
are some commands which I used for the same-
1. go to valgrind directory
2. export CC= give the C compiler path here
3. export CXX= give the C++ compiler path here
4. go to configure file of valgrind and add a line "host_os=linux"
5. Then do -
./configure --prefix='pwd'/bins --host=i686-pc-linux
--target=ppc-linux --enable-tls=no
(You will have your binaries available at <valgrind directory>/bins/)
6. Then do make
if you still get error then let me know the error.
Thanks & Regards,
Richa
________________________________
From: Chris Bornmann [mailto:chr...@po...]
Sent: Wednesday, October 15, 2008 10:28 PM
To: val...@li...
Subject: [Valgrind-users] Cross-Compiling Valgrind
Hi All,
I'm trying to cross-compile Valgrind 3.3.1 on a x86 running Linux 2.6.9
for a PPC8313 that will be running Linux 2.6.21. I tried the following
for my configure script:
./configure --prefix=/home/cbornman/bin/valgrind --host=i686-intel-linux
--target=powerpc-linux --disable-tls
My CC environment variable is set to:
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
When I run configure I see at the very beginning:
configure: WARNING: If you wanted to set the --build type, don't use
--host.
If a cross compiler is detected then cross compile mode will be
used.
Configure finishes but when I then do the make I see:
...stuff...
make[3]: Entering directory
`/home/cbornman/valgrind/valgrind-3.3.1/coregrind'
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
-I../coregrind -I.. -I../coregrind/x86 -I../coregrind/linux
-I../coregrind/x86-linux -I../include -I../VEX/pub
-DVG_PLATFORM="\"x86-linux\"" -DVGA_x86=1 -DVGO_linux=1
-DVGP_x86_linux=1 -m32 -g -Wno-long-long -c -o
libcoregrind_x86_linux_a-m_cpuid.o `test -f 'm_cpuid.S' || echo
'./'`m_cpuid.S
m_cpuid.S: Assembler messages:
m_cpuid.S:39: Error: Unrecognized opcode: `pushl'
m_cpuid.S:40: Error: Unrecognized opcode: `movl'
...more unrecognized opcodes...
The VG_PLATFORM and VGA_x86 defines indicate that make thinks it's
compiling for x86.
I also tried not setting --host but got the following:
./configure --prefix=/home/cbornman/bin/valgrind --target=powerpc-linux
--disable-tls checking for a BSD-compatible install... /usr/bin/install
-c checking whether build environment is sane... yes checking for
gawk... gawk checking whether make sets $(MAKE)... yes checking whether
to enable maintainer-specific portions of Makefiles... no checking
whether ln -s works... yes checking for gcc...
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/bin/powerpc-wr
s-linux-gnu-gcc --sysroot
/tools/sw/wr8313/agg_prj/host-cross/powerpc-wrs-linux-gnu/sysroot
checking for C compiler default output file name... a.out checking
whether the C compiler works... configure: error: cannot run C compiled
programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Does anybody have experience with configure and cross-compiling who can
point to what I'm doing wrong? Any suggestions for other things to try?
Thanks!
- chris
|
|
From: Peter K. <ja...@su...> - 2008-10-16 08:53:59
|
>>>>> "Chris" == Chris Packham <jud...@gm...> writes: Hi, Chris> Also have a look at the buildroot projects makefile for valgrind Chris> http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/ Chris> valgrind/ Chris> They're currently building version 3.2.3 but with a little Chris> tweaking I've used buildroot to cross compile valgrind 3.3.1 Chris> for ppc. Did you send a patch for that? I didn't notice it. -- Bye, Peter Korsgaard |
|
From: Chris P. <jud...@gm...> - 2008-10-17 04:17:03
Attachments:
buildroot-valgrind-version-up.patch
|
I've attached my buildroot patch. When I get round to it I'll submit it to the buildroot project. I'm using a fairly hacked up version of buildroot (which is one reason I've yet to submit it upstream) so the patch may not apply cleanly the first time but it may point you in the right direction. On Thu, Oct 16, 2008 at 9:52 PM, Peter Korsgaard <ja...@su...> wrote: > >>>>> "Chris" == Chris Packham <jud...@gm...> writes: > > Hi, > > Chris> Also have a look at the buildroot projects makefile for valgrind > Chris> > http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/ > Chris> valgrind/ > > Chris> They're currently building version 3.2.3 but with a little > Chris> tweaking I've used buildroot to cross compile valgrind 3.3.1 > Chris> for ppc. > > Did you send a patch for that? I didn't notice it. > > -- > Bye, Peter Korsgaard > |
|
From: Peter K. <ja...@su...> - 2008-10-19 05:55:03
|
>>>>> "Chris" == Chris Packham <jud...@gm...> writes: Hi, Chris> I've attached my buildroot patch. When I get round to it I'll Chris> submit it to the buildroot project. Thanks, good to know. Chris> I'm using a fairly hacked up version of buildroot (which is Chris> one reason I've yet to submit it upstream) so the patch may Chris> not apply cleanly the first time but it may point you in the Chris> right direction. Yeah, I see ;) Thanks anyway. -- Bye, Peter Korsgaard - Buildroot developer |