[OpenAFS] Compiling afs module on sparc64

Gunnar Krull gklists@cs.uni-goettingen.de
Wed, 8 Nov 2006 14:00:48 +0100


On Tuesday 07 November 2006 22:57, Russ Allbery wrote:
> Yup, that's because it's not GPL (it's released under the IBM Public
> License).
>
> However, normally it will build anyway.  It sounds like there's some sort
> of additional restriction on sparc64 that's not present on x86 or amd64
> (at least) in the kernel.

With x86 I don't have any problems to compile it. I've tested it with the same 
kernel source and the same afs source.

This is the function that creates the error message. From Debian kernel-source 
linux-source-2.6.18_2.6.18-4_all.deb, file scripts/mod/modpost.c

static void check_for_gpl_usage(enum export exp, const char *m, const char *s)
{
        const char *e = is_vmlinux(m) ?"":".ko";

        switch (exp) {
        case export_gpl:
                fatal("modpost: GPL-incompatible module %s%s "
                      "uses GPL-only symbol '%s'\n", m, e, s);
                break;
        case export_unused_gpl:
                fatal("modpost: GPL-incompatible module %s%s "
                      "uses GPL-only symbol marked UNUSED '%s'\n", m, e, s);
                break;
        case export_gpl_future:
                warn("modpost: GPL-incompatible module %s%s "
                      "uses future GPL-only symbol '%s'\n", m, e, s);
                break;
        case export_plain:
        case export_unused:
        case export_unknown:
                /* ignore */
                break;
        }
}


Why does the compile run on a sparc64 stop here? The error comes from the 
first case "export_gpl" and ends in a fatal message. 
What/where may be the reason of the differtent behavior between x86 and 
sparc64?


I also found this in the OpenAFS 1.5.10 config.log:

configure:12338: checking for exported sys_open
configure:12369: make -C $LINUX_KERNEL_PATH M=`pwd`/conftest.dir modules 
> /dev/null
FATAL: modpost: GPL-incompatible module conftest.ko uses GPL-only 
symbol 'sys_open'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2


The configure script ignored this error and finished correctly.

Gunnar.