Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-06-04, 04:09 PM   #1
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

I have a Debian/Woody/Stable system with a NVIDIA XFX FX-5200 card installed in the AGP slot. I am running 2.4.25 in smp mode compiled from source in the /usr/src/linux-2.4.25 directory. A backported "top" program and other ways reveals that the system is running fine in hyperthreaded mode (simulating 4 processors).

I have tried to install the 5336-pkg1 both with the nvidia-installer and with the "make install" from source. Both ways will not allow the driver to run due to an unresolved reference to smp_num_cpus.

I have already tried all the options available to for the installer to recognize the correct source directory. Indeed, the driver compiles correctly, but will not link to the reference (or it is not found on the compile step).

Please help fix this problem. Attached is the /var/log/nvidia-installer.log

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Apr 6 15:39:51 2004

option status:
license pre-accepted : false
update : false
force update : false
expert : true
uninstall : false
driver info : false
no precompiled interface: false
no ncurses color : false
query latest driver ver : false
OpenGL header files : false
no questions : false
silent : false
XFree86 install prefix : /usr/X11R6
OpenGL install prefix : /usr
Installer install prefix: /usr
kernel source path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp site : ftp://download.nvidia.com

chdir("./")
Using: nvidia-installer ncurses user interface
-> Searching for system utilities:
-> found `insmod` : `/sbin/insmod`
-> found `modprobe` : `/sbin/modprobe`
-> found `rmmod` : `/sbin/rmmod`
-> found `lsmod` : `/sbin/lsmod`
-> found `depmod` : `/sbin/depmod`
-> found `ldconfig` : `/sbin/ldconfig`
-> found `ld` : `/usr/bin/ld`
-> found `objcopy` : `/usr/bin/objcopy`
-> License accepted.
-> Kernel module installation path (Answer:
'/lib/modules/2.4.25/kernel/drivers/video ')
-> Kernel module installation path: /lib/modules/2.4.25/kernel/drivers/video
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface.
-> Kernel source path (Answer: '/usr/src/linux-2.4.25/ ')
-> Kernel source path: '/usr/src/linux-2.4.25/'
-> Performing cc_version_check with CC="cc".
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f nv.o os-agp.o os-interface.o os-registry.o nv-linux.o nv_compiler.h *
.d NVdriver nvidia.o
-> Building kernel module:
executing: 'cd ./usr/src/nv; make module SYSSRC=/usr/src/linux-2.4.25/'...
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > nv_compiler.h
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
DULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KE
RNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5
336 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -DREMAP_PAGE_
RANGE_4 -I. -I/usr/src/linux-2.4.25//include -Wno-cast-qual -Wno-error nv.c
In file included from /usr/src/linux-2.4.25/include/linux/vmalloc.h:8,
from nv-linux.h:62,
from nv.c:14:
/usr/src/linux-2.4.25/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux-2.4.25/include/linux/highmem.h:20: warning: pointer of type `
void *' used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
DULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KE
RNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5
336 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -DREMAP_PAGE_
RANGE_4 -I. -I/usr/src/linux-2.4.25//include -Wno-cast-qual -Wno-error os-a
gp.c
In file included from /usr/src/linux-2.4.25/include/linux/vmalloc.h:8,
from nv-linux.h:62,
from os-agp.c:24:
/usr/src/linux-2.4.25/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux-2.4.25/include/linux/highmem.h:20: warning: pointer of type `
void *' used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
DULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KE
RNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5
336 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -DREMAP_PAGE_
RANGE_4 -I. -I/usr/src/linux-2.4.25//include -Wno
-cast-qual -Wno-error os-interface.c
In file included from /usr/src/linux-2.4.25/include/linux/vmalloc.h:8,
from nv-linux.h:62,
from os-interface.c:26:
/usr/src/linux-2.4.25/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux-2.4.25/include/linux/highmem.h:20: warning: pointer of type `
void *' used in arithmetic
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wp
arentheses -Wpointer-arith -Wno-multichar -Werror -O -MD -D__KERNEL__ -DMO
DULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KE
RNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5
336 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -DREMAP_PAGE_
RANGE_4 -I. -I/usr/src/linux-2.4.25//include -Wno-cast-qual -Wno-error os-r
egistry.c
In file included from /usr/src/linux-2.4.25/include/linux/vmalloc.h:8,
from nv-linux.h:62,
from os-registry.c:14:
/usr/src/linux-2.4.25/include/linux/highmem.h: In function `bh_kmap':
/usr/src/linux-2.4.25/include/linux/highmem.h:20: warning: pointer of type `
void *' used in arithmetic
ld -r -o nv-linux.o nv.o os-agp.o os-interface.o os-registry.o
ld -r -o nvidia.o nv-linux.o nv-kernel.o
-> done.
-> Kernel module compilation complete.
executing: '/sbin/insmod ./usr/src/nv/nvidia.o silence_nvidia_output=1'...
./usr/src/nv/nvidia.o: unresolved symbol smp_call_function
./usr/src/nv/nvidia.o: unresolved symbol smp_num_cpus
./usr/src/nv/nvidia.o:
Hint: You are trying to load a module without a GPL compatible license
and it has unresolved symbols. Contact the module supplier for
assistance, only they can help you.

ERROR: Unable to load the kernel module 'nvidia.o'. This is most likely
because the kernel module was built using the wrong kernel source files.
Please make sure you have installed the kernel source files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
'kernel-source' rpm installed. If you know the correct kernel source
files are installed, you may specify the kernel source path with the
'--kernel-source-path' commandline option.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-06-04, 04:44 PM   #2
nvbrain
Registered User
 
Join Date: Feb 2004
Posts: 10
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

Just wanted to tell you that I have no problems compiling 5336 on a Debian / SMP (2 CPUS)
nvbrain is offline   Reply With Quote
Old 04-06-04, 04:46 PM   #3
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

I have no problems compiling, I just cannot seem to link it for some reason I don't understand.
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-06-04, 09:38 PM   #4
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

I have not received any help, so bumping to the top of the list. Still need help here !
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-07-04, 02:10 PM   #5
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

bumping again, in hopes of getting some kind of help.

I have the XFree86 driver working fine...

Perhaps I need to install a different graphics card...
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-07-04, 02:55 PM   #6
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

It's no card problem but more a driver bug. Something that might help is to disable agp.
Thunderbird is offline   Reply With Quote
Old 04-07-04, 04:38 PM   #7
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

Perhaps if I ask the question a different way and be a little more determined, I could get some help here.

I can see in the kernel sources directory

/lib/modules/2.4.25/build/include/linux/

which is the same as the source directory as pulled from ftp.kernel.org

/usr/src/linux-2.4.25/include/linux/

I can see the following:

grep smp_num_cpus smp.h


extern int smp_num_cpus;
#define smp_num_cpus 1

so the variable smp_num_cpus is defined in smp.h

Assiming this include file gets used in the compile step, and since nvidia.o is compiled successfully, why won't it load ???


As
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-08-04, 01:49 AM   #8
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

Grr, seems I wasn't awake yesterday when I replied thought I replied to a different post ...

Anyway build problems related to unresolved symbols are related to header problems. Really make sure that you point the nvidia installer to the build directory for your kernel. That is really critical. For example if you point the installer to a directory for a kernel from a similar version it won't work it needs to be the exact source.
Thunderbird is offline   Reply With Quote

Old 04-08-04, 02:17 PM   #9
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

I thank you for responding. At least there is one person on this forum who cares about nvidia. If I can't get this problem fixed soon, I will be forced to install a slower ATI card that works in 3D with the X11R6 drivers (open source).

OK. I next recompiled my kernel EXACTLY the same way, but this time I changed it from the SMP=YES to SMP=NO. The kernel boots up and sure enough there is only a single processor present.

In this configuration, the nvidia kernel installs correctly and loads the module into /lib/modules/2.4.25/kernel/drivers/video/nvidia.o

(2372131 Apr 8 13:38 nvidia.o)

I tested the video card and 3D works as expected for the commercial module (recall the XFree86 version will not execute in 3D).

I still have the SMP kernel available via LILO, so I leave everything intact and then boot the SMP kernel. X11 starts but hangs the system at the kdm screen as gray/white pixels. This is expected since this module has not been compiled with the SMP=YES option.

So now, will someone believe me when I say that I am compiling correctly. Where is the nvidia driver trying to link to smp_num_cpus once compiled, but trying to load ?

Come on NVIDIA guys, you are near losing a customer. I just bought an expensive NVIDIA card and can't get your installer to work !!

Still need help here !!!
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-08-04, 02:46 PM   #10
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

It must be a bug in the kernel (headers) or in the nvidia driver. In this case I think it might be a kernel header bug. What happens if you explicitly try to include this smp header from one of the nvidia source files? (or define the variable in one of nvidia's source files)
Thunderbird is offline   Reply With Quote
Old 04-08-04, 03:45 PM   #11
freelsjd
Registered User
 
Join Date: Feb 2003
Posts: 73
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_

Great idea ! I never thought to look in the nvidia source (duh !). I guess because I am not a proficient C programmer.

The variable smp_num_cpus is used only once in the file

./NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv-linux.h

in the code segment

#if defined (KERNEL_2_4)
# define NV_IS_SUSER() suser()
# define NV_PCI_DEVICE_NAME(dev) ((dev)->name)
# define NV_NUM_CPUS() smp_num_cpus
# define NV_CLI() __cli()
# define NV_SAVE_FLAGS(eflags) __save_flags(eflags)
# define NV_RESTORE_FLAGS(eflags) __restore_flags(eflags)
# define NV_MAY_SLEEP() (!in_interrupt())
# define NV_MODULE_PARAMETER(x) MODULE_PARM(x, "i")
#endif

To my knowledge, I do not have any separate kernel header files package loaded, although there are linux includes within the libc6-dev package of Debian/Woody which are surely inconsistent with those of the kernel.

The 2.4.25 kernel source has smp_num_cpus defined in

/usr/src/linux-2.4.25/include/linux/smp.h

with occurences of smp_num_cpus appearing as

extern int smp_num_cpus;

and

/*
* These macros fold the SMP functionality into a single CPU system
*/

#define smp_num_cpus 1
#define smp_processor_id() 0
#define hard_smp_processor_id() 0
#define smp_threads_ready 1
#define kernel_lock()
#define cpu_logical_map(cpu) 0
#define cpu_number_map(cpu) 0
#define smp_call_function(func,info,retry,wait) ({ 0; })
#define cpu_online_map 1

Sso, some questions:

How do the kernel configuration variables (which is what I have in .config)

CONFIG_SMP=y
CONFIG_NR_CPUS=4

get into these source files of the kernel ? Further, how do they get passed on to the the nvidia source when it compiles ? How can I do as you suggest and directly load these into the nvidia source ?

get into
__________________
J D Freels
freelsjd is offline   Reply With Quote
Old 04-08-04, 03:53 PM   #12
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: IA32 5336 NV driver and SMP Debian/Woody system: unresolved reference to smp_num_cpus

Not sure exactly using what command they come into the headers. Think it happens when you start the actual make process (so after make xconfig, menuconfig or whatever you use).

The most dirty hack is this:
#if defined (KERNEL_2_4)
# define NV_IS_SUSER() suser()
# define NV_PCI_DEVICE_NAME(dev) ((dev)->name)
# define NV_NUM_CPUS() 2 <-- THE CHANGE
# define NV_CLI() __cli()
# define NV_SAVE_FLAGS(eflags) __save_flags(eflags)
# define NV_RESTORE_FLAGS(eflags) __restore_flags(eflags)
# define NV_MAY_SLEEP() (!in_interrupt())
# define NV_MODULE_PARAMETER(x) MODULE_PARM(x, "i")
#endif
Thunderbird is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:58 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.