[Prism54-devel] [Bug 38] New: compile errors on Alpha platform

bugzilla-daemon@mcgrof.com bugzilla-daemon@mcgrof.com
Mon, 26 Jan 2004 23:41:47 +0000 (UTC)


http://prism54.org/cgi-bin/bugzilla/show_bug.cgi?id=38

           Summary: compile errors on Alpha platform
           Product: prim54
           Version: 1.0.2.2
          Platform: alpha
        OS/Version: Linux 2.4
            Status: ASSIGNED
          Severity: normal
          Priority: P2
         Component: Device Driver
        AssignedTo: prism54-devel@prism54.org
        ReportedBy: john-and-kathy@shaw.ca


Building cvs snapshot from 2004 01 13 on Alpha platform fails with
messages below (they are fatal on a 64-bit platform).  This is on 2.4.24
kernel from kernel.org.  Using HP (Redhat 7.2) platform, gcc is version 2.96.

The interesting ones are islpci_mgt.c because they use (u32) pointers.  The
rest are alignment calculations as far as I can tell.

The bugs regarding unistd/waitpid and unistd/close can be fixed by moving
the include for linux/unistd.h down below the include asm/uaccess.h.  Whether
this is in fact good practise is another matter; I do not know.

The bugs for warning: cast to pointer from integer might be fixed by a "better"
choice of type for the variables "source" and "destination" in routine
islpci_mgt_queue (not u32 but something more platform-dependant like u_long 
might be better).  I haven't tried it yet myself; counting "u32" in the source 
is a little daunting.


See de4x5.c for example of an Alpha-capable driver.

Here is the output of the make:

 prism54-cvs20040113]$ make KDIR=/k/linux-2.4.24 clean modules
make -C ksrc/ clean
make[1]: Entering directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'
make -C ksrc/ modules
make[1]: Entering directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'
make -C /k/linux-2.4.24 SUBDIRS=/home/jal/sw/prism54/prism54-cvs20040113/ksrc 
V=1 modules
make[2]: Entering directory `/k/linux-2.4.24'
make -C  /home/jal/sw/prism54/prism54-cvs20040113/ksrc CFLAGS="-D__KERNEL__ -
I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-
strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-fp-regs -ffixed-8 -
mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h" MAKING_MODULES=1 modules
make[3]: Entering directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=isl_38xx  -c -o isl_38xx.o isl_38xx.c
In file included from /k/linux-2.4.24/include/linux/unistd.h:9,
                 from isl_38xx.c:25:
/k/linux-2.4.24/include/asm/unistd.h: In function `close':
/k/linux-2.4.24/include/asm/unistd.h:543: warning: implicit declaration of 
function `sys_close_Rdcb0349b'
/k/linux-2.4.24/include/asm/unistd.h: In function `waitpid':
/k/linux-2.4.24/include/asm/unistd.h:594: warning: implicit declaration of 
function `sys_wait4_R9b622307'
In file included from /k/linux-2.4.24/include/linux/capability.h:17,
                 from /k/linux-2.4.24/include/linux/binfmts.h:5,
                 from /k/linux-2.4.24/include/linux/sched.h:9,
                 from /k/linux-2.4.24/include/asm/uaccess.h:5,
                 from isl_38xx.c:31:
/k/linux-2.4.24/include/linux/fs.h: At top level:
/k/linux-2.4.24/include/linux/fs.h:1089: warning: type mismatch with previous 
implicit declaration
/k/linux-2.4.24/include/asm/unistd.h:543: warning: previous implicit 
declaration of `sys_close_Rdcb0349b'
/k/linux-2.4.24/include/linux/fs.h:1089: warning: `sys_close_Rdcb0349b' was 
previously implicitly declared to return `int'
In file included from /k/linux-2.4.24/include/asm/uaccess.h:5,
                 from isl_38xx.c:31:
/k/linux-2.4.24/include/linux/sched.h:613: warning: type mismatch with previous 
implicit declaration
/k/linux-2.4.24/include/asm/unistd.h:594: warning: previous implicit 
declaration of `sys_wait4_R9b622307'
/k/linux-2.4.24/include/linux/sched.h:613: warning: `sys_wait4_R9b622307' was 
previously implicitly declared to return `int'
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=islpci_dev  -c -o islpci_dev.o islpci_dev.c
islpci_dev.c: In function `islpci_alloc_memory':
islpci_dev.c:526: warning: cast from pointer to integer of different size
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=islpci_eth  -c -o islpci_eth.o islpci_eth.c
islpci_eth.c: In function `islpci_eth_transmit':
islpci_eth.c:158: warning: cast from pointer to integer of different size
islpci_eth.c:160: warning: cast from pointer to integer of different size
islpci_eth.c:173: warning: cast from pointer to integer of different size
islpci_eth.c:193: warning: cast from pointer to integer of different size
islpci_eth.c: In function `islpci_eth_receive':
islpci_eth.c:336: warning: cast from pointer to integer of different size
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=islpci_mgt  -c -o islpci_mgt.o islpci_mgt.c
islpci_mgt.c: In function `islpci_mgt_queue':
islpci_mgt.c:469: warning: cast from pointer to integer of different size
islpci_mgt.c:498: warning: cast to pointer from integer of different size
islpci_mgt.c:508: warning: cast to pointer from integer of different size
islpci_mgt.c:526: warning: cast to pointer from integer of different size
islpci_mgt.c:526: warning: cast to pointer from integer of different size
islpci_mgt.c: In function `islpci_mgt_receive':
islpci_mgt.c:587: warning: cast to pointer from integer of different size
islpci_mgt.c:597: warning: cast to pointer from integer of different size
islpci_mgt.c: In function `islpci_mgt_response':
islpci_mgt.c:774: warning: cast to pointer from integer of different size
islpci_mgt.c: In function `islpci_parse_trap':
islpci_mgt.c:1039: warning: cast to pointer from integer of different size
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=islpci_hotplug  -c -o islpci_hotplug.o islpci_hotplug.c
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=isl_ioctl  -c -o isl_ioctl.o isl_ioctl.c
isl_ioctl.c:1230: warning: `prism54_set_rate' defined but not used
gcc -D__KERNEL__ -I/k/linux-2.4.24/include -Wall -Wstrict-prototypes -Wno-
trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-
fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6 -DMODULE -DMODVERSIONS -include /k/linux-
2.4.24/include/linux/modversions.h  -nostdinc -iwithprefix include -
DKBUILD_BASENAME=isl_wds  -c -o isl_wds.o isl_wds.c
rm -f prism54.o
ld  -r -o prism54.o isl_38xx.o islpci_dev.o islpci_eth.o islpci_mgt.o 
islpci_hotplug.o isl_ioctl.o isl_wds.o
make[3]: Leaving directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'
make[2]: Leaving directory `/k/linux-2.4.24'
make[1]: Leaving directory `/home/jal/sw/prism54/prism54-cvs20040113/ksrc'

------- Additional Comments From Jens.Maurer@gmx.net  2004-01-26 23:41 -------
Thank you for your detailed bug report.

The <linux/unistd.h> appears not to be required/used.  I've removed it in the
current CVS.  The warnings from islpci_eth.c should be gone in recent CVS.
The warnings from islpci_mgt.c will be removed by the CVS mgmt_rework branch.
(This branch doesn't have the other fixes, though).

Please try again, and tell me if there are less errors.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.