LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2004, 03:09 PM   #1
jon_k
Member
 
Registered: Jul 2003
Location: Fort Worth, Texas
Distribution: Mepis Linux 2004
Posts: 547

Rep: Reputation: 30
cross-compiling?


I want to cross compile C/C++ source to work on a SPARC ALPHA. I don't own one of these machines so thats why I decided to use a cross compiler.

I read the site: http://linux.bytesex.org/cross-compiler.html

Upon following the directions that say do
./configure --prefix=/usr/local --target=sparc-linux

I then follow the directions to check the directory for the binarys
"bogomips root /usr/local/bin# ll sparc-linux-*"
"You should have a new directory called /usr/local/sparc-linux too:"

I don't see the new binarys or the new directory, meaning this tutorial is falty and doesn't seem to work for me.


How can I get cross-compiling for sparc work for me??

Thanks
 
Old 12-08-2004, 04:19 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"Upon following the directions that say do
./configure --prefix=/usr/local --target=sparc-linux

I then follow the directions to check the directory for the binarys
"bogomips root /usr/local/bin# ll sparc-linux-*"
"You should have a new directory called /usr/local/sparc-linux too:"

I don't see the new binarys or the new directory, meaning this tutorial is falty and doesn't seem to work for me."

After the ./configure did you also do a make and make install? The command sequence should be:
./configure --prefix=/usr/local --target=sparc-linux
make
make install

------------------------------
Steve Stites
 
Old 12-08-2004, 09:26 PM   #3
jon_k
Member
 
Registered: Jul 2003
Location: Fort Worth, Texas
Distribution: Mepis Linux 2004
Posts: 547

Original Poster
Rep: Reputation: 30
I remember make and make installing, but I don't remember these problems while making.

root@15[binutils-2.15]# make
Configuring in libiberty
configure: loading cache ./config.cache
configure: error: `target_alias' has changed since the previous run:
configure: former value: i686-pc-linux-gnu
configure: current value: sparc-linux
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make: *** [configure-libiberty] Error 1
root@15[binutils-2.15]#

root@15[binutils-2.15]# make distclean
rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
rm -f Makefile config.status config.cache mh-frag mt-frag
rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
if [ "sparc-linux" != "." ]; then \
rm -rf sparc-linux; \
else true; fi
rm -rf build-i686-pc-linux-gnu
rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
rm -f texinfo/doc/Makefile texinfo/po/POTFILES
rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
make: [local-distclean] Error 1 (ignored)
rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
make: [local-distclean] Error 1 (ignored)
rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null
make: [local-distclean] Error 1 (ignored)

root@15[binutils-2.15]# rm ./config.
config.back config.guess config.if config.sub


Last edited by jon_k; 12-08-2004 at 09:29 PM.
 
Old 12-09-2004, 10:36 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"configure: error: `target_alias' has changed since the previous run:
configure: former value: i686-pc-linux-gnu
configure: current value: sparc-linux
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over"

Whoever created the make file did not make it so that it would work if you run it more than once. After a compile fails you need to run `make distclean' and/or `rm ./config.cache' before you run ./configure again. If you clean up the make file before you run the compile again then you should get the original error messages as to why the first compile failed to create the new binaries and new directory.

---------------------------
Steve Stites
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross Compiling dosnlinux Programming 5 03-01-2006 12:12 PM
wx widget and cross compiling guideweb Programming 0 09-21-2005 12:06 AM
cross compiling with g++ hornofsalvation Linux - Newbie 2 10-09-2004 11:29 PM
Building cross-compiling toolchain radhapriya Linux - Software 1 06-25-2004 01:01 AM
Cross compiling - Windows Xp -> Linux groston Programming 1 05-31-2002 04:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration