I'm installing NI-VISA for Linux (from NI-Labview).It's said to be suppported for Opensuse 13.1. (I'm using Opensuse 13.1 x86_64).
I have installed kernel-default, kernel-default-devel, kernel-desktop, kernel-desktop devel, kernel-syms. I'm using kernel desktop.
When installing I run a INSTALL script, it tries to compile something and it reports an error:
I've found is a InstallerUtility.sh inside a nivisa-14.0.0f0.tar.gz package, here is the function wichh test the prerequisites
There is a README when it says it can happen and the solution is:
I did and it reported an error
I saw
so
Then I tried to run the script with the same error.
What can I do?
I have installed kernel-default, kernel-default-devel, kernel-desktop, kernel-desktop devel, kernel-syms. I'm using kernel desktop.
When installing I run a INSTALL script, it tries to compile something and it reports an error:
Code:
******************************** ERROR ****************************************
* Kernel source in /usr/src/linux does not appear to be
* configured for the 3.11.10-21-desktop kernel.
* Configuration of kernel source is required to continue installation. *
* Refer to the README file for the product you are installing for information *
* about configuring your kernel source. *
******************************** ERROR ****************************************
I've found is a InstallerUtility.sh inside a nivisa-14.0.0f0.tar.gz package, here is the function wichh test the prerequisites
Code:
# check the system for pre-requisites for installation. This function will
# return successful if it doesn't find any problems or will print a message
# and return an error if it finds something wrong.
nikalInstallationCheck()
{
# check for gcc since we need that to successfully install
if ! which gcc >/dev/null 2>&1; then
echo "***************************** ERROR ******************************"
echo "* ERROR: gcc does not appear to be installed! *"
echo "* Installation of gcc is required to continue this installation. *"
echo "***************************** ERROR ******************************"
return $statusFail
fi
if [ $KERNELTARGET ]; then
kernelVersion=$KERNELTARGET
else
kernelVersion=`$UNAME -r`
fi
kernelMajor=`echo $kernelVersion | $CUT -d "-" -f 1 | $CUT -d "." -f 1`
kernelMinor=`echo $kernelVersion | $CUT -d "-" -f 1 | $CUT -d "." -f 2`
kernelPatchLevel=`echo $kernelVersion | $CUT -d "-" -f 1 | $CUT -d "." -f 3`
# find modules directory
# Set INSTALL_MOD_PATH to change the base path for the modules to install
# modules under. This is when building modules for a kernel not installed
# on the system (cross-compiling, building against a git kernel, etc).
if [ ! -d $INSTALL_MOD_PATH/lib/modules/$kernelVersion ]; then
echo "*** ERROR: $INSTALL_MOD_PATH/lib/modules/$kernelVersion directory not found. ***"
exit $statusFail
fi
# find the kernel headers/source dir
if [ $KERNELHEADERS ]; then
headersDir=$KERNELHEADERS
elif [ -d "/lib/modules/$kernelVersion/build/include/linux" ]; then
if [ -d "/lib/modules/$kernelVersion/source/include/linux" ]; then
headersDir=/lib/modules/$kernelVersion/source
else
headersDir=/lib/modules/$kernelVersion/build
fi
elif [ -d "/usr/src/linux-$kernelVersion/include/linux" ]; then
headersDir=/usr/src/linux-$kernelVersion
elif [ -d "/usr/src/linux-$kernelMajor.$kernelMinor/include/linux" ]; then
headersDir=/usr/src/linux-$kernelMajor.$kernelMinor
elif [ -d "/usr/src/kernels/$kernelVersion/include/linux" ]; then
headersDir=/usr/src/kernels/$kernelVersion
elif [ -d "/usr/src/linux/include/linux" ]; then
headersDir=/usr/src/linux
else
echo "************************************ ERROR *************************************"
echo "* Kernel source does not appear to be installed for the $kernelVersion kernel."
echo "* Installation of the kernel-source package for kernel $kernelVersion is"
echo "* required to continue this installation."
echo "************************************ ERROR *************************************"
return $statusFail
fi
# check that the headers dir that we found is configured
configuredStatus=$statusSuccess
asmDir=""
if [ -e $headersDir/include/asm ]; then
asmDir=$headersDir/include/asm
elif [ -e $headersDir/include/generated ]; then
asmDir=$headersDir/include/generated
else
configuredStatus=$statusFail
fi
if [ $configuredStatus -eq $statusSuccess ]; then
if uname -m | egrep "i.86" > /dev/null; then
if [ ! -e $asmDir/asm_offsets.h ] && [ ! -e $asmDir/asm-offsets.h ]; then
configuredStatus=$statusFail
fi
fi
fi
if [ $configuredStatus -ne $statusSuccess ]; then
echo "******************************** ERROR ****************************************"
echo "* Kernel source in $headersDir does not appear to be"
echo "* configured for the $kernelVersion kernel."
echo "* Configuration of kernel source is required to continue installation. *"
echo "* Refer to the README file for the product you are installing for information *"
echo "* about configuring your kernel source. *"
echo "******************************** ERROR ****************************************"
return $statusFail
fi
# check that the headers dir that we found is for the correct version of
# the kernel
sourceVersionStatus=$statusSuccess
if [ -e $headersDir/include/linux/version.h ]; then
versionFile=$headersDir/include/linux/version.h
elif [ -e $headersDir/include/generated/uapi/linux/version.h ]; then
versionFile=$headersDir/include/generated/uapi/linux/version.h
else
sourceVersionStatus=$statusFail
fi
if [ -e "$versionFile" ] && [ "`$GREP UTS_RELEASE $versionFile | $GREP -c \"$kernelVersion\"`" = "0" ]; then
utsRelease=""
if [ -e $headersDir/include/linux/utsrelease.h ]; then
utsRelease=$headersDir/include/linux/utsrelease.h
elif [ -e $headersDir/include/generated/utsrelease.h ]; then
utsRelease=$headersDir/include/generated/utsrelease.h
else
sourceVersionStatus=$statusFail
fi
if [ $sourceVersionStatus -eq $statusSuccess ]; then
if [ "`$GREP UTS_RELEASE $utsRelease | $GREP -c \"$kernelVersion\"`" = "0" ]; then
sourceVersionStatus=$statusFail
fi
fi
fi
if [ $sourceVersionStatus -ne $statusSuccess ]; then
echo "******************************** ERROR ****************************************"
echo "* Kernel source in $headersDir does not appear to be"
echo "* for the $kernelVersion kernel."
echo "* Ensure that kernel source for the $kernelVersion kernel is installed"
echo "* and configured. Refer to the README file for the product you are *"
echo "* installing for information about configuring your kernel source. *"
echo "******************************** ERROR ****************************************"
return $statusFail
fi
# check the version of gcc that is in the path and ensure that it is the
# same version of gcc that was used to compile the currently running kernel
if [ -z "$KERNELTARGET" -o "$KERNELTARGET" == "`$UNAME -r`" ]; then
currentGCCVersion=`$CC -v 2>&1 | tail -n 1 | $SED 's/.*gcc[a-zA-Z (]\+\([0-9][^ )]\+\).*/\1/'`
kernelGCCVersion=`$CAT /proc/version | $SED 's/.*gcc[a-zA-Z (]\+\([0-9][^ )]\+\).*/\1/'`
if [ "$currentGCCVersion" != "$kernelGCCVersion" ]; then
if [ "${currentGCCVersion%\.*}" != "${kernelGCCVersion%\.*}" ]; then
echo "******************************** ERROR ****************************************"
echo "* The version of gcc in the path does not match the version of gcc used to *"
echo "* compile the currently running kernel. This can cause unpredictable *"
echo "* behavior in kernel drivers and should be fixed. *"
echo "* gcc version: $currentGCCVersion *"
echo "* kernel compiled with: $kernelGCCVersion *"
echo "******************************** ERROR ****************************************"
return $statusFail
else
echo "******************************** WARNING **************************************"
echo "* The version of gcc in the path does not match the version of gcc used to *"
echo "* compile the currently running kernel. This can cause unpredictable *"
echo "* behavior in kernel drivers and should be fixed. *"
echo "* gcc version: $currentGCCVersion *"
echo "* kernel compiled with: $kernelGCCVersion *"
echo "******************************** WARNING **************************************"
fi
fi
fi
return $statusSuccess
}
There is a README when it says it can happen and the solution is:
Code:
Q2: During installation I get a message similar to the following one:
"Kernel source does not appear to be configured for the running kernel.
Configuration of kernel source is required to continue installation."
I do have kernel sources installed; is there anything else that needs to
be done?
A2: This problem can occur even if you have installed the correct kernel sources,
if the sources require configuration. This problem has been seen on openSUSE.
However, it is possible that other distributions will require similar steps
to resolve this problem.
1. Ensure you have installed kernel-source and kernel-syms packages
corresponding to the version of the currently running kernel. The version
of the currently running kernel can be determined by issuing the command
`uname -r`.
2. Change the directory to the /usr/src/linux-<version> directory, where
<version> corresponds to the currently running kernel version.
3. Run "zcat /boot/symvers-<version>.gz > Module.symvers" as root to prepare
modversion support.
4. Run "make cloneconfig" as root to configure the sources for the
currently running kernel.
5. Run "make modules_prepare" as root to prepare the headers for
compilation.
6. THIS STEP IS STRICTLY OPTIONAL. Completing this step removes the
warning:
WARNING: Symbol version dump /usr/src/linux/Module.symvers is missing,
modules will have CONFIG_MODVERSIONS disabled.
Run "make modules" as root to compile all modules and generate
Module.symvers; this step may take 30 minutes or more to complete.
7. Run the INSTALL script for the NI-VISA software for Linux from this
directory.
I did and it reported an error
Code:
andromeda:/usr/src/linux-3.11.10-21-desktop # make cloneconfig
make: *** No rule to make target `cloneconfig'. Stop.
I saw
Code:
andromeda:/usr/src/linux-3.11.10-21-desktop # ls
Module.symvers x86_64
so
Code:
andromeda:cd /usr/src/linux-3.11.10-21-obj/x86_64/default
andromeda:/usr/src/linux-3.11.10-21-obj/x86_64/default # zcat /boot/symvers-3.11.10-21-desktop.gz > Module.symvers
andromeda:/usr/src/linux-3.11.10-21-obj/x86_64/default # make cloneconfig
HOSTCC scripts/basic/fixdep
GEN /usr/src/linux-3.11.10-21-obj/x86_64/default/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
Cloning configuration file /proc/config.gz
#
# configuration written to .config
#
andromeda:/usr/src/linux-3.11.10-21-obj/x86_64/default # make modules_prepare
GEN /usr/src/linux-3.11.10-21-obj/x86_64/default/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[3]: No se hace nada para `all'.
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
Using /usr/src/linux-3.11.10-21 as source for kernel
GEN /usr/src/linux-3.11.10-21-obj/x86_64/default/Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL /usr/src/linux-3.11.10-21/scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTCC scripts/genksyms/parse.tab.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
andromeda:/usr/src/linux-3.11.10-21-obj/x86_64/default #
Then I tried to run the script with the same error.
What can I do?