LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Wrong GCC version during compile? (https://www.linuxquestions.org/questions/linux-software-2/wrong-gcc-version-during-compile-362504/)

raid517 09-11-2005 09:26 PM

Wrong GCC version during compile?
 
Hi, I am trying to install submount on my Debian Sid machine. However even though it compiles cleanly and installs OK I can't insert the module.

Here is the dmesg output I get:

Code:

subfs: version magic '2.6.11-kanotix-10 preempt K7 gcc-4.0' should be '2.6.11-kanotix-10 preempt K7 gcc-3.3'
This doesn't look like a huge problem, as I have both GCC 4.0 and 3.3 installed.

The question is though, how can I select a compiler during configure and/or make that this software will be happy with?

GJ

freakyg 09-11-2005 09:40 PM

example.........
Code:

make CC=/opt/gcc-2.95.3/bin/gcc
Code:

  make CC=/opt/gcc-2.95.3/bin/gcc install

Matir 09-11-2005 10:37 PM

Yeah, you need to make sure kernel modules are compiled with the same version of gcc as the kernel itself. The examples above allow you to do this.

raid517 09-14-2005 08:39 AM

Thanks guys, but I still don't quite get it.

I tried doing:

make CC=/opt/gcc-3.3/bin/gcc - as I think this is the version of GCC that the subfs module expects and is asking for (or at least it mentions GCC 3.3 above) - but it just spits out an error saying:

Code:

/submount-0.9/subfs-0.9# make CC=/opt/gcc-3.3/bin/gcc
make -C /lib/modules/2.6.11-kanotix-10/build SUBDIRS=/Downloads2/submount-0.9/submount-0.9/subfs-0.9 modules
make[1]: /opt/gcc-3.3/bin/gcc: Command not found
make[1]: Entering directory `/usr/src/linux-2.6.11-kanotix-10'
/usr/src/linux-2.6.11-kanotix-10/scripts/gcc-version.sh: line 11: /opt/gcc-3.3/bin/gcc: No such file or directory
/usr/src/linux-2.6.11-kanotix-10/scripts/gcc-version.sh: line 12: /opt/gcc-3.3/bin/gcc: No such file or directory
make[1]: /opt/gcc-3.3/bin/gcc: Command not found
make[1]: /opt/gcc-3.3/bin/gcc: Command not found
  CC [M]  /Downloads2/submount-0.9/submount-0.9/subfs-0.9/subfs.o
/bin/sh: /opt/gcc-3.3/bin/gcc: No such file or directory
make[2]: *** [/Downloads2/submount-0.9/submount-0.9/subfs-0.9/subfs.o] Error 1
make[1]: *** [_module_/Downloads2/submount-0.9/submount-0.9/subfs-0.9] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.11-kanotix-10'
make: *** [default] Error 2

I definately do have GCC 3.3 installed - and am using Debian Sid.

Where am I going wrong?

GJ

raid517 09-14-2005 08:46 AM

Bingo! I worked it out. It was just the wrong path to the GCC version I used to compile the kernel.

Thanks guys!

GJ


All times are GMT -5. The time now is 03:28 AM.