Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12
I have a similar problem but I'm using Fedora Core 8 and I'm trying to compile the drivers for a Promise TX4310 raid card. I'm running 2.6.23.9-85.fc8. When I'm trying ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Aug 2006
    Posts
    2

    I have a similar problem but I'm using Fedora Core 8 and I'm trying to compile the drivers for a Promise TX4310 raid card. I'm running 2.6.23.9-85.fc8.

    When I'm trying to compile, one of the error I get is the "error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)" error. Here is the full output from make :

    Code:
    [root@serveur fasttrak-tx4310-linux-partial-sourcev2.6.1.0321]# make
    /bin/sh: line 0: [: -lt: unary operator expected
    kernel version:  
    make  CFLAG="-O2 -DASIC_OEM -DOCTOPUSII -O2 -fomit-frame-pointer -D_LINUXDRIVER -D__KERNEL__ -DMODULE -D__linux__ -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common -Wno-unused -pipe -DASIC_OEM -D_X8632B -D_32BPLATFORM -I/lib/modules/2.6.23.9-85.fc8/build/include -I/lib/modules/2.6.23.9-85.fc8/build/include/scsi -I/lib/modules/2.6.23.9-85.fc8/build/drivers/scsi -D__SMP__ -march=i686 -mpreferred-stack-boundary=4  " -C linux
    make[1]: Entering directory `/root/fasttrak-tx4310-linux-partial-sourcev2.6.1.0321/linux'
    gcc  -O2 -DASIC_OEM -DOCTOPUSII -O2 -fomit-frame-pointer -D_LINUXDRIVER -D__KERNEL__ -DMODULE -D__linux__ -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common -Wno-unused -pipe -DASIC_OEM -D_X8632B -D_32BPLATFORM -I/lib/modules/2.6.23.9-85.fc8/build/include -I/lib/modules/2.6.23.9-85.fc8/build/include/scsi -I/lib/modules/2.6.23.9-85.fc8/build/drivers/scsi -D__SMP__ -march=i686 -mpreferred-stack-boundary=4   -I. -I../include -c osd_main.c 
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/thread_info.h:16,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/thread_info.h:21,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/preempt.h:9,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/spinlock.h:49,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/vmalloc.h:4,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h:49,
                     from osd_inc.h:8,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:83: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:83: error: requested alignment is not a constant
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h: In function ‘cpuid_count’:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:617: warning: pointer targets in passing argument 1 of ‘native_cpuid’ differ in signedness
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:617: warning: pointer targets in passing argument 2 of ‘native_cpuid’ differ in signedness
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:617: warning: pointer targets in passing argument 3 of ‘native_cpuid’ differ in signedness
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/processor.h:617: warning: pointer targets in passing argument 4 of ‘native_cpuid’ differ in signedness
    In file included from osd_inc.h:8,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h: In function ‘virt_to_phys’:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h:77: error: ‘CONFIG_PAGE_OFFSET’ undeclared (first use in this function)
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h:77: error: (Each undeclared identifier is reported only once
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h:77: error: for each function it appears in.)
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h: In function ‘phys_to_virt’:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/io.h:95: error: ‘CONFIG_PAGE_OFFSET’ undeclared (first use in this function)
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/linux/sched.h:54,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/irq.h:13,
                     from osd_inc.h:10,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:33:3: error: #error You lose.
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/jiffies.h:219:31: error: division by zero in #if
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/irq.h:13,
                     from osd_inc.h:10,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/sched.h: In function ‘dequeue_signal_lock’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/sched.h:1519: warning: implicit declaration of function ‘local_irq_save’
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/sched.h:1521: warning: implicit declaration of function ‘local_irq_restore’
    In file included from osd_inc.h:10,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/irq.h:15:25: error: irq_vectors.h: No such file or directory
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/hardirq.h:5,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/hardirq.h:7,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:11,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:23,
                     from osd_inc.h:28,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/irq.h: At top level:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/irq.h:180: error: ‘NR_IRQS’ undeclared here (not in a function)
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/linux/hardirq.h:7,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:11,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:23,
                     from osd_inc.h:28,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/hardirq.h:12: error: requested alignment is not a constant
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:23,
                     from osd_inc.h:28,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h: In function ‘cli’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:221: warning: implicit declaration of function ‘local_irq_disable’
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h: In function ‘sti’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:225: warning: implicit declaration of function ‘local_irq_enable’
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h: In function ‘save_flags’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:229: warning: implicit declaration of function ‘local_save_flags’
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/tlbflush.h:4,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:26,
                     from osd_inc.h:28,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h: In function ‘virt_to_head_page’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h:318: warning: implicit declaration of function ‘__pfn_to_page’
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h:318: error: ‘CONFIG_PAGE_OFFSET’ undeclared (first use in this function)
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h:318: warning: initialization makes pointer from integer without a cast
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/asm/tlbflush.h:4,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:26,
                     from osd_inc.h:28,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h: In function ‘lowmem_page_address’:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h:587: warning: implicit declaration of function ‘__page_to_pfn’
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/mm.h:587: error: ‘CONFIG_PAGE_OFFSET’ undeclared (first use in this function)
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/linux/module.h:20,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/device.h:21,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/pci.h:52,
                     from osd_inc.h:34,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/module.h:69:2: error: #error unknown processor family
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/linux/pagemap.h:10,
                     from /lib/modules/2.6.23.9-85.fc8/build/include/linux/blkdev.h:10,
                     from osd_inc.h:42,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/highmem.h: At top level:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/highmem.h:40: error: static declaration of ‘kmap’ follows non-static declaration
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:69: error: previous declaration of ‘kmap’ was here
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/highmem.h:50: error: static declaration of ‘kmap_atomic’ follows non-static declaration
    /lib/modules/2.6.23.9-85.fc8/build/include/asm/highmem.h:72: error: previous declaration of ‘kmap_atomic’ was here
    In file included from /lib/modules/2.6.23.9-85.fc8/build/include/linux/blkdev.h:17,
                     from osd_inc.h:42,
                     from osd_main.c:333:
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/bsg.h:67: warning: ‘struct request_queue’ declared inside parameter list
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/bsg.h:67: warning: its scope is only this definition or declaration, which is probably not what you want
    /lib/modules/2.6.23.9-85.fc8/build/include/linux/bsg.h:71: warning: ‘struct request_queue’ declared inside parameter list
    In file included from osd_inc.h:94,
                     from osd_main.c:333:
    osd_timer.h:21: warning: type qualifiers ignored on function return type
    osd_timer.h:37: warning: type qualifiers ignored on function return type
    osd_main.c: In function ‘wrap_P2V’:
    osd_main.c:391: warning: passing argument 1 of ‘phys_to_virt’ makes integer from pointer without a cast
    osd_main.c: In function ‘prepare_sg_table’:
    osd_main.c:868: error: ‘CONFIG_PAGE_OFFSET’ undeclared (first use in this function)
    osd_main.c:868: warning: passing argument 2 of ‘pci_map_page’ makes pointer from integer without a cast
    osd_main.c: In function ‘fasttrak_queue’:
    osd_main.c:1005: error: ‘Scsi_Cmnd’ has no member named ‘buffer’
    osd_main.c: In function ‘fasttrak_probe’:
    osd_main.c:1744: warning: ‘deprecated_irq_flag’ is deprecated (declared at /lib/modules/2.6.23.9-85.fc8/build/include/linux/interrupt.h:64)
    make[1]: *** [osd_main.o] Error 1
    make[1]: Leaving directory `/root/fasttrak-tx4310-linux-partial-sourcev2.6.1.0321/linux'
    make: *** [linux/ft.o] Error 2
    It's probably not the include syntax because the code I'm trying to compile is commercial code that should not have bugs in it .. ?


    The kernel I'm running is the rpm version. I don't need to compile it myself to be able to compile my module right?

    Thanks a bunch!

  2. #12
    Just Joined!
    Join Date
    Feb 2008
    Location
    Bucharest
    Posts
    5
    I have the same problem but I managed to get the example compile by changing the makefile contents to:

    Code:
    obj-m += helloworld.o
    
    build:
    	make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) modules
    
    clean:
    	make -C /lib/modules/$(shell uname -r)/build M=$(CURDIR) clean
    Don't know why it works.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •