Menu

#34 Compilation error

open
nobody
None
5
2014-08-18
2002-01-04
No

I just downloaded orp20011116.tgz and got a compilation
error.
Here is the relevant compilation log:

g++ -c -w -g -O0 -D_DEBUG -DORP_STATS -DSIGNAL_DEBUG
-DORP_POSIX -D_REENTRANT -D__SMP__ -DMONITOR_STO
-DGC_REWORK -I../../../arch/ia32/base
-I../../../os/Linux/include -I../../../common/include
-I../../../common/jit_utils/include
-I../../../interface -I../../../base_natives/common
-I../../../arch/ia32/ia32_o1_jit
-I../../../arch/ia32/dump
-I../../../arch/ia32/debugger/include
root_set_enum_ia32.cpp -o
Linux/dbg/root_set_enum_ia32.o
In file included from root_set_enum_ia32.cpp:39:
/usr/include/asm/spinlock.h: In function `void
read_lock(rwlock_t *)':
/usr/include/asm/spinlock.h:157: parse error before
`::'
/usr/include/asm/spinlock.h:158: confused by earlier
errors, bailing out
make[2]: *** [Linux/dbg/root_set_enum_ia32.o] Error 1
make[2]: Leaving directory
`/usr/local/src/orp/arch/ia32/base'
make[1]: *** [../../arch/ia32/base/Linux/dbg/libvm.a]
Error 2
make[1]: Leaving directory
`/usr/local/src/orp/mains/orp'
make: *** [dbg] Error 2

Here is a short description of my system:
Linux 2.4.14 (Debian)
glibc: 2.2.4
g++ version 2.95.4

I see that the file is included inside conditionals:
#ifdef ORP_POSIX
#ifdef __linux__
#include <asm/spinlock.h>
#endif
#include "platform2.h"
#endif

I have unfortunately no knowledge about asm
instructions in C (the parse error occurs inside one).
So I attach a tar file with the two asm/*.h include
files that seem to provoke the problem.

Discussion

  • Daniel Bonniot

    Daniel Bonniot - 2002-01-04

    /usr/include/asm/rwlock.h and /usr/include/asm/spinlock.h

     
  • Abc Def

    Abc Def - 2002-05-08

    Logged In: YES
    user_id=1832

    It can be solved by putting space between colons (both in
    ORP sources and kernel sources) ie. instead '::' it should
    be ': :'.

    I don't know how kernel can be compileable with this but I'm
    far from being an expert here.

     
  • Barry Rountree

    Barry Rountree - 2002-11-05

    Logged In: YES
    user_id=534369

    Could you expound on this a bit? With gcc 3.2, I get

    In file included from simple_root_set_enum_ia32.cpp:22:
    /usr/include/asm/spinlock.h: In function `void
    spin_lock(spinlock_t*)':
    /usr/include/asm/spinlock.h:137: parse error before `(' token
    /usr/include/asm/spinlock.h: In function `void
    read_lock(rwlock_t*)':
    /usr/include/asm/spinlock.h:188: parse error before `(' token
    /usr/include/asm/spinlock.h: In function `void
    write_lock(rwlock_t*)':
    /usr/include/asm/spinlock.h:197: parse error before `(' token

    3.0.2 gets almost this far, bailing out with the "confused
    by earlier errors" message after the second error.

    Kernel is 2.4.19-16mdk+acpi.

    spin_lock looks like:

    static inline void spin_lock(spinlock_t *lock)
    {
    #if SPINLOCK_DEBUG
    __label__ here;
    here:
    if (lock->magic != SPINLOCK_MAGIC) {
    printk("eip: %p\n", &&here);
    BUG();
    }
    #endif
    __asm__ __volatile__(
    spin_lock_string
    :"=m" (lock->lock) : : "memory");
    }

    At this point, I'm going to try a previous version of ORP
    and see if I can find where the problem was introduced.

    Other ideas?

    Best,

    Barry Rountree

     
  • Barry Rountree

    Barry Rountree - 2002-11-06

    Logged In: YES
    user_id=534369

    Commenting out

    #include <asm/spinlock.h>

    gets rid of the compile error. No idea if this breaks
    anything else or not.

    Barry

     

Log in to post a comment.

MongoDB Logo MongoDB