Menu

#152 doesn not compile on x86_64-unknown-linux-gnu

Core Dump
closed
nobody
Compiler (23)
5
2014-08-05
2006-09-23
No

I tried to compile XSB on an x86_64 Linux Box (SuSE
10.1) but it was not successful. The compilation
stopped with a segmentation fault. Here is the complete
output which contains some warnings (-> possible
reasons for the compilation error):

./makexsb

make -f
/home/timo/download/XSB/config/x86_64-unknown-linux-gnu/topMakefile
devel

make[1]: Entering directory `/home/timo/download/XSB/emu'
make[1]: Leaving directory `/home/timo/download/XSB/emu'
make[1]: Entering directory `/home/timo/download/XSB/emu'

Compiling XSB with gcc using -O3 -fno-strict-aliasing
-Wall -pipe

[gcc] main_xsb.c
[gcc] auxlry.c
[gcc] biassert.c
[gcc] builtin.c using -O3 -fno-strict-aliasing
-Wall -pipe
builtin.c: In function 'ctop_int':
builtin.c:424: warning: format '%d' expects type 'int',
but argument 2 has type 'long int'
In file included from builtin.c:1055:
io_builtins_xsb_i.h: In function 'stropen':
io_builtins_xsb_i.h:66: warning: cast to pointer from
integer of different size
[gcc] cinterf.c
[gcc] conc_compl.c
[gcc] debug_xsb.c
debug_xsb.c:286:8: warning: extra tokens at end of
#endif directive
[gcc] dis.c
[gcc] dynload.c
[gcc] dynamic_stack.c
[gcc] deadlock.c
[gcc] emuloop.c using -O3 -fno-strict-aliasing
-Wall -pipe
emuloop.c: In function 'emuloop':
emuloop.c:444: warning: cast to pointer from integer of
different size
[gcc] error_xsb.c
[gcc] findall.c
[gcc] function.c
[gcc] hash_xsb.c
[gcc] hashtable_xsb.c
[gcc] heap_xsb.c
[gcc] init_xsb.c
[gcc] inst_xsb.c
[gcc] io_builtins_xsb.c
[gcc] loader_xsb.c using -O3
-fno-strict-aliasing -Wall -pipe
[gcc] memory_xsb.c
[gcc] orient_xsb.c
[gcc] pathname_xsb.c
[gcc] psc_xsb.c
[gcc] random_xsb.c
[gcc] remove_unf.c
[gcc] residual.c
[gcc] rw_lock.c
[gcc] scc_xsb.c
[gcc] slgdelay.c
[gcc] socket_xsb.c
socket_xsb.c: In function 'xsb_socket_request':
socket_xsb.c:427: warning: 'msg_len' may be used
uninitialized in this function
socket_xsb.c:426: warning: 'message_buffer' may be used
uninitialized in this function
[gcc] string_xsb.c
[gcc] storage_xsb.c
[gcc] struct_manager.c
struct_manager.c: In function 'smPrint':
struct_manager.c:62: warning: format '%u' expects type
'unsigned int', but argument 12 has type 'size_t'
struct_manager.c: In function 'smPrintBlocks':
struct_manager.c:114: warning: format '%d' expects type
'int', but argument 3 has type 'long unsigned int'
[gcc] sub_delete.c
[gcc] subp.c
[gcc] system_xsb.c
[gcc] table_stats.c
[gcc] tables.c
[gcc] thread_xsb.c
[gcc] timer_xsb.c
[gcc] token_xsb.c
[gcc] tr_utils.c using -O3 -fno-strict-aliasing
-Wall -pipe
[gcc] trace_xsb.c
[gcc] trie_lookup.c
[gcc] trie_search.c
[gcc] tries.c
tries.c: In function 'get_lastnode_cs_retskel':
tries.c:1995: warning: cast from pointer to integer of
different size
[gcc] tst_insert.c
[gcc] tst_retrv.c
[gcc] tst_unify.c
[gcc] tst_utils.c
[gcc] varstring.c
[gcc] ubi_BinTree.c
[gcc] ubi_SplayTree.c

Making XSB executable
/home/timo/download/XSB/config/x86_64-unknown-linux-gnu/bin/xsb

[gcc] -o
/home/timo/download/XSB/config/x86_64-unknown-linux-gnu/bin/xsb
system_xsb.o: In function `sys_system':
system_xsb.c:(.text+0xf26): warning: the use of
`tmpnam' is dangerous, better use `mkstemp'
make[1]: Leaving directory `/home/timo/download/XSB/emu'
make[1]: Entering directory `/home/timo/download/XSB/emu'

