Bug 76569
Summary: | incompilable with cc -D__KERNEL__ -DMODULE with module.h | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <martin_wpm> |
Component: | glibc-kernheaders | Assignee: | Arjan van de Ven <arjanv> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-10-23 15:26:27 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Need Real Name
2002-10-23 15:26:20 UTC
INCLUDEDIR = /usr/include that is wrong you are trying to compile a kernel modules without using kernel headers but by using glibc headers! the kernel headers are in /lib/modules/`uname -r`/build/include *** Bug 76571 has been marked as a duplicate of this bug. *** Redhat 7.3 lib for kernel seems not compatible with its 7.0/7.1 version. What changes has the redhat liunx 7.3 made for the lib from 7.0/7.1? At the end of this comment attached are copies of new returned message from your suggested header and lib on my machine, its makefile "makefile1". The author of <<Practical Linux Programming>>, ASHFAQ A. KHAH, told me that he success testing these programs on Redhat 7.0/7.1 without using a bugfix patch. His email:akhan; his email to me: " The code was tested with Red Hat 7.0 and 7.1. The user is trying to compile the code for RedHat Version 7.3. I need to install 7.3 and test it again. It may take some time. Sincerely, Ash " =============New returned message and makefile1================== 1. makefile1: #INCLUDEDIR = /usr/include #INCLUDEDIR = /lib/modules/'uname -r'/include INCLUDEDIR = /usr/src/linux-2.4.18-3/include DEBFLAGS = -O2 CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS) CFLAGS += -I$(INCLUDEDIR) OBJS = pport.o all: $(OBJS) 2. new returned message: [root@mdoggy refbkplp:363]# make -f makefile1 cc -D__KERNEL__ -DMODULE -Wall -02 -I/usr/src/linux-2.4.18-3/include -c -o pport.o pport.c cc: unrecognized option `-02' pport.c:6: `null' undeclared here (not in a function) pport.c:6: initializer element is not constant pport.c:6: (near initialization for `fops.owner') pport.c:7: `null' undeclared here (not in a function) pport.c:7: initializer element is not constant pport.c:7: (near initialization for `fops.llseek') pport.c:8: `null' undeclared here (not in a function) pport.c:8: initializer element is not constant pport.c:8: (near initialization for `fops.read') pport.c:9: `null' undeclared here (not in a function) pport.c:9: initializer element is not constant pport.c:9: (near initialization for `fops.write') pport.c:10: `null' undeclared here (not in a function) pport.c:10: initializer element is not constant pport.c:10: (near initialization for `fops.readdir') pport.c:11: `null' undeclared here (not in a function) pport.c:11: initializer element is not constant pport.c:11: (near initialization for `fops.poll') pport.c:12: `null' undeclared here (not in a function) pport.c:12: initializer element is not constant pport.c:12: (near initialization for `fops.ioctl') pport.c:13: `null' undeclared here (not in a function) pport.c:13: initializer element is not constant pport.c:13: (near initialization for `fops.mmap') pport.c:14: `null' undeclared here (not in a function) pport.c:14: initializer element is not constant pport.c:14: (near initialization for `fops.open') pport.c:15: `null' undeclared here (not in a function) pport.c:15: initializer element is not constant pport.c:15: (near initialization for `fops.flush') pport.c:16: `null' undeclared here (not in a function) pport.c:16: initializer element is not constant pport.c:16: (near initialization for `fops.release') pport.c:17: `null' undeclared here (not in a function) pport.c:17: initializer element is not constant pport.c:17: (near initialization for `fops.fsync') pport.c:18: `null' undeclared here (not in a function) pport.c:18: initializer element is not constant pport.c:18: (near initialization for `fops.fasync') pport.c:19: `null' undeclared here (not in a function) pport.c:19: initializer element is not constant pport.c:19: (near initialization for `fops.lock') pport.c:20: `null' undeclared here (not in a function) pport.c:20: initializer element is not constant pport.c:20: (near initialization for `fops.readv') make: *** [pport.o] Error 1 [root@mdoggy refbkplp:364]# ls Makefile makefile2 mkf0 pport.c [root@mdoggy refbkplp:365]# #ifndef __KERNEL__ # define __KERNEL__ #endif #ifndef MODULE # define MODULE #endif is bullshit btw and not needed at all also -O2 is dash oh two (eg the letter O not the number zero) and null is spelled NULL with capitals Great! now it's OK! Thank you very much. |