Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 488.2 fails to install on linux-2.6.25 - ERROR on GCC version check.

Solved!
Go to solution
Hi there,

I have a question regarding the ni488.2 driver on linux. I am running openSUSE 11.0 on the 2.6.25.5-1.1-pae kernel with gcc version 4.3.1 , so yes, it is not necessarily supported by the NI-488.2-beta-2.5.1b1 driver, however, I am not sure the problem lies with the driver and I am still hopeful that someone can help me out, before I have to degrade my operating system.

After preparing the kernel according to the instructions in the readme.txt file to overcome the known kernel source problem, the following error shows up.

Checking required install tools...
Checking installer tool versions...
rpm        4.4.2 can be used with a default installation path
tar        1.19
Checking dependencies...
glibc      2.8
Unpacking install files to /tmp/NI4882beta-2.5.1b1.install...

******************************** ERROR ****************************************
* The version of gcc in the path does not match the version of gcc used to    *
* compile the currently running kernel.  This can cause unpredictable         *
* behavior in kernel drivers and should be fixed.                             *
* gcc version: Linux)                                                          *
* kernel compiled with: 4.3.1                                                 *
******************************** ERROR ****************************************


Installer is aborted.


It seems to be an error in the way the driver checks the version number of the gcc. I tried the old driver NI-488.2-beta-2.5.1b0 (zero on the end) and its has the same problem. I have that driver running on openSUSE 10.3 where I did not encounter that problem.

Does anyone have an idea what I have to tweak to make it realise the gcc version number is the correct one?

0 Kudos
Message 1 of 28
(9,862 Views)

Hi,

Thats a very unusual error to get, it suggests your gcc version was not the version used to create your systems kernel - have you upgraded gcc since your installation of SuSE 11 via yum/up2date?

The only workaround I can think of is to use the lower version of gcc on your system and set the correct path via symlinks, although if this is an error raised right away following a fresh install then it just looks as though SuSE hasn't installed something as the software expects it.

All the best,

Applications Engineer
0 Kudos
Message 2 of 28
(9,838 Views)
Solution

after several hours of tinkering, here is the solution that worked for me and allowed me to install the NI driver for the PCI-GPIB card under openSuSE 11.0

The problem is indeed, that the NI installation script looks in /usr/bin for gcc first and thus follows the symbolic link there to gcc-4.3 (version number 4.3) in the same directory. The gcc that we want it to use is located in /usr/local/bin (version number 4.3.1) which is the gcc that was used to compile the kernel.

Either one could make the installation script look in /usr/local/bin first, by changing the line:
PATH=/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/local/bin
to
PATH=/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin
but one would have to do that to all the installation scripts.

A better solution is to change the symbolic link for the gcc.
Go to /usr/bin and check where gcc links to using the " ls -g gcc*" command. Remove the link using "rm gcc" and then create it again pointing to the right path using "ln -s /usr/local/bin/gcc ./gcc"

The go and run the installation script for the driver again. It should work now.
0 Kudos
Message 3 of 28
(9,823 Views)

Hi,

Thanks for letting me know, I'm glad a symlink helped solve the issue and allowed the correct path/gcc version to build

All the best,

Applications Engineer
0 Kudos
Message 4 of 28
(9,818 Views)
Unfortunately, the symlink did not solve the problem for me (I do not have any other GCC installed). I found the error in the nivisa/nikal/
installerUtility.sh script, line 340

currentGCCVersion=`$CC --version | head -n 1 | $AWK '{print $3}'`

The "gcc --version" returns "gcc (SUSE Linux) 4.3.1", so the script uses the incorect 3rd parameter "Linux)" instead 4th parameter "4.3.1". One of the possible solutions is to modify this line to:

currentGCCVersion=`$CC --version | head -n 1 | $AWK '{ x=1; while (x <= NF && $x !~ /^[0-9]\.[0-9]\.[0-9]*$/) x++; print $x }'`

