Main > Linux
using different gcc compilers in Linux
MotorHedJr:
Hello all:
Sorry, I originally put this post on the end of the d9200 and matrox g400 thread -- It is more appropriate here -- apologies to all for my oversight...)
Anyway, excellent work. I have been trying to duplicate that matrox d9200 linux setup. I am using Gentoo 2005.1 w/ KDE and ALSA. I am having a problem compling SVGAlib 1.9.19.
It complies using 'make install' - however the svgalib_helper module is not listed. Therefore, as per the Easy MAMEcab website, I must re-compile it being sure to use the same compiler that I complied my kernel with (2.6.12-gentoo-r6).
So I type:
[gcc --version]
This results in:
gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
Copyright (C) 2003 Free Software Foundation, Inc.
So then I enter:
[make CC=/opt/gcc-3.3.5/bin/gcc install]
This starts the build but always fails and ends up with following error:
make[1]: /opt/gcc-3.3.5/bin/gcc: Command not found
make[1]: *** [vga.o] Error 127
make[1]: Leaving directory `/usr/src/svgalib-1.9.19/sharedlib'
make: *** [sharedlib/libvga.so.1.9.19] Error 2
acm-wkockitidq3 svgalib-1.9.19 #
Yes I am a linux noob -- but I did some research to try to figure out the problem before posting it on the forum.
First, there is nothing in the /opt/ folder -- I guess there should be...
Second, this leads me to believe I need to install gcc --(specifically gcc 3.3.5). Is this really necessary? If so where do I put it?
Third, (at the risk of sounding ignorant) this confuses me. If this gcc was the compiler used to compile my kernel then it exists somewhere in my Linux environment... right? Why is it not recognized in the 'make cc=/opt/gcc-3.3.5....' command line?
Thanks for looking at my post, any help would be greatly appreciated.
Happy Holidays to all.
-MH Jr.
Major Rock Hardy:
yo-
I will try to help you...
--- Quote from: MotorHedJr on December 15, 2005, 10:43:35 am ---So then I enter:
[make CC=/opt/gcc-3.3.5/bin/gcc install]
This starts the build but always fails and ends up with following error:
make[1]: /opt/gcc-3.3.5/bin/gcc: Command not found
make[1]: *** [vga.o] Error 127
make[1]: Leaving directory `/usr/src/svgalib-1.9.19/sharedlib'
make: *** [sharedlib/libvga.so.1.9.19] Error 2
acm-wkockitidq3 svgalib-1.9.19 #
--- End quote ---
now here's the quote from desmatic's Easy MAME Cab site where I think you are going wrong:
--- Quote ---Note, you must build SVGAlib with the same compiler used to build your kernel. Type gcc --version; cat /proc/version at a command prompt if unsure. So, on an LFS build with gcc-2.95.3 you would use make CC=/opt/gcc-2.95.3/bin/gcc install, not just make install.
--- End quote ---
First off, if you are using gentoo linux, you should have a gcc installed already. Also likely is that the gcc you already have installed is the one you used to compile your kernel (part of the gentoo install process).
do a:
cat /proc/version
(you may need to run this as root - I didn't)
... then do a:
gcc --version
you want the gcc version #s to match. Let me know if they mismatch. You might just post the results of each of these commands.
Desmatic was just giving an example of how you'd handle it if you needed to use a different version of gcc when you issue the make command. Also, his example is for LFS (www.linuxfromscratch.org) - which uses /opt/gcc-version/bin/gcc as the gcc binary location in his case - perhaps he installed it there. I'm not familiar w/ LFS so I'm not sure. Gentoo's default location is /usr/bin/gcc. You can find out where gcc is on a linux machine by typing:
which gcc
Rock
MotorHedJr:
Hi Rock,
Thanks.
Here are the results of those commands:
acm-wkockitidq3 motorhed_jr # cat /proc/version
Linux version 2.6.12-gentoo-r6 (root@acm-wkockitidq3) (gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)) #7 SMP Fri Dec 2 14:45:43 EST 2005
acm-wkockitidq3 motorhed_jr # gcc --version
gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
Major Rock Hardy:
--- Quote from: MotorHedJr on December 16, 2005, 06:16:18 am ---So then I did:
make CC=usr/bin/gcc install
This resulted in a successful build! -- Thank You!
So then I did:
acm-wkockitidq3 svgalib-1.9.19 # insmod kernel/svgalib_helper/svgalib_helper.ko
insmod: error inserting 'kernel/svgalib_helper/svgalib_helper.ko': -1 Unknown symbol in module
This is the same error I got when I did just a 'make install' -- so I guess gcc was compling it correctly the whole time -- now I understand.
So I looked at the svgalib_helper.ko file. It is a binary file -- I do not know how to edit out this Unknown symbol... Have you seen anything like this before?
Thanks again for your help.
-MH Jr.
--- End quote ---
MH, I think we are fighting similar fires on this one... see my thread at:
http://forum.arcadecontrols.com/index.php?topic=46747.0
Rock
p.s. for the record, I think if your gcc --version resolves to the same version as your kernel was built with, then the "CC=usr/bin/gcc" portion of the make install command is redundant, as verified by your comment that the error messages are the same as the "make install" command. However I don't believe this is a make or gcc version issue - it's an svga-libs code vs. kernel code (and perhaps gentoo specific) issue. I'm looking into it but see my thread for my progress, it will probably help you out.
MotorHedJr:
Hi Rock,
Congratulations! I will study the entire thread and try it today/tomorrow on my setup.
Thanks again for your help.
MH Jr.
Navigation
[0] Message Index
[#] Next page
Go to full version