Skip to contentSkip to conversation

Problem while compiling a module

Linux-ia64 G\351raud Krawezik 3 participants 3 messages Jul 12, 2000

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to make a device driver on an Itanium, and while including <linux/module.h>, with the -DMODULE flag, I get the following problem:

/usr/include/linux/module.h:223: parse error before `UTS_RELEASE'

The line itself is:

static const char __module_kernel_version[]
__attribute__((section(".modinfo"))) =
"kernel_version=" UTS_RELEASE;

Has anybody got a hint to solve this problem? (removing the line is a bad idea as I'm using UTS_RELEASE...)

Geraud

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Geraud" = G\\351raud Krawezik <G> writes:

Geraud> Hi, I'm trying to make a device driver on an Itanium, and Geraud> while including <linux/module.h>, with the -DMODULE flag, I Geraud> get the following problem:

Which kernel version are you compiling against? I don't think any of the released ia64 kernels support modules yet.

Jes

#2 lore raw
In reply to G\351raud Krawezik

I had a similar problem simply compiling the kernel from the latest redhat distro for ia64. The problem was a couple of missing underscores in include/linux/version.h on _module_up -> __module_up and _module_smp -> __module_smp.

My "revised" version is as follows (sorry, I toasted the orig or I'd send diffs, although they'd probably be larger. ;-):

#include <linux/rhconfig.h>
#if defined(__module_up)
#define UTS_RELEASE "2.4.0-0.8"
#endif
#if defined(__module_smp)
#define UTS_RELEASE "2.4.0-0.8smp"
#endif
#define LINUX_VERSION_CODE 132096
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

gerrit

Quoted 26 lines

Hi,

I'm trying to make a device driver on an Itanium, and while including <linux/module.h>, with the -DMODULE flag, I get the following problem:

/usr/include/linux/module.h:223: parse error before `UTS_RELEASE'

The line itself is:

static const char __module_kernel_version[]
__attribute__((section(".modinfo"))) =
"kernel_version=" UTS_RELEASE;

Has anybody got a hint to solve this problem? (removing the line is a bad idea as I'm using UTS_RELEASE...)

Geraud

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64