LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   modem driver compile problem (https://www.linuxquestions.org/questions/linux-software-2/modem-driver-compile-problem-40821/)

junks 01-09-2003 04:42 AM

modem driver compile problem
 
I am trying to install my modem driver for redhat linux 7.3.
Its not compiling correctly. Missing some files.

I am new to Linux, just installed the Workstation option.
Thought it will include all the files for compilation.

Here is the error, please if I need to install src files, then give me the procedures as well.
Thanks.

-----------------------------------
[root@localhost Intel-536ep-425]# make 536ep
if [ -a /boot/vmlinuz.version.h ]; then \
cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h; fi
cd coredrv; make \
"PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" \
536ep;
make[1]: Entering directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o coredrv.o coredrv.c
In file included from /usr/include/linux/timex.h:152,
from /usr/include/linux/sched.h:14,
from /usr/include/linux/delay.h:12,
from coredrv.c:34:
/usr/include/asm/timex.h:10:21: asm/msr.h: No such file or directory
In file included from coredrv.c:34:
/usr/include/linux/delay.h:13:23: asm/delay.h: No such file or directory
In file included from /usr/include/linux/module.h:20,
from coredrv.c:37:
/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include (or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname -r)/build/include
/usr/include/linux/modversions.h:5:2: #error to build against the currently-running kernel.
make[1]: *** [coredrv.o] Error 1
make[1]: Leaving directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
make: *** [536ep] Error 2

niknah 01-09-2003 08:39 AM

make sure you have the kernel headers, look in /usr/src/linux/include(or /usr/src/linux???/include), there should be some stuff there.

if you have it, edit your driver's Makefile
on the bit where it says...
-I../inc

add...
-I../inc -I/usr/src/linux/include

junks 01-09-2003 02:35 PM

No I don't have these header files , and there is no such linux directory in usr/src/
I checked already...

How to get these files ? How to install them ?
Procedure?
Thanks.

niknah 01-09-2003 07:54 PM

either download the linux kernel(the same version as the one installed in your computer) or install the kernelheaders.....rpm from your distribution's CD.

junks 01-10-2003 11:32 AM

Ok I installed the kernel source rpm and now I have those files.
usr/src/....
I did try to install again. Here is the outputs:
------------------------------
[root@localhost Intel-536ep-425]# make clean
cd coredrv; make clean
make[1]: Entering directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
rm -f *.o *~ core
make[1]: Leaving directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
cd serialdrv; make clean
make[1]: Entering directory `/root/Desktop/modem/Intel-536ep-425/serialdrv'
rm -f *.o *~ core
make[1]: Leaving directory `/root/Desktop/modem/Intel-536ep-425/serialdrv'
rm -f *.o
rm -f *.o
--------------------------------------------------
[root@localhost Intel-536ep-425]# make 536ep
if [ -a /boot/vmlinuz.version.h ]; then \
cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h; fi
cd coredrv; make \
"PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" \
536ep;
make[1]: Entering directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o coredrv.o coredrv.c
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o clmmain.o clmmain.c
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o rts.o rts.c
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o task.o task.c
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o uart.o uart.c
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I../inc -c -o wwh_dflt.o wwh_dflt.c
ld -r coredrv.o clmmain.o rts.o task.o uart.o wwh_dflt.o 536epcore.lib -o 536epcore.o
make[1]: Leaving directory `/root/Desktop/modem/Intel-536ep-425/coredrv'
cp coredrv/536epcore.o .
cd serialdrv; make \
"PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" \
536ep;
make[1]: Entering directory `/root/Desktop/modem/Intel-536ep-425/serialdrv'
cc -DTARGET_SELAH -DTARGET_LINUX -DLINUX -Wall -O -I /lib/modules/`uname -r`/build/include -I ../inc -c -o clmdrvr.o clmdrvr.c
In file included from clmdrvr.c:49:
/lib/modules/2.4.18-3/build/include/linux/malloc.h:4:2: warning: #warning linux/malloc.h is deprecated, use linux/slab.h instead.
clmdrvr.c:263: warning: static declaration for `rs_init' follows non-static
clmdrvr.c: In function `rs_wait_until_sent':
clmdrvr.c:794: structure has no member named `counter'
make[1]: *** [clmdrvr.o] Error 1
make[1]: Leaving directory `/root/Desktop/modem/Intel-536ep-425/serialdrv'
make: *** [536ep] Error 2
-----------------------------------------
[root@localhost Intel-536ep-425]# make install -536ep
make: invalid option -- 5
make: invalid option -- 3
make: invalid option -- 6
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.

Report bugs to <bug-make@gnu.org>.

# Make data base, printed on Fri Jan 10 21:17:21 2003

# Variables
# environment
OLDPWD = /root/Desktop/modem
# environment
BASH_ENV = /root/.bashrc
# environment
KDE_MULTIHEAD = false
# environment
KONSOLE_DCOP = DCOPRef(konsole-1313,konsole)
# environment
HOME = /root
# environment
USERNAME = root
# environment
LESSOPEN = |/usr/bin/lesspipe.sh %s
# environment
MAIL = /var/spool/mail/root
# environment
PWD = /root/Desktop/modem/Intel-536ep-425
# environment
XDM_MANAGED = /var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched
# environment
KONSOLE_DCOP_SESSION = DCOPRef(konsole-1313,session-1)
# environment
GS_LIB = /root/.kde/share/fonts
# environment
_ = /usr/bin/make
# environment
SSH_ASKPASS = /usr/libexec/openssh/gnome-ssh-askpass
# environment
XMODIFIERS = @im=none
# environment
USER = root
# environment
SHELL = /bin/bash
# environment
QTDIR = /usr/lib/qt3-gcc2.96
# environment
HOSTNAME = localhost.localdomain
# environment
TERM = xterm
# environment
LOGNAME = root
# environment
DISPLAY = :0.0
# environment
SHLVL = 3
# environment
LANG = en_US.iso885915
# environment
HISTSIZE = 1000
# environment
INPUTRC = /etc/inputrc
# environment
SESSION_MANAGER = local/localhost.localdomain:/tmp/.ICE-unix/1296
# environment
GTK_RC_FILES = /etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
# environment
COLORTERM =
# default
MAKECMDGOALS := install
# environment
PATH = /usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/root/bin
# environment
LS_COLORS = no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;4 1:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar= 01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.b z2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01 ;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
# 32 variables in 523 hash buckets.
# average of 0.1 variables per bucket, max 2 in one bucket.
# Directories
# No files, no impossibilities in 0 directories.
# Implicit Rules
# No implicit rules.
# Pattern-specific variable values

# No pattern-specific variable values.

# Files

# Not a target:
install:
# Command-line target.
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.

# 1 files in 1007 hash buckets.
# average 0.001 files per bucket, max 1 files in one bucket.

# VPATH Search Paths

# No `vpath' search paths.

# No general (`VPATH' variable) search path.

# Finished Make data base on Fri Jan 10 21:17:21 2003

junks 01-13-2003 02:43 AM

modem is working now


All times are GMT -5. The time now is 10:40 PM.