This will find the correct version of GCC compiler. (Maybe it could be simplified, I am not an awk guru 🙂

Regards,

David
0 Kudos
Message 5 of 28
(9,697 Views)

Hi David,

Thanks for posting this workaround to the community,

All the best,

Applications Engineer
0 Kudos
Message 6 of 28
(9,685 Views)
Hi,

How can I change the installerUtility.sh script, and then do the installation of nikali package again?
(I have changed the script under bin directory of NI4882-2.5.4b1.tar.gz, but the script is also existed under /usr/local/natinst/nikal/bin during the installation process.)

I also have tried to modify the installerUtility.sh of nikali-1.7.0-f0.noarch.rpm but I couldn't find the SPEC file to rebuild the package.

Could NI or anyone provide the updated nikali-1.7.0-f0.noarch.rpm or the solution to us?

Thanks

--------------------------------------------------------------------------------------------------

Installation Log:

NI-488.2 Distribution version 2.5.4b1
is about to be installed using rpm at /usr/local/natinst

Would you like to continue? [Yn] y

Installing NI-488.2 Distribution version 2.5.4b1...
Pre Installation ..........
Preparing...                ########################################### [100%]
   1:nikali                 ########################################### [ 14%]
   2:nipalki                ########################################### [ 29%]
   3:nipali                 ########################################### [ 43%]
   4:ni4882ki               ########################################### [ 57%]
   5:labview82-rte          ########################################### [ 71%]
   6:nispyi                 ########################################### [ 86%]
   7:ni4882i                ########################################### [100%]
Post Installation .
Warning: nikali post installation failed! /tmp/nikaliPostInstall.log follows:
******************************** ERROR ****************************************
* The version of gcc in the path does not match the version of gcc used to    *
* compile the currently running kernel.  This can cause unpredictable         *
* behavior in kernel drivers and should be fixed.                             *
* gcc version: Linux)                                                          *
* kernel compiled with: 4.3.1                                                 *
******************************** ERROR ****************************************
./uninstall.sh: line 13: Makefile.in: No such file or directory
Makefile:11: Makefile.in: No such file or directory
make: *** No rule to make target `Makefile.in'.  Stop.
Updating NI-KAL:
 NI-KAL update failed.

Makefile:11: Makefile.in: No such file or directory
make: *** No rule to make target `Makefile.in'.  Stop.
.........

0 Kudos
Message 7 of 28
(9,517 Views)

I am having a very similar problem while installing NI-VISA 4.4 with open SuSE 11.0 kernel 2.6.25.5-1.1-pae, I get the same error message.

 

 ->The version of gcc in the path does not match the version of gcc used to compile the currently running kernel. This can cause unpredictable behavior in kernel drivers and should be -> fixed.

-> gcc version :Linux)

-> kernel compiled with: 4.3.1

 

-> Installation abored.

 

Then I check the gcc version:

    $ gcc --version

-> gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]

 

I have tried the solutions posted with no success 

0 Kudos
Message 8 of 28
(9,420 Views)
Solution
Accepted by topic author cryotak

This will be fixed in the next release of NI-KAL (1.9).  The problem is that we used "gcc --version" instead of "gcc -v" which matches the string reported by the kernel.  You can either wait for the official release of NI-KAL 1.9 or if you are comfortable messing with shell scripts you can edit:

 

/usr/local/natinst/nikal/bin/installerUtility.sh

 

Search for currentGCCVersion, and replace it with something like:

 

currentGCCVersion=`$CC -v 2>&1 | tail -n 1 | $SED 's/.*gcc version \([0-9][^ )]*\).*/\1/'`

Of course your gcc version still needs to match.  After editing the script you should be able to run updateNIDrivers to compile NI-KAL and the corresponding drivers for your kernel.

 

Shawn Bohrer

National Instruments

Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 9 of 28
(9,255 Views)

Shawn,

 

Is there a mailing list I can sign on to be notified about the next release?

(NI-KAL 1.9).

Release schedule?

 

Thanks,

Ali

0 Kudos
Message 10 of 28
(9,042 Views)