Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#567 Compiling CLISP 2.48 on ARM EABI

build problems
closed-fixed
Sam Steingold
modules (18)
5
2010-09-28
2010-09-26
zumbi
No

Hello,

While compiling 2.48 on ARM EABI (Debian armel), I got to this bug:

CLISP="/home/zumbi/clisp-2.48/debian/build/clisp -K boot -B /home/zumbi/clisp-2.48/debian/build -N /home/zumbi/clisp-2.48/debian/build/locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc" ; cd syscalls ; /usr/bin/make clisp-module CC="arm-linux-gnueabi-gcc" CPPFLAGS="-I/home/zumbi/clisp-2.48/debian/build/gllib" CFLAGS="-g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -falign-functions=4 -DUNICODE -I." CLFLAGS="" LIBS="/usr/lib/libreadline.so -lncurses -ldl /usr/lib/libavcall.so /usr/lib/libcallback.so -L/usr/lib -lsigsegv" RANLIB="ranlib" CLISP="$CLISP -q" SHREXT=.so
make[2]: Entering directory `/home/zumbi/clisp-2.48/debian/build/syscalls'
arm-linux-gnueabi-gcc -I/home/zumbi/clisp-2.48/debian/build/gllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -falign-functions=4 -DUNICODE -I. -I$(/home/zumbi/clisp-2.48/debian/build/clisp -K boot -B /home/zumbi/clisp-2.48/debian/build -N /home/zumbi/clisp-2.48/debian/build/locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -q -b)/linkkit -c calls.m.c -o calls.o
In file included from /usr/include/sys/procfs.h:34,
from /usr/include/sys/ucontext.h:26,
from /usr/include/signal.h:359,
from /usr/include/sys/wait.h:31,
from calls.c:46:
/usr/include/sys/user.h:31: error: expected identifier or ‘(’ before ‘void’
/usr/include/sys/user.h:32: error: expected ‘;’ before ‘unsigned’
make[2]: *** [calls.o] Error 1
make[2]: Leaving directory `/home/zumbi/clisp-2.48/debian/build/syscalls'
make[1]: *** [syscalls] Error 2
make[1]: Leaving directory `/home/zumbi/clisp-2.48/debian/build'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Config.log
It was created by GNU CLISP configure 2.48 (2009-07-28), which was
generated by GNU Autoconf 2.63. Invocation command line was

$ configure --srcdir=/home/zumbi/clisp-2.48/src --disable-option-checking --prefix=/usr --without-dynamic-ffi --build=arm-linux-gnueabi --cache-file=config.cache

## --------- ##
## Platform. ##
## --------- ##

hostname = abel
uname -m = armv5tel
uname -r = 2.6.32
uname -s = Linux
uname -v = #2 Wed Sep 22 17:47:11 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/games

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2293: creating cache config.cache
configure:2463: checking for a BSD-compatible install
configure:2531: result: /usr/bin/install -c
configure:2542: checking whether build environment is sane
configure:2602: result: yes
configure:2743: checking for a thread-safe mkdir -p
configure:2782: result: /bin/mkdir -p
configure:2795: checking for gawk
configure:2825: result: no
configure:2795: checking for mawk
configure:2811: found /usr/bin/mawk
configure:2822: result: mawk
configure:2833: checking whether make sets $(MAKE)
configure:2855: result: yes
configure:2984: ** check for host type
configure:2992: checking build system type

Config.log unders syscalls directory:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by syscalls configure 1.0, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure --cache-file=../config.cache --srcdir=/home/zumbi/clisp-2.48/modules/syscalls --disable-option-checking --with-readline --with-gettext --build=arm-linu
x-gnueabi

## --------- ##
## Platform. ##
## --------- ##

hostname = abel
uname -m = armv5tel
uname -r = 2.6.32
uname -s = Linux
uname -v = #2 Wed Sep 22 17:47:11 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/games

## ----------- ##
## Core tests. ##
## ----------- ##

configure:1685: loading cache ../config.cache
configure:1838: ** System Calls (Common)
configure:1919: checking for gcc
configure:1946: result: arm-linux-gnueabi-gcc
configure:2178: checking for C compiler version
configure:2186: arm-linux-gnueabi-gcc --version >&5
arm-linux-gnueabi-gcc (Debian 4.4.4-15) 4.4.5 20100913 (prerelease)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Best regards

Discussion

  • Sam Steingold
    Sam Steingold
    2010-09-27

    could you please take a look at this syscam include file:
    /usr/include/sys/user.h:31: error: expected identifier or ‘(’ before ‘void’
    /usr/include/sys/user.h:32: error: expected ‘;’ before ‘unsigned’
    why is this happening?
    thanks!

     
  • Sam Steingold
    Sam Steingold
    2010-09-27

    • labels: 100543 --> modules
     
  • zumbi
    zumbi
    2010-09-27

    Hello,

    I looked into this include file, but nothing obvious to me at a first glance:

    $ cat /usr/include/sys/user.h
    /* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.

    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA. */

    #ifndef _SYS_USER_H
    #define _SYS_USER_H 1

    /* The whole purpose of this file is for GDB and GDB only. Don't read
    too much into it. Don't use it for anything other than GDB unless
    you know what you are doing. */

    struct user_fpregs
    {
    struct fp_reg
    {
    unsigned int sign1:1;
    unsigned int unused:15;
    unsigned int sign2:1;
    unsigned int exponent:14;
    unsigned int j:1;
    unsigned int mantissa1:31;
    unsigned int mantissa0:32;
    } fpregs[8];
    unsigned int fpsr:32;
    unsigned int fpcr:32;
    unsigned char ftype[8];
    unsigned int init_flag;
    };

    struct user_regs
    {
    unsigned long int uregs[18];
    };

    struct user
    {
    struct user_regs regs; /* General registers */
    int u_fpvalid; /* True if math co-processor being used. */

    unsigned long int u_tsize; /* Text segment size (pages). */
    unsigned long int u_dsize; /* Data segment size (pages). */
    unsigned long int u_ssize; /* Stack segment size (pages). */

    unsigned long start_code; /* Starting virtual address of text. */
    unsigned long start_stack; /* Starting virtual address of stack. */

    long int signal; /* Signal that caused the core dump. */
    int reserved; /* No longer used */
    struct user_regs *u_ar0; /* help gdb to find the general registers. */

    unsigned long magic; /* uniquely identify a core file */
    char u_comm[32]; /* User command that was responsible */
    int u_debugreg[8];
    struct user_fpregs u_fp; /* Floating point registers */
    struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */
    };

    #endif /* sys/user.h */

    Best regards,
    -- Hector

     
  • zumbi
    zumbi
    2010-09-27

    Lines 31-32:
    unsigned int unused:15;
    unsigned int sign2:1;

    PS.- I might be focusing on 2.49, rather that dig into this one, first.

     
  • Sam Steingold
    Sam Steingold
    2010-09-28

    this patch should fix the problem:

    --- calls.c.~1.314.~ 2010-09-21 12:14:58.000000000 -0400
    +++ calls.c 2010-09-28 10:59:50.000631000 -0400
    @@ -43,6 +43,7 @@
    # include <sys/resource.h>
    #endif
    #if defined(HAVE_SYS_WAIT_H)
    +# undef unused
    # include <sys/wait.h> /* always present on unix, but not elsewhere */
    #endif
    #if defined(HAVE_SYS_STATVFS_H)

     
  • zumbi
    zumbi
    2010-09-28

    Thank you very much! Yes, that patch fixes the issue and it builds properly.

     
  • Sam Steingold
    Sam Steingold
    2010-09-28

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold
    Sam Steingold
    2010-09-28

    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     
  • Sam Steingold
    Sam Steingold
    2010-09-28

    actually, this bug has already been fixed on 2009-11-12:
    * lispbibl.d (unused): do not export to clisp.h, it is never used
    in any module and causes trouble on some platforms