3

On Fedora 20, I need to install a linux driver for a particular PCI express serial port card which is given by the manufaturer. In order to do this, I have to compile the source code of the driver. When I issue the "make" command in the source code directory, I get the following error:

[root@localhost driver]# make
make[1]: Entering directory `/usr/src/kernels/3.16.6-203.fc20.i686+PAE'
Makefile:649: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make[1]: *** No rule to make target `Tech'.  Stop.
make[1]: Leaving directory `/usr/src/kernels/3.16.6-203.fc20.i686+PAE'
make: *** [modules] Error 2

The "Makefile" file is the following:

# Comment/uncomment the following line to enable/disable debugging
DEBUG = y 

KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
PWD       := $(shell pwd)

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DSCULLV_DEBUG -DDEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif

EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) -DLINUX

TARGET = cti_serial_core

get_variable = $(strip $(shell grep "^[[:space:]]*$(1)[[:space:]]*=\{1\}[[:space:]]*" $(2) | cut -d= -f2))

# NOTE: In the call there can be *no* whitespace after the comma
VERSION := $(call get_variable,VERSION,$(KERNEL_DIR)/Makefile)
PATCHLEVEL := $(call get_variable,PATCHLEVEL,$(KERNEL_DIR)/Makefile)
SUBLEVEL := $(call get_variable,SUBLEVEL,$(KERNEL_DIR)/Makefile)
EXTRAVERSION := $(call get_variable,EXTRAVERSION,$(KERNEL_DIR)/Makefile)
LOCALVERSION := $(call get_variable,LOCALVERSION,$(KERNEL_DIR)/.config)
KERNELRELEASE := $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)

ifneq ($(KERNELRELEASE),)

  cti_serial_core-objs :=  serial_core.o 8250_core.o 
  cti_8250_pci-objs :=  8250_pci.o 

  obj-m := cti_serial_core.o 
  obj-m += cti_8250_pci.o 

else

  KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
  PWD       := $(shell pwd)

endif

all: modules

install: modules_install

#DEPMOD : = depmod

modules modules_install clean::
    @$(MAKE) -C $(KERNEL_DIR) M=$(PWD) $@

The Linux kernel version is :

[root@localhost driver]# uname -r
3.16.6-203.fc20.i686+PAE

And the gcc compiler version is:

[root@localhost driver]# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.8.3/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-i686-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-i686-redhat-linux/cloog-install --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC) 

How do I fix this so I can compile this driver ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.