kernel source does not appear to be configured for the running kernel (but it is)

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:

******************************** 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



# 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:


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

andromeda:/usr/src/linux-3.11.10-21-desktop # make cloneconfig
make: *** No rule to make target `cloneconfig'.  Stop.

I saw

andromeda:/usr/src/linux-3.11.10-21-desktop # ls
Module.symvers  x86_64


so


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?

Why both kernel-default and kernel-desktop?
That’s unnecessary.

As you use kernel-desktop, remove kernel-default.

And according to your output it seems you do not have the kernel source installed at all.
Install the package kernel-source.

Why? You can have more than one different kernel installed. There is no problem in that.
I have them both installed because some time ago, after some update I had problems booting with one of them (don’t remember which one) and then I installed the other one and configure the system to boot with the other, but after more updates the problem dissapeared and now i can boot with any of them. Anyway I have the same problem trying to compile with any of them

And according to your output it seems you do not have the kernel source installed at all.
Install the package kernel-source.

I think I do


 andromeda:/home/fernando # zypper se kernel-source
Building repository 'GNOME:Apps' cache ...................................................................................................................[done]
Retrieving repository 'Packman Repository' metadata ......................................................................................................[done]
Building repository 'Packman Repository' cache ...........................................................................................................[done]
Retrieving repository 'multimedia libs' metadata .........................................................................................................[done]
Building repository 'multimedia libs' cache ..............................................................................................................[done]
Retrieving repository 'perl' metadata ....................................................................................................................[done]
Building repository 'perl' cache .........................................................................................................................[done]
Retrieving repository 'openSUSE-13.1-Update' metadata ....................................................................................................[done]
Building repository 'openSUSE-13.1-Update' cache .........................................................................................................[done]
Loading repository data...
Reading installed packages...

S | Name                  | Summary                                                                                                   | Type      
--+-----------------------+-----------------------------------------------------------------------------------------------------------+-----------
i | kernel-source         | Las fuentes del kernel de Linux                                                                           | package   
  | kernel-source         | Las fuentes del kernel de Linux                                                                           | srcpackage
i | kernel-source-vanilla | Fuentes del kernel de linux tal como están en kernel.org, solo con las correcciones mínimas necesarias. | package   
andromeda:/home/fernando # 




Hi
So which symlink is pointing to /usr/src/linux since you have kernel-source and kernel-source-vanilla installed, I’m guessing the later. Either remove the vanilla source or change the symlink…


uname -r
3.11.10-21-desktop

ls -la /usr/src/linux
lrwxrwxrwx 1 root root 16 Sep 15 00:21 /usr/src/linux -> linux-3.11.10-21

Yes you can.
But it wastes hard disk space, and things might get confused, especially when building kernel modules, as there is only one /usr/src/linux link f.e.

Well, on second thought, it should not matter for /usr/src/linux indeed, as there is only one kernel-source for all flavors.

I think I do

andromeda:/home/fernando # zypper se kernel-source

i | kernel-source | Las fuentes del kernel de Linux | package
| kernel-source | Las fuentes del kernel de Linux | srcpackage
i | kernel-source-vanilla | Fuentes del kernel de linux tal como están en kernel.org, solo con las correcciones mínimas necesarias. | package
andromeda:/home/fernando #

Yes, but which version?
Please post the output of “zypper se -s kernel-source”.
Or even better:

rpm -qa kernel*

Btw, you don’t need that kernel-source-vanilla either.

And maybe also show to what /usr/src/linux/ is pointing to:

ls -ld /usr/src/linux

Your error message in the first post clearly indicates that there is no configured kernel source for 3.11.10-21 below /usr/src/linux/.

On 2014-09-29 09:26, fperal wrote:

> I’m installing NI-VISA for Linux (from NI-Labview).

Wow. I used Labview long time ago. Didn’t know they have a Linux version.

> There is a README when it says it can happen and the solution is:

> 2. Change the directory to the /usr/src/linux-<version> directory, where
> <version> corresponds to the currently running kernel version.

Mmm.

I always used /usr/src/linux/, which is a symlink to the current one.

> 3. Run “zcat /boot/symvers-<version>.gz > Module.symvers” as root to prepare
> modversion support.

This one is new to me :-?
I just used “make cloneconfig” directly.


cer@Telcontar:~> cat /usr/src/preparar
#!/bin/bash
echo "-- cloneconfig --" && make cloneconfig && echo "-- scripts --"\
&& make scripts && echo "-- prepare --" && make prepare &&\
echo "-- Done good! --"
cer@Telcontar:~>

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 don’t even have that directory:


cer@Telcontar:~> ls /usr/src/
como_externo  hacer   kernel-modules  linux-3.1.10-1.16  linux-3.11.10-17-obj  linux-obj   old        tiempo
configs       hacer~  leeme           linux-3.1.10-1.19  linux-3.11.10-21      lost+found  packages
descarga      hazlo   leeme~          linux-3.11.10-11   linux-3.11.10-21-obj  mio         preparar
download      hazlo1  linux           linux-3.11.10-17   linux-3.11.10-7       movidos     preparar~
cer@Telcontar:~>
cer@Telcontar:~> l /usr/src/linux
lrwxrwxrwx 1 root root 16 Aug 15 03:42 /usr/src/linux -> linux-3.11.10-21/
cer@Telcontar:~>


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-29 15:46, fperal wrote:

> I think I do
>
> Code:
> --------------------

> S | Name | Summary | Type
> --±----------------------±----------------------------------------------------------------------------------------------------------±----------
> i | kernel-source | Las fuentes del kernel de Linux | package
> | kernel-source | Las fuentes del kernel de Linux | srcpackage
> i | kernel-source-vanilla | Fuentes del kernel de linux tal como están en kernel.org, solo con las correcciones mínimas necesarias. | package
> andromeda:/home/fernando #
>
>
>
>
> --------------------

Just a comment. When the system language is not English, you should do,
in order to post here, like this:


minas-tirith:~ # LANG=C zypper lr --details
....

or this:


minas-tirith:~ # LANG=en_US.UTF-8 zypper info kvm
Loading repository data...
Warning: Repository 'openSUSE-11.4-Update' appears to outdated. Consider
using a different mirror or server.
Reading installed packages...

That way we can all read it, regardless of local languages of sender and
reader. It is not a permanent change, it only applies to one command.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-29 10:16, wolfi323 wrote:

> As you use kernel-desktop, remove kernel-default.

I have


Telcontar:~ # rpm -qa | grep -i kernel | grep -i defa
kernel-default-devel-3.11.10-17.2.x86_64
kernel-default-devel-3.11.10-21.1.x86_64
Telcontar:~ #

It appears to be a dependency of something else and can not be removed,
as far as I remember.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I did “export LC_ALL=C” before typing the commnads to log output, and it seems the output is in ehglish … but not all the output :sarcastic:

or this:

minas-tirith:~ # LANG=en_US.UTF-8 zypper info kvm
Loading repository data…
Warning: Repository ‘openSUSE-11.4-Update’ appears to outdated. Consider
using a different mirror or server.
Reading installed packages…

It does not work for me either


andromeda:/home/fernando # LANG=C zypper se kernel-source
Obteniendo los datos del repositorio...
Leyendo los paquetes instalados...

E  | Nombre                |  Resumen                                                                                                  | Tipo       
--+-----------------------+---------------------------------------------------------------------------------------------------------+------------
i  | kernel-source         | Las fuentes del kernel de  Linux                                                                          | paquete    
  | kernel-source         | Las fuentes del kernel de  Linux                                                                          | paquete src
i | kernel-source-vanilla | Fuentes del kernel de  linux tal como están en kernel.org, solo con las correcciones mínimas  necesarias. | paquete    
andromeda:/home/fernando # 



Neither do this


andromeda:/home/fernando # LANG=en_US.UTF-8  zypper se kernel-source
Obteniendo los datos del repositorio...
Leyendo los paquetes instalados...

E | Nombre                | Resumen                                                                                                 | Tipo       
--+-----------------------+---------------------------------------------------------------------------------------------------------+------------
i | kernel-source         | Las fuentes del kernel de Linux                                                                         | paquete    
  | kernel-source         | Las fuentes del kernel de Linux                                                                         | paquete src
i | kernel-source-vanilla | Fuentes del kernel de linux tal como están en kernel.org, solo con las correcciones mínimas necesarias. | paquete    
andromeda:/home/fernando # 



… and then I’ve remebered I have done a “su” from my normal user. If I do “su -” then.


andromeda:~ # zypper se kernel-sourc
Loading repository data...
Reading installed packages...

S | Name                  | Summary                                              | Type      
--+-----------------------+------------------------------------------------------+-----------
i | kernel-source         | The Linux Kernel Sources                             | package   
  | kernel-source         | The Linux Kernel Sources                             | srcpackage
i | kernel-source-vanilla | Vanilla Linux kernel sources with minor build fixes. | package 


I have locales set to english when root, doing su without - was merging the environment

Yes, it is required by kernel-syms. And this also requires kernel-devel, kernel-desktop-devel and kernel-xen-devel (and probably kernel-pae-devel as well on 32bit).
Not that you necessarily need kernel-syms though, depending on what you plan to do…

But I was talking about kernel-default, not kernel-default-devel… :wink:

They have not only ported Labview, they are porting LabWindows :slight_smile: (For now is just the labwindows run time environment)

On 2014-09-29 17:16, fperal wrote:
>
> robin_listas;2667045 Wrote:
>> On 2014-09-29 09:26, fperal wrote:
>>
>>> I’m installing NI-VISA for Linux (from NI-Labview).
>>
>> Wow. I used Labview long time ago. Didn’t know they have a Linux
>> version.
>
> They have not only ported Labview, they are porting LabWindows :slight_smile:
> (For now is just the labwindows run time environment)

Wow!!

I thought that LabWindows was dead.
I used it a fair bit in MsDOS. It was not ported to Windows 3 - unless
they did it after I worked in that field.

The MsDOS version could be programmed in C or Basic, and the enviroment
could translate from one to the other. My predecessor used Basic, and I
quickly switched to C.

We were forced later to use LabView instead, as they did not port
Labwindows to Windows.

I think there were Mac versions then. And perhaps a Unix version of
Labwindows that I saw mentioned somewhere.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I had a bit of mess:


andromeda:~ # zypper se -s kernel-source
Loading repository data...
Reading installed packages...

S | Name                  | Type       | Version      | Arch   | Repository          
--+-----------------------+------------+--------------+--------+---------------------
i | kernel-source         | package    | 3.11.10-21.1 | noarch | openSUSE-13.1-Update
i | kernel-source         | package    | 3.11.10-17.2 | noarch | openSUSE-13.1-Update
v | kernel-source         | package    | 3.11.10-11.1 | noarch | openSUSE-13.1-Update
v | kernel-source         | package    | 3.11.10-7.1  | noarch | openSUSE-13.1-Update
v | kernel-source         | package    | 3.11.6-4.1   | noarch | openSUSE-13.1-Oss   
  | kernel-source         | srcpackage | 3.11.10-21.1 | noarch | openSUSE-13.1-Update
  | kernel-source         | srcpackage | 3.11.10-17.2 | noarch | openSUSE-13.1-Update
  | kernel-source         | srcpackage | 3.11.10-11.1 | noarch | openSUSE-13.1-Update
  | kernel-source         | srcpackage | 3.11.10-7.1  | noarch | openSUSE-13.1-Update
  | kernel-source         | srcpackage | 3.11.6-4.1   | noarch | openSUSE-13.1-Source
i | kernel-source-vanilla | package    | 3.11.10-21.1 | noarch | openSUSE-13.1-Update
i | kernel-source-vanilla | package    | 3.11.10-17.2 | noarch | openSUSE-13.1-Update
v | kernel-source-vanilla | package    | 3.11.10-11.1 | noarch | openSUSE-13.1-Update
v | kernel-source-vanilla | package    | 3.11.10-7.1  | noarch | openSUSE-13.1-Update
v | kernel-source-vanilla | package    | 3.11.6-4.1   | noarch | openSUSE-13.1-Oss   


andromeda:~ # rpm -qa kernel*
kernel-firmware-20130714git-2.21.1.noarch
kernel-default-devel-3.11.10-17.2.x86_64
kernel-default-3.11.10-17.2.x86_64
kernel-source-3.11.10-21.1.noarch
kernel-source-3.11.10-17.2.noarch
kernel-syms-3.11.10-21.1.x86_64
kernel-desktop-devel-3.11.10-21.1.x86_64
kernel-source-vanilla-3.11.10-17.2.noarch
kernel-devel-3.11.10-21.1.noarch
kernel-default-3.11.10-21.1.x86_64
kernel-default-devel-3.11.10-21.1.x86_64
kernel-xen-devel-3.11.10-21.1.x86_64
kernel-source-vanilla-3.11.10-21.1.noarch
kernel-devel-3.11.10-17.2.noarch
kernel-desktop-3.11.10-21.1.x86_64
kernel-desktop-3.11.10-17.2.x86_64
kernel-desktop-devel-3.11.10-17.2.x86_64

andromeda:~ # ls -ld /usr/src/linux
lrwxrwxrwx 1 root root 16 Aug 15 10:22 /usr/src/linux -> linux-3.11.10-21
andromeda:~ #



So I’ve done a bit of cleanup.
I remove all but kernel-desktop and kernel-desktop-devel and tried again, but same result. Then installed kernel-syms, and now:


fernando@andromeda:~> rpm -qa kernel*
kernel-desktop-base-3.11.10-17.2.x86_64
kernel-syms-3.11.10-21.1.x86_64
kernel-desktop-devel-3.11.10-21.1.x86_64
kernel-xen-devel-3.11.10-21.1.x86_64
kernel-devel-3.11.10-21.1.noarch
kernel-desktop-3.11.10-21.1.x86_64
kernel-default-devel-3.11.10-21.1.x86_64
kernel-desktop-devel-3.11.10-21.1.i686
fernando@andromeda:~> 

But same result:


andromeda:/usr/src/linux # /mnt/isomount/INSTALL

*****************************************************************************
  NI-VISA for Linux
     version 14.0.0f0 for Linux
*****************************************************************************

National Instruments products support the following Linux distributions:
   openSUSE
   Red Hat Enterprise Linux Desktop + Workstation
   Scientific Linux
Refer to README.txt for the latest information at the time of release.
Refer to www.ni.com/linux for the most recent information about Linux
support at National Instruments.

Continue? [Yn] 

Checking required install tools...
Checking installer tool versions...
rpm        4.11.1 can be used with a default installation path
tar        1.26
Checking dependencies...
glibc      2.18 
Unpacking install files to /tmp/nivisa-14.0.0f0.install...

******************************** ERROR ****************************************
* Kernel source in /usr/src/linux does not appear to be
* for the 3.11.10-21-desktop kernel.
* Ensure that kernel source for the 3.11.10-21-desktop kernel is installed
* and configured.  Refer to the README file for the product you are           *
* installing for information about configuring your kernel source.            *
******************************** ERROR ****************************************

Installer is aborted.



Then I’ve tried to follow instructions from NI.



andromeda:/usr/src/linux # make clean
ls: cannot access /usr/src/linux-3.11.10-21/Documentation/DocBook/media/*.b64: No such file or directory
andromeda:/usr/src/linux # zcat /boot/symvers-3.11.10-21-desktop.gz > Module.symvers
andromeda:/usr/src/linux # make cloneconfig
  HOSTCC  scripts/basic/fixdep
  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 # make modules_prepare
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: *** No rule to make target `/usr/src/linux-3.11.10-21/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h'.  Stop.
make: *** [archheaders] Error 2
andromeda:/usr/src/linux # 


I does not work and modules_prepare fails

Edited: i had forgotten kernel-source >:(

Now modules_prepare works and NI-VISA installation is working too

On 2014-09-29 16:56, fperal wrote:

>
> … and then I’ve remebered I have done a “su” from my normal user.
> If I do “su -” then.

AH!! Yes, I was going to tell you that.

>
> Code:
> --------------------
>
> andromeda:~ # zypper se kernel-sourc
> Loading repository data…
> Reading installed packages…
>
> S | Name | Summary | Type
> --±----------------------±-----------------------------------------------------±----------
> i | kernel-source | The Linux Kernel Sources | package
> | kernel-source | The Linux Kernel Sources | srcpackage
> i | kernel-source-vanilla | Vanilla Linux kernel sources with minor build fixes. | package
>
>
> --------------------
>
>
> I have locales set to english when root,

Same here. Actually, “POSIX”.

> doing su without - was merging
> the environment

Either “LANG=C command…” or "LANG=en_US.UTF-8 … " should have worked, anyway. Try this other combo, just for curiosity sake:


LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
DICTIONARY=english KDE_LANG=en_US.UTF-8 command...

Actually, I have:


cer@Telcontar:~> cat /usr/local/bin/ingles
#!/bin/sh
LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 DICTIONARY=english KDE_LANG=en_US.UTF-8   $*
# DICTIONARY es para ispell - desgraciadamente, no soporta UTF-8.
# aspell si traga, pero visualiza mal.
# KDE_LANG= funciona mal.
cer@Telcontar:~>

:wink:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-29 16:06, wolfi323 wrote:
>
> fperal;2667036 Wrote:
>> Why? You can have more than one different kernel installed. There is no
>> problem in that.
> Yes you can.
> But it wastes hard disk space, and things might get confused, especially
> when building kernel modules, as there is only one /usr/src/linux link
> f.e.
>
> Well, on second thought, it should not matter for /usr/src/linux indeed,
> as there is only one kernel-source for all flavors.

True, but he is not using the symlink:


andromeda:/usr/src/linux-3.11.10-21-desktop # make cloneconfig

I don’t even have that directory, so I can’t check what lives there :-?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-09-29 17:06, wolfi323 wrote:

> But I was talking about kernel-default, not kernel-default-devel… :wink:

Ah, right.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

That wasn’t really a mess, other than that you shouldn’t have kernel-source-vanilla.

So I’ve done a bit of cleanup.
I remove all but kernel-desktop and kernel-desktop-devel and tried again, but same result. Then installed kernel-syms, and now:

fernando@andromeda:~> rpm -qa kernel*
kernel-desktop-base-3.11.10-17.2.x86_64

Please remove kernel-desktop-base!
It probably won’t even boot your system.

Likely it got installed now because you removed kernel-desktop-3.11.10-17.2, but have another package installed that requires it (some kmp maybe).


kernel-syms-3.11.10-21.1.x86_64
kernel-desktop-devel-3.11.10-21.1.x86_64
kernel-xen-devel-3.11.10-21.1.x86_64
kernel-devel-3.11.10-21.1.noarch
kernel-desktop-3.11.10-21.1.x86_64
kernel-default-devel-3.11.10-21.1.x86_64
kernel-desktop-devel-3.11.10-21.1.i686
fernando@andromeda:~>

But same result:

Well, you have kernel-desktop-devel-3.11.10-21.1.i686, i.e. the 32bit version, installed now.
This obviously cannot work on a 64bit system.

Please remove the file /var/lib/zypp/SoftLocks to make zypper forget which packages you uninstalled (it doesn’t want to install them again, so installs the wrong ones because there is another choice).

Then re-install just kernel-desktop-devel and try again:

sudo zypper in -f kernel-desktop-devel

Or, to be sure the right package gets installed, run this:

sudo zypper in -f kernel-desktop-devel-3.11.10-21.1.x86_64

Good! :slight_smile:

Still, you should remove kernel-desktop-base, and replace the 32bit kernel-desktop-devel with the 64bit package.
Maybe it would be easier with YaST though (click on “Versions” below the package list to see all available/installed versions and be able to explicitely install and uninstall them).

I installed the 32 bits version too because the program trying to install was failing to compile and it is a 32 bit program… just in case.