[OpenAFS-devel] Rebuilding 1.4.1 on x86_64 fails

Derek Atkins warlord@MIT.EDU
Mon, 24 Apr 2006 14:03:05 -0400


Interesting.  The code in question is:

#ifdef AFS_LINUX26_ENV
    (unsigned long)scsi_command_size,
    (unsigned long)scsi_command_size,
    0x3ffff,
    0x30000,
#else
    0, 0, 0, 0
#endif

    /* number and list of unimplemented system calls */
    ((sizeof(ia32_zapped_syscalls)/sizeof(ia32_zapped_syscalls[0])) - 1),
    ia32_zapped_syscalls,

where line 651 is the line that begins: ((sizeof...

The problem here is the lack of a comma after "0, 0, 0, 0" in that
ifdef.

I never noticed this because this whole code block is inside an
#if defined(AFS_AMD64_LINUX20_ENV) block, and I don't have an AMD64.

If you add a comma to that list of 0,0,0,0 it should fix this problem.

-derek

Ulrich Seidl <Ulrich.Seidl@muneda.com> writes:

> While trying to rebuild openafs 1.4.1 from the provided source rpm 
> package (openafs-1.4.1-rhel3.3.src.rpm) on a x86_64 Scientific Linux SL 
> release 3.0.5 (RedHat ES 3.0 compatible), I encoutered the following 
> problem:
>
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:651: 
> called object is not a function
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:651: 
> initializer element is not constant
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:651: 
> (near initialization for `ia32_probe.alt_try_length')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:652: 
> warning: initialization makes integer from pointer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:652: 
> initializer element is not computable at load time
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:652: 
> (near initialization for `ia32_probe.n_zapped_syscalls')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:655: 
> warning: initialization makes pointer from integer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:656: 
> warning: initialization makes integer from pointer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:656: 
> initializer element is not computable at load time
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:656: 
> (near initialization for `ia32_probe.n_unique_syscalls')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:659: 
> warning: initialization makes pointer from integer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:659: 
> warning: initialization makes integer from pointer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:659: 
> initializer element is not computable at load time
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:659: 
> (near initialization for `ia32_probe.verifyNR')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:662: 
> warning: braces around scalar initializer
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:662: 
> warning: (near initialization for `ia32_probe.verify_fn')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:663: 
> warning: initialization makes pointer from integer without a cast
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:664: 
> warning: excess elements in scalar initializer
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:664: 
> warning: (near initialization for `ia32_probe.verify_fn')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:665: 
> warning: excess elements in scalar initializer
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:665: 
> warning: (near initialization for `ia32_probe.verify_fn')
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:666: 
> warning: excess elements in scalar initializer
> /usr/local.rw/rpm/BUILD/openafs-1.4.1/src/afs/LINUX/osi_probe.c:666: 
> warning: (near initialization for `ia32_probe.verify_fn')
>
> Any ideas?
>
> Ulrich
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available