SourceForge has been redesigned. Learn more.
Close

#558 64-bit build on sparc64/linux fails

build problems
closed-fixed
5
2017-11-12
2010-07-20
No

libsigsegv 2.8 and libffcall are built with "gcc -m64" successfully.
machine: gcc62 (http://gcc.gnu.org/wiki/CompileFarm)
clisp configures and compiles fine, but cannot map memory:

./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -lp ../src/ -x '(and (load "../src/init.lisp") (sys::%saveinitmem) (ext::exit)) (ext::exit t)'
Cannot map memory to address 0x4000000000000 .
[../src/spvw_mmap.d:347] errno = EINVAL: Invalid argument.
./lisp.run: Not enough memory for Lisp.
make: *** [interpreted.mem] Error 1

Discussion

  • Sam Steingold

    Sam Steingold - 2010-07-21

    added -DNO_SINGLEMAP to CFLAGS, now get an infinite loop of these messages:

    Cannot map memory to address 0x333333756000 .
    [../src/spvw_mmap.d:347] errno = EINVAL: Invalid argument.
    Trying to make room through a GC...
    Cannot map memory to address 0x333333756000 .
    [../src/spvw_mmap.d:347] errno = EINVAL: Invalid argument.
    Trying to make room through a GC...

     
  • Sam Steingold

    Sam Steingold - 2010-07-21

    added -DNO_SINGLEMAP -DNO_TRIVIALMAP to the CFLAGS, now get a segfault/stack corruption

    Starting program: /home/sds/clisp/build-Linux-sparc64-O/lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -lp ../src/ -x '(and (load "../src/init.lisp") (sys::%saveinitmem) (ext::exit)) (ext::exit t)'

    Breakpoint 12, prepare_error (errortype=Unhandled dwarf expression opcode 0x0
    ) at ../src/error.d:355
    355 begin_error(); /* start error message */
    (gdb) where
    #0 prepare_error (errortype=Unhandled dwarf expression opcode 0x0
    ) at ../src/error.d:355
    #1 0x03001519 in ?? ()
    #2 0x0300151d in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)

    this happens already in init_lowest_level():

    Breakpoint 18, main (argc=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:3699
    3699 init_lowest_level(argv);
    (gdb) where
    #0 main (argc=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:3699
    (gdb) n
    init_lowest_level (argv=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:2253
    2253 local inline void init_lowest_level (char* argv[]) {
    (gdb) where
    #0 init_lowest_level (argv=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:2253
    #1 0x0013f490 in main (argc=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:3699
    (gdb) n
    init_lowest_level (argv=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:2258
    2258 find_executable(argv[0]);
    (gdb) where
    #0 init_lowest_level (argv=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw.d:2258
    #1 0x00000008 in ?? ()
    #2 0x0000000c in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)

     
  • Sam Steingold

    Sam Steingold - 2010-07-21

    gcc (Debian 4.3.2-1.1) 4.3.2
    Linux deluxe 2.6.26-2-sparc64-smp #1 SMP Tue Mar 9 23:01:40 UTC 2010 sparc64 GNU/Linux

     
  • Sam Steingold

    Sam Steingold - 2010-09-01

    stack corruption happens even without -DNO_SINGLEMAP -DNO_TRIVIALMAP:
    (gdb) where
    #0 mmap_zeromap (map_addr=Unhandled dwarf expression opcode 0x0
    ) at ../src/spvw_mmap.d:339
    #1 0xffffe139 in ?? ()
    #2 0xffffe13d in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)
    (gdb) up
    #1 0xffffe139 in ?? ()
    (gdb)

     
  • Bruno Haible

    Bruno Haible - 2017-11-12
    • status: open --> closed-fixed
     
  • Bruno Haible

    Bruno Haible - 2017-11-12

    The hg tip now contains code that makes sure that clisp calls mmap only on address ranges that are supported by the operating system. With this, the "Cannot map memory to address" errors have disappeared from all platforms except Haiku and Cygwin. In particular, Linux/sparc64 builds work now (tested on 3 different machines).

     

Log in to post a comment.