Making a C-callable XSB module
/home/timo/download/XSB/config/x86_64-unknown-linux-gnu/saved.o/xsb.o

make[1]: Leaving directory `/home/timo/download/XSB/emu'
make[1]: Entering directory `/home/timo/download/XSB/emu'
make[1]: Nothing to be done for `dll'.
make[1]: Leaving directory `/home/timo/download/XSB/emu'

Making gpp
make[1]: Entering directory `/home/timo/download/XSB/gpp'

[gcc] gpp.c using
[gcc] -o gpp

make[1]: Leaving directory `/home/timo/download/XSB/gpp'
make[1]: Entering directory `/home/timo/download/XSB'

cd cmplib; make
make[2]: Entering directory
`/home/timo/download/XSB/cmplib'
rm -f '../build/.xsb_cmplib_warn.tmp'
echo 'mc(asm,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(asm_inst,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(asm_opt,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(asmpass2,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(auxlry,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(builtin,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(ciao_directives,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(compile,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
../build/touch.sh config.P
echo 'mc(config,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(cp_opt,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(cutcheck,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(flatten,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(inprog,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
../build/touch.sh listutil.P
echo 'mc(listutil,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(makemode,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(modeinf,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
../build/touch.sh modes.P
echo 'mc(modes,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(parse,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(peephole,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(pre_cond,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(preproc,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(printres,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(prof_sbp,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(sanity,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(singlton,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(spec,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
../build/touch.sh suppltab.P
echo 'mc(suppltab,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(symtab,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tabdef,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(ti_mod,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_comp,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_cond,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_eval,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_goal,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_index,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tp_var,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tpinline,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(tprog,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(useinfer,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
../build/touch.sh varproc.P
echo 'mc(varproc,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
echo 'mc(writeasm,
[sysmod,optimize,spec_repr,quit_on_error]).' >> cmd...
/home/timo/download/XSB/bin/xsb -e
"segfault_handler(warn)." < cmd...
/bin/sh: line 1: 6829 Segmentation fault
/home/timo/download/XSB/bin/xsb -e
"segfault_handler(warn)." <cmd...
make[2]: *** [all] Error 139
make[2]: Leaving directory `/home/timo/download/XSB/cmplib'
make[1]: *** [cmplib] Error 2
make[1]: Leaving directory `/home/timo/download/XSB'
make: *** [remake_dot_O_files] Error 2

Discussion

  • Sami Liedes

    Sami Liedes - 2007-02-26

    Logged In: YES
    user_id=135703
    Originator: NO

    Here's a backtrace:

    Program terminated with signal 11, Segmentation fault.
    #0 0x000000000049e65e in extend_enc_dec_as_nec (lptr=0x2ab596486010, hptr=0x2ab596606010) at memory_xsb.c:73
    73 if (enc[nibble] == -1) {
    (gdb) bt full
    #0 0x000000000049e65e in extend_enc_dec_as_nec (lptr=0x2ab596486010, hptr=0x2ab596606010) at memory_xsb.c:73
    nibble = 174937
    lnibble = 174937
    hnibble = 174937
    #1 0x000000000048f617 in init_machine (glsize=0, tcpsize=0, complstacksize=0, pdlsize=0) at init_xsb.c:1063
    No locals.
    #2 0x000000000047973b in xsb (flag=0, argc=3, argv=0x7fff14d12e88) at emuloop.c:2298
    startup_file = 0x68b250 "/home/sliedes/scratch/down/smodels/XSB/syslib/loader.xwam"
    fd = (FILE *) 0x2ab595eaaca0
    magic_num = 0
    realtime = 1172533247.8995321
    #3 0x000000000040b4f8 in main (argc=3, argv=0x7fff14d12e88) at main_xsb.c:85
    No locals.

     
  • David S. Warren

    David S. Warren - 2007-02-27

    Logged In: YES
    user_id=13069
    Originator: NO

    Yes, the 64-bit port of XSB does not work these days. It was ported a couple of years ago, but XSB continues to be developed and none of the developers are using a 64-bit version, so incompatibilities continually creep in. We continually hope to get back to fixing the 64-bit port, but haven't been able to find the time. Sorry. (The place your code died seems to be in the "general_tagging" code, which does not work for 64-bit architectures. I'm not sure why it is being used. You should have the flag BITS64 defined in config_xsb.h, I think, and that should cause it to use a simpler tagging scheme.)

    -David

     
  • Theresa Swift

    Theresa Swift - 2007-08-24

    Logged In: YES
    user_id=13011
    Originator: NO

    This is fixed in the current CVS version, and should work in 3.1

     
  • Theresa Swift

    Theresa Swift - 2007-08-24
    • status: open --> closed
     

Log in to post a comment.