I am running Ubuntu 7.10, and I've just installed (using synaptic) Gambit-C. To try my installation, I just wrote (in file hello.scm) this hello world program:
(display "Hello World!\n")
Running: gsi hello.scm
Produces the expected output.
Running: gsc hello.scm
Produces hello.o1 executable file, but when I run it, a segfault occurs: ./hello.o1 Segmentation fault (core dumped)
If I run it with gdb:
(gdb) file hello.o1 Reading symbols from /home/fco/devel/scheme/hello.o1...done. Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (gdb) run Starting program: /home/fco/devel/scheme/hello.o1 warning: shared library handler failed to enable breakpoint
Program received signal SIGSEGV, Segmentation fault. 0x800003d6 in __do_global_dtors_aux ()
It fails in __do_global_dtors_aux()!, so it seems there is something wrong with my toolchain, but I am using all the default Ubuntu 7.10 packages. What I am doing wrong here?
Thanks, FCo
Afficher les réponses par date
Francisco Listas wrote:
Running: gsc hello.scm
Produces hello.o1 executable file, but when I run it, a segfault occurs: ./hello.o1 Segmentation fault (core dumped)
Someone else can give you a better answer later. Meanwhile, did you try "make test" during installation. It may grumble about timers on one test, but in the end should say "all tests pass". It is helpful to know about your setup details for analysis of a problem.
-Bob-
At 11:33 AM -0300 2/3/08, Francisco Listas wrote:
I am running Ubuntu 7.10, and I've just installed (using synaptic) Gambit-C. To try my installation, I just wrote (in file hello.scm) this hello world program:
(display "Hello World!\n")
Running: gsi hello.scm
Produces the expected output.
Running: gsc hello.scm
Produces hello.o1 executable file, but when I run it, a segfault occurs: ./hello.o1 Segmentation fault (core dumped)
Try: gsi hello.o1 If it works, you prolly haven't linked against Gambit. You only created a library, not an executable.
"Francisco Listas" francisco.listas@gmail.com writes:
I am running Ubuntu 7.10, and I've just installed (using synaptic) Gambit-C. To try my installation, I just wrote (in file hello.scm) this hello world program:
(display "Hello World!\n")
Running: gsi hello.scm
Produces the expected output.
Running: gsc hello.scm
Produces hello.o1 executable file, but when I run it, a segfault occurs: ./hello.o1 Segmentation fault (core dumped)
I would do: prompt> gsi hello or prompt> gsi hello - to go into interactive mode. GAmbit loads the most recent object file (the o# with the highest #).
For gdb, do prompt> gdb gsi (gdb) run hello
Right?
Joel