Hello World segfaults on me
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. -- Stephane! coleste@videotron.ca (Stephane Le Cornec) +------------------- Made with recycled electrons. --------------------+ | #include <disclaimer.h> Kebekkujin desu. | +----------------------------------------------------------------------+
"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 -- Joel J. Adamson Biostatistician Pediatric Psychopharmacology Research Unit Massachusetts General Hospital Boston, MA 02114 (617) 643-1432 (303) 880-3109 The information transmitted in this electronic communication is intended only for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this information in error, please contact the Compliance HelpLine at 800-856-1983 and properly dispose of this information.
participants (4)
-
Bob McIsaac -
Francisco Listas -
jadamson@partners.org -
Stephane Le Cornec