Hello everybody,
First of all, thanks in advance to people contributing and helping out others. I am new to this list, to scheme, and even to MacOS so apologize my ignorance. Although, I am a old timer Unix C programmer so we should meet somewhere. I choose gambit to learn scheme because I am from Montreal and because I am interested into BIT and PICOBIT.
Unfortunately, apart from saying hello, I come to this mailing list for help. I followed instructions off the website
$ wget http://www.iro.umontreal.ca/~gambit/download/gambit/v4.3/source/gambc-v4_3_2... $ tar zxf gambc-v4_3_2-devel.tgz $ cd gambc-v4_3_2-devel $ ./configure --enable-single-host $ make bootstrap and then boom! $ ./bin/gsi-script Segmentation fault: 11 Moreover:
$ gdb ./bin/gsi-script GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done
(gdb) r Starting program: /Users/rip/Documents/Ideas/Embedded_Lisp/BIT/gambc-v4_3_2-devel/bin/gsi-script Reading symbols for shared libraries +............................. done
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000001 0x0000000000000001 in ?? () (gdb) bt #0 0x0000000000000001 in ?? () Cannot access memory at address 0x1 #1 0x01000000010031ba in ?? ()
Any idea what am I doing wrong ?
Best Regards
Richard Prescott
Afficher les réponses par date
Dear Richard,
Welcome to the ML side of the Gambit community!
While the way you compiled Gambit below is really interesting, the ordinary way I and I believe others are used with, is:
$ wget http://www.iro.umontreal.ca/~gambit/download/gambit/v4.3/source/gambc-v4_3_2... $ tar zxf gambc-v4_3_2-devel.tgz $ cd gambc-v4_3_2-devel $ ./configure --enable-single-host $ make
Gambit is now in ./gsc/gsc and ./gsi/gsi , ready to be used. And you may install it into the system:
# make install
and then suitably link gsc to the Gambit binary, sth like:
# ln -s /usr/bin/gsc /usr/local/Gambit-C/v4.6.0/bin/gsc
Was this of help?
M
2012/10/16 Richard Prescott rdprescott@gmail.com
Hello everybody,
First of all, thanks in advance to people contributing and helping out others. I am new to this list, to scheme, and even to MacOS so apologize my ignorance. Although, I am a old timer Unix C programmer so we should meet somewhere. I choose gambit to learn scheme because I am from Montreal and because I am interested into BIT and PICOBIT.
Unfortunately, apart from saying hello, I come to this mailing list for help. I followed instructions off the website
$ wget http://www.iro.umontreal.ca/~gambit/download/gambit/v4.3/source/gambc-v4_3_2... $ tar zxf gambc-v4_3_2-devel.tgz $ cd gambc-v4_3_2-devel $ ./configure --enable-single-host $ make bootstrap
and then boom!
$ ./bin/gsi-script Segmentation fault: 11
Moreover:
$ gdb ./bin/gsi-script GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done
(gdb) r Starting program: /Users/rip/Documents/Ideas/Embedded_Lisp/BIT/gambc-v4_3_2-devel/bin/gsi-script Reading symbols for shared libraries +............................. done
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000001 0x0000000000000001 in ?? ()
(gdb) bt #0 0x0000000000000001 in ?? () Cannot access memory at address 0x1 #1 0x01000000010031ba in ?? ()
Any idea what am I doing wrong ?
Best Regards
Richard Prescott
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Ah, and a last sidenote right now would be that you chose to download an old version of Gambit. It will spin perfectly but why not go with the latest one, it.s 4.6.something.
Le 2012-10-16 à 5:10 AM, Richard Prescott rdprescott@gmail.com a écrit :
Any idea what am I doing wrong ?
It would help greatly if you gave information on the C compiler that you are using. Is it clang or gcc? Which version? Some versions of clang and gcc contain bugs which cause them to generate incorrect machine code when compiling Gambit. Some versions of these C compilers generate correct code, but take a lot of RAM memory and compilation time to compile Gambit. So it is good to choose the C compiler well.
I tend to use gcc to develop and build Gambit. This thread explains more: https://mercure.iro.umontreal.ca/pipermail/gambit-list/2012-May/005946.html
Marc
The compiler I am using is i686-apple-darwin11-llvm-gcc-4.2 which come with Xcode.
Updating to git version of gambit, configure tells me what am I doing wrong.
Ok! I will have to compile a compiler…. (again)
Best Regards
Richard
PS: Sorry for the late reply, I do have a day job and a family at night. So I "play" in the very early morning.
On 2012-10-16, at 9:20 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
Le 2012-10-16 à 5:10 AM, Richard Prescott rdprescott@gmail.com a écrit :
Any idea what am I doing wrong ?
It would help greatly if you gave information on the C compiler that you are using. Is it clang or gcc? Which version? Some versions of clang and gcc contain bugs which cause them to generate incorrect machine code when compiling Gambit. Some versions of these C compilers generate correct code, but take a lot of RAM memory and compilation time to compile Gambit. So it is good to choose the C compiler well.
I tend to use gcc to develop and build Gambit. This thread explains more: https://mercure.iro.umontreal.ca/pipermail/gambit-list/2012-May/005946.html
Marc
Le 2012-10-17 à 5:11 AM, Richard Prescott rdprescott@gmail.com a écrit :
The compiler I am using is i686-apple-darwin11-llvm-gcc-4.2 which come with Xcode.
Updating to git version of gambit, configure tells me what am I doing wrong.
Ok! I will have to compile a compiler…. (again)
Here's a script that I use to compile various versions of gcc on Mac OS X.
Marc
Everybody,
Just to follow up on this. llvm (clang) was the issue.
Thanks
On 2012-10-17, at 8:25 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
Le 2012-10-17 à 5:11 AM, Richard Prescott rdprescott@gmail.com a écrit :
The compiler I am using is i686-apple-darwin11-llvm-gcc-4.2 which come with Xcode.
Updating to git version of gambit, configure tells me what am I doing wrong.
Ok! I will have to compile a compiler…. (again)
Here's a script that I use to compile various versions of gcc on Mac OS X.
Marc
<build-gccs>