OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Multiple Versions Of Gcc
Greg2
post Dec 6 2004, 11:17 AM
Post #1





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



From the Zug How-to's
QUOTE
Note that many of the newer distributions now use GCC3.2 or later as their default compiler. This means that when compiling for the desktop it will not be able to link to the sdk files as they were created using GCC 2.95. To fix this problem you need to install 2.95 for your distribution.


Does anyone have, or know of a simple how-to for installing and using multiple versions of gcc on a linux box? I was looking at graft... but there must be an easier way?

I have a little extra time during the Holidays and would like to try some things without damaging my current setup.

Greg
Go to the top of the page
 
+Quote Post
lardman
post Dec 7 2004, 04:30 AM
Post #2





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



Talking about cross-compilers? They should end up in seperate directories anyway so it should be fine, then just source a script to alter $PATH accordingly.

That said, if you're talking about OZ, download and use OE - it sorts out the GCC 3.x.x toolchain for you (the 2.95 toolchain is only needed to compile kernels)

Si
Go to the top of the page
 
+Quote Post
Greg2
post Dec 7 2004, 07:19 AM
Post #3





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



QUOTE(lardman @ Dec 7 2004, 07:30 AM)
Talking about cross-compilers? They should end up in seperate directories anyway so it should be fine, then just source a script to alter $PATH accordingly.

Yes, cross-compilers.

I have gcc3.3.1 on my Mandrake9.2 and would like to use the gcc2.9.5 for the Zaurus kernel and some apps. I need to keep the 3.3.1 intact but I'm not sure how to go about it. I have searched this for 2 days on other forums and google only to become more frustrated and confused then when I started. Can I do this with rpms, or do I have to compile the gcc2.9.5 on my present system to rename it and call it (e.g. gcc or gcc2) to compile?

Thanks, and please note I have only recently been compiling anything on my box.

Greg

P.S. In early spring I will finally have access to affordable 'high speed' internet, then I will set up OE. smile.gif
Go to the top of the page
 
+Quote Post
lardman
post Dec 7 2004, 09:16 AM
Post #4





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



They should install in seperate locations, then you'll just have to alter your $PATH to use one or the other.

If you need to use both (in the same script/Makefile/etc/), then yes, you need to rename one to gcc-2.95 etc.


Si
Go to the top of the page
 
+Quote Post
Greg2
post Dec 7 2004, 05:15 PM
Post #5





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



QUOTE(lardman @ Dec 7 2004, 12:16 PM)
They should install in seperate locations, then you'll just have to alter your $PATH to use one or the other.

I must be simple minded because I can't make the rpms install in different locations and coexist on my system. Not with the package manager or any rpm command that I know of would make this work properly. If anyone reads this and knows of a way... please let me know.

Anyway, I have d/led the gcc2.9.5 tarball and will compile and install tomorrow. That is the only way I know of to rename and install where I want it.

Thanks lardman

Greg
Go to the top of the page
 
+Quote Post
Ashitaka
post Dec 8 2004, 02:02 AM
Post #6





Group: Members
Posts: 58
Joined: 7-June 04
From: Tokyo
Member No.: 3,599



You can download on http://www.nautilus6.org/operation/zaurus.html my package which will install automatically a complete GCC 2.95 cross-compile environment (which naturally doesn't interfere with your current configuration). Enjoy wink.gif
Go to the top of the page
 
+Quote Post
lardman
post Dec 8 2004, 06:02 AM
Post #7





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



The OZ 2.95 toolchain is a tarball which you extract to /usr/local/arm/2.95 (iirc).

It was available from oz.org


Si
Go to the top of the page
 
+Quote Post
Greg2
post Dec 8 2004, 07:20 AM
Post #8





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



I can't find that oz 2.95 toolchain anywhere... it's probably gone now with the new OE and oe.org and hh.org are still not available to look for it.

Ashitaka, I will give your cross-compile package a try when I complete the d/l... which will be awhile on my dail-up connection. smile.gif

Thanks

Greg
Go to the top of the page
 
+Quote Post
Ashitaka
post Dec 8 2004, 11:19 PM
Post #9





Group: Members
Posts: 58
Joined: 7-June 04
From: Tokyo
Member No.: 3,599



My package is based on the OZ 2.95 toolchain (iirc tongue.gif ), but it has additional documentation, relatively smart installation scripts, and that it also installs several libraries which you will probably need if you try compiling something for the Zaurus.
Go to the top of the page
 
+Quote Post
Greg2
post Dec 9 2004, 11:34 AM
Post #10





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



Ashitaka,
Thanks for making this available, but I think there's a problem.
Approximately 45 min. into the install I have this:
-snip-
CODE
global1.cpp:39:23: uuid/uuid.h: No such file or directory
global1.cpp: In static member function `static QUuid Global::generateUuid()':
global1.cpp:188: error: `::uuid_generate' undeclared (first use here)
make[1]: *** [.obj/linux-generic-g++//global1.o] Error 1
make[1]: Leaving directory `/opt/Qtopia/src/libraries/qtopia1'
make: *** [libraries/qtopia1] Error 2
Problem while compiling Qtopia!
[root@localhost cross_install-2.95]#


everything seems to be installed correctly in /usr/local/arm/2.95.3/

but I'm not sure about /opt/Qtopia/

any thoughts?

Greg
Go to the top of the page
 
+Quote Post
Ashitaka
post Dec 10 2004, 12:30 AM
Post #11





Group: Members
Posts: 58
Joined: 7-June 04
From: Tokyo
Member No.: 3,599



Hum strange I have this line in my script :

cp $PACKAGE_DIR/uuid.h $CROSS_PREFIX/arm-linux/include/uuid

Can you check if /usr/loca/arm/2.95.3/arm-linux/include/uuid/uuid.h exists ?
Go to the top of the page
 
+Quote Post
Greg2
post Dec 10 2004, 06:41 AM
Post #12





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



QUOTE(Ashitaka @ Dec 10 2004, 03:30 AM)
Can you check if /usr/loca/arm/2.95.3/arm-linux/include/uuid/uuid.h exists ?

It doesn't exist. If I create the directory and place uuid.h in it could you show me how to modify your script (or, maybe you modify?) to start at

echo “Installing Qtopia...”

That would fix it... I think.

Thanks

Greg
Go to the top of the page
 
+Quote Post
Ashitaka
post Dec 10 2004, 09:22 PM
Post #13





Group: Members
Posts: 58
Joined: 7-June 04
From: Tokyo
Member No.: 3,599



Just start it from the beginning (it will be a little longer of course).
But that is really a strange problem, the script should stop with an error if some file cannot be copied, I need to check this today...
Go to the top of the page
 
+Quote Post
Greg2
post Dec 12 2004, 07:52 AM
Post #14





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



Ashitaka,
I ran your script again, now I have the directory in place as per your last post. I'm not completely sure it wasn't there the first time?... I've been working on this too late at night... my head hurts! Anyway, it's the same output as before.

Here's what I've found:

Your script
CODE
-snip-
    mkdir -p $CROSS_PREFIX/arm-linux/include/uuid && \
    cp $PACKAGE_DIR/uuid.h $CROSS_PREFIX/arm-linux/include/uuid && \
-snip-

makes this directory:
/usr/local/arm/2.95.3/arm-linux/include/uuid/uuid.h

Then your script
CODE
-snip-
    cd Qtopia
    export QTDIR=/opt/QtEmbedded
    export QPEDIR=$PWD
    export PATH=$PWD/bin:$PATH

    cd src && \
    ./configure && \
    make
-snip-

Starts to compile Qtopia and fails with the output in my previous post.

I'm sorry I can't help you more, but it's just been recently I've found the time to research and try to learn this. If there's anything else you would like me to check, let me know? If you don't have the time to do this right now, don't worry about it but let me know? I have found and learned to use a little tool that was already on my system... rpm2cpio. With this I can place the rpm files where I want, then use the Zug's how-tos for compiler-setup.

Thanks

Greg
Go to the top of the page
 
+Quote Post
Ashitaka
post Dec 12 2004, 06:06 PM
Post #15





Group: Members
Posts: 58
Joined: 7-June 04
From: Tokyo
Member No.: 3,599



Sorry I did not answer earlier. I realized where the problem was coming from just after turning off my computer and going to bed... From the readme of my package :

QUOTE
  2.a/ Requirements
  -----------------
First, MAKE SURE you have all this:
  - X11, uuid, libjpeg and zlib development files

The problem is not when cross-compiling Qtopia, but when simply compiling Qtopia with your local system to be able to run on the Zaurus emulator.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st July 2014 - 11:48 PM