Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings
Afficher les réponses par date
For some strange reason Gambit is being linked to a shared library. With the configure options you used you should get a static linked executable (the generated library is libgambit.a).
In your “steps” you say “make -l4 from-scratch”… I assume the -l4 is a typo when you wrote the message (it should be -j4).
Can you try again fresh with the steps in the README.md .
Marc
On May 11, 2017, at 12:51 PM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
The shared library thing might have been ./configure "remembering" a previous configuration attempt. I did a git clean -xfd to remove any such thing and indeed I didn't have to export LD_LIBRARY_PATH after I did. But I still fail at: make -l4 from-scratch (sorry I used -j4, it's about the same as -l4), in the same way:
$ (set -x ; git clean -xfd ; git reset --hard ; ./configure ; make -l4 latest-release ; ./configure --enable-single-host && make -l4 from-scratch ) |& ~/tmp/gambit.fail.1 ... make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY gcc: error: _io.c: No such file or directory gcc: fatal error: no input files compilation terminated. makefile:164: recipe for target '_io.o' failed
I tried with NixOS and had similar failures. I'll try again and send an error log, if that helps.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If once you have paid him the Dane-geld / You never get rid of the Dane. — Rudyard Kipling
On Thu, May 11, 2017 at 1:20 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
For some strange reason Gambit is being linked to a shared library. With the configure options you used you should get a static linked executable (the generated library is libgambit.a).
In your “steps” you say “make -l4 from-scratch”… I assume the -l4 is a typo when you wrote the message (it should be -j4).
Can you try again fresh with the steps in the README.md .
Marc
On May 11, 2017, at 12:51 PM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
That is not the correct way to build Gambit. The README.md file says:
git clone https://github.com/gambit/gambit.git cd gambit ./configure make -j4 current-gsc-boot ./configure --enable-single-host make -j4 from-scratch make check make -j4 doc sudo make install
You are using “make latest-release” which is no longer correct.
Marc
On May 11, 2017, at 3:31 PM, Faré fahree@gmail.com wrote:
The shared library thing might have been ./configure "remembering" a previous configuration attempt. I did a git clean -xfd to remove any such thing and indeed I didn't have to export LD_LIBRARY_PATH after I did. But I still fail at: make -l4 from-scratch (sorry I used -j4, it's about the same as -l4), in the same way:
$ (set -x ; git clean -xfd ; git reset --hard ; ./configure ; make -l4 latest-release ; ./configure --enable-single-host && make -l4 from-scratch ) |& ~/tmp/gambit.fail.1 ... make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY gcc: error: _io.c: No such file or directory gcc: fatal error: no input files compilation terminated. makefile:164: recipe for target '_io.o' failed
I tried with NixOS and had similar failures. I'll try again and send an error log, if that helps.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If once you have paid him the Dane-geld / You never get rid of the Dane. — Rudyard Kipling
On Thu, May 11, 2017 at 1:20 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
For some strange reason Gambit is being linked to a shared library. With the configure options you used you should get a static linked executable (the generated library is libgambit.a).
In your “steps” you say “make -l4 from-scratch”… I assume the -l4 is a typo when you wrote the message (it should be -j4).
Can you try again fresh with the steps in the README.md .
Marc
On May 11, 2017, at 12:51 PM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Oops, I was using the instructions from README, which apparently contradicts README.md. Maybe README should be removed or updated?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Pascal is for building pyramids—imposing, breathtaking, static structures built by armies pushing heavy blocks into place. Lisp is for building organisms… – Alan Perlis
On Thu, May 11, 2017 at 3:44 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
That is not the correct way to build Gambit. The README.md file says:
git clone https://github.com/gambit/gambit.git cd gambit ./configure make -j4 current-gsc-boot ./configure --enable-single-host make -j4 from-scratch make check make -j4 doc sudo make install
You are using “make latest-release” which is no longer correct.
Marc
On May 11, 2017, at 3:31 PM, Faré fahree@gmail.com wrote:
The shared library thing might have been ./configure "remembering" a previous configuration attempt. I did a git clean -xfd to remove any such thing and indeed I didn't have to export LD_LIBRARY_PATH after I did. But I still fail at: make -l4 from-scratch (sorry I used -j4, it's about the same as -l4), in the same way:
$ (set -x ; git clean -xfd ; git reset --hard ; ./configure ; make -l4 latest-release ; ./configure --enable-single-host && make -l4 from-scratch ) |& ~/tmp/gambit.fail.1 ... make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY gcc: error: _io.c: No such file or directory gcc: fatal error: no input files compilation terminated. makefile:164: recipe for target '_io.o' failed
I tried with NixOS and had similar failures. I'll try again and send an error log, if that helps.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If once you have paid him the Dane-geld / You never get rid of the Dane. — Rudyard Kipling
On Thu, May 11, 2017 at 1:20 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
For some strange reason Gambit is being linked to a shared library. With the configure options you used you should get a static linked executable (the generated library is libgambit.a).
In your “steps” you say “make -l4 from-scratch”… I assume the -l4 is a typo when you wrote the message (it should be -j4).
Can you try again fresh with the steps in the README.md .
Marc
On May 11, 2017, at 12:51 PM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Hmmmm… forgot to keep that file consistent with the rest… Thanks for catching that.
Marc
On May 11, 2017, at 3:46 PM, Faré fahree@gmail.com wrote:
Oops, I was using the instructions from README, which apparently contradicts README.md. Maybe README should be removed or updated?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Pascal is for building pyramids—imposing, breathtaking, static structures built by armies pushing heavy blocks into place. Lisp is for building organisms… – Alan Perlis
On Thu, May 11, 2017 at 3:44 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
That is not the correct way to build Gambit. The README.md file says:
git clone https://github.com/gambit/gambit.git cd gambit ./configure make -j4 current-gsc-boot ./configure --enable-single-host make -j4 from-scratch make check make -j4 doc sudo make install
You are using “make latest-release” which is no longer correct.
Marc
On May 11, 2017, at 3:31 PM, Faré fahree@gmail.com wrote:
The shared library thing might have been ./configure "remembering" a previous configuration attempt. I did a git clean -xfd to remove any such thing and indeed I didn't have to export LD_LIBRARY_PATH after I did. But I still fail at: make -l4 from-scratch (sorry I used -j4, it's about the same as -l4), in the same way:
$ (set -x ; git clean -xfd ; git reset --hard ; ./configure ; make -l4 latest-release ; ./configure --enable-single-host && make -l4 from-scratch ) |& ~/tmp/gambit.fail.1 ... make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY gcc: error: _io.c: No such file or directory gcc: fatal error: no input files compilation terminated. makefile:164: recipe for target '_io.o' failed
I tried with NixOS and had similar failures. I'll try again and send an error log, if that helps.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If once you have paid him the Dane-geld / You never get rid of the Dane. — Rudyard Kipling
On Thu, May 11, 2017 at 1:20 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
For some strange reason Gambit is being linked to a shared library. With the configure options you used you should get a static linked executable (the generated library is libgambit.a).
In your “steps” you say “make -l4 from-scratch”… I assume the -l4 is a typo when you wrote the message (it should be -j4).
Can you try again fresh with the steps in the README.md .
Marc
On May 11, 2017, at 12:51 PM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
I am having trouble trying to build gambit from HEAD (commit 75ce77b) on Linux x64 (Ubuntu 17.04).
These steps work well: ./configure ; make -j4 latest-release ; ./configure --enable-single-host
This step fails: make -l4 from-scratch
First, I get: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm ../gsc-boot: error while loading shared libraries: libgambit.so: cannot open shared object file: No such file or directory makefile:167: recipe for target '_io.c' failed
If I instead use: LD_LIBRARY_PATH=$PWD make -l4 from-scratch
then gsc-boot can see libgambit.so in the current directory and compile _io.c, but I get this failure in _num.c: make[2]: Entering directory '/home/fare/src/scheme/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _io.scm gcc -Wno-unused -Wno-write-strings -Wdisabled-optimization -O1 -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer -fPIC -fno-common -mieee-fp -mpc64 -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBITDIR=""/usr/local/Gambit"" -D___SYS_TYPE_CPU=""x86_64"" -D___SYS_TYPE_VENDOR=""unknown"" -D___SYS_TYPE_OS=""linux-gnu"" -D___CONFIGURE_COMMAND=""./configure '--enable-single-host'"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check -prelude "(##include"header.scm")" _num.scm *** ERROR IN c#macro-expand -- define-prim can't inline ##fxwraparithmetic-shift? makefile:167: recipe for target '_num.c' failed make[2]: *** [_num.c] Error 70
Am I doing something wrong? Is some inline definition for << or >> missing?
Also, is there a guide to interactive development with Gambit? I admit that coming from the Common Lisp world, I'm a bit spoiled by SLIME.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org It's not ignorance that does so much damage; it's knowing so darned much that ain't so. — Josh Billings _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On Thu, May 11, 2017 at 4:05 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
Hmmmm… forgot to keep that file consistent with the rest… Thanks for catching that.
Well, I suppose *someone* had to get bitten by the README at some point.
Following the instructions from README.md, it all builds well for me (it seems).
Minor issue: when I compile with --enable-shared, Gambit does not include the install path in the path to the shared libraries, and so gsi and gsc won't work unless I either use LD_LIBRARY_PATH to point at gambit, or I use NixOS's patchelf to specify the full path (which, because the previous path is too short, means growning the executable size by one "large" 2MB page).
Could the install path from the --prefix option be included in the binary, or is there a good reason not to?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Any sufficiently advanced bug is indistinguishable from a feature. — Rich Kulawiec
On May 12, 2017, at 11:42 AM, Faré fahree@gmail.com wrote:
On Thu, May 11, 2017 at 4:05 PM, Marc Feeley feeley@iro.umontreal.ca wrote:
Hmmmm… forgot to keep that file consistent with the rest… Thanks for catching that.
Well, I suppose *someone* had to get bitten by the README at some point.
Following the instructions from README.md, it all builds well for me (it seems).
Great!
Minor issue: when I compile with --enable-shared, Gambit does not include the install path in the path to the shared libraries, and so gsi and gsc won't work unless I either use LD_LIBRARY_PATH to point at gambit, or I use NixOS's patchelf to specify the full path (which, because the previous path is too short, means growning the executable size by one "large" 2MB page).
Could the install path from the --prefix option be included in the binary, or is there a good reason not to?
Yes it is a good idea. Can you make the appropriate changes to the configure script and makefiles, and send in a pull request?
Marc
Dear Marc & gambiteers,
Could the install path from the --prefix option be included in the binary, or is there a good reason not to?
Yes it is a good idea. Can you make the appropriate changes to the configure script and makefiles, and send in a pull request?
I see an option --enable-absolute-shared-libs -- would it be doing what I want already, or is it different? What does it do?
I see that gsi does not have long options (e.g. --eval for -e) nor a help option, nor seemingly a fully general purpose declarative option parser. Is it on purpose (e.g. for size), or would you accept a patch that implement them? Maybe also a --load to directly load more than one file, in order? And a -- to terminate arguments so that user programs be provided arguments when no file was provided? In my dealing with Common Lisp invocation from the command line I found that these were a great way to let users invoke Lisp code from outside Lisp. There again, would you accept a patch to implement these?
Also, is there a way from a gsi in the $PATH to extract the installation path of gambit? Say with a suitable -e argument.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Each new generation born is in effect an invasion of civilization by little barbarians, who must be civilized before it is too late. — Thomas Sowell
On Sun, May 14, 2017 at 1:42 AM, Faré fahree@gmail.com wrote:
Also, is there a way from a gsi in the $PATH to extract the installation path of gambit? Say with a suitable -e argument.
For that, from the manual I get gsi -e '(display (path-expand "~~")) (newline)'
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Does anybody else find irony in the fact that Bill Gates says he's trying to write a stable OS, and Linus claims he's trying to take over the world?
You can already load multiple files by specifying them in the command line. The interpreter will keep loading until it finds one with a main function, at which point the remaining arguments are passed to it.
-- vyzo
On Sun, May 14, 2017 at 9:43 AM, Faré fahree@gmail.com wrote:
On Sun, May 14, 2017 at 1:42 AM, Faré fahree@gmail.com wrote:
Also, is there a way from a gsi in the $PATH to extract the installation path of gambit? Say with a suitable -e argument.
For that, from the manual I get gsi -e '(display (path-expand "~~")) (newline)'
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Does anybody else find irony in the fact that Bill Gates says he's trying to write a stable OS, and Linus claims he's trying to take over the world? _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Yes, to get the central installation directory you can use
% gsi -e '(println (path-expand "~~"))' /Library/Gambit/v4.8.8/
If you want the directory where executables are installed use
% gsi -e '(println (path-expand "~~bin"))' /Library/Gambit/v4.8.8/bin/
Note that this is not necessarily the central installation directory with bin/ appended to it because you can configure Gambit to install executables, libraries, documentation, etc in specific directories. From INSTALL.txt:
If the --prefix option is not used, the default is to install all files in /usr/local/Gambit and its subdirectories, namely "bin", "lib", "include", etc. The files that would normally go in these subdirectories can be redirected to other directories using the following configure options:
--bindir=DIR executables (gsi, gsc, ...) --libdir=DIR libraries (libgambit.a, syntax-case.scm, ...) --includedir=DIR C header files (gambit.h, ...) --docdir=DIR documentation (gambit.pdf, gambit.html, ...) --infodir=DIR info documentation (gambit.info, ...) --datadir=DIR read-only architecture-independent data (gambit.el)
Marc
On May 14, 2017, at 2:43 AM, Faré fahree@gmail.com wrote:
On Sun, May 14, 2017 at 1:42 AM, Faré fahree@gmail.com wrote:
Also, is there a way from a gsi in the $PATH to extract the installation path of gambit? Say with a suitable -e argument.
For that, from the manual I get gsi -e '(display (path-expand "~~")) (newline)'
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Does anybody else find irony in the fact that Bill Gates says he's trying to write a stable OS, and Linus claims he's trying to take over the world?
On Sun, May 14, 2017 at 3:22 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
Yes, to get the central installation directory you can use
% gsi -e '(println (path-expand "~~"))' /Library/Gambit/v4.8.8/
If you want the directory where executables are installed use
% gsi -e '(println (path-expand "~~bin"))' /Library/Gambit/v4.8.8/bin/
Note that this is not necessarily the central installation directory with bin/ appended to it because you can configure Gambit to install executables, libraries, documentation, etc in specific directories. From INSTALL.txt:
If the --prefix option is not used, the default is to install all files in /usr/local/Gambit and its subdirectories, namely "bin", "lib", "include", etc. The files that would normally go in these subdirectories can be redirected to other directories using the following configure options:
--bindir=DIR executables (gsi, gsc, ...) --libdir=DIR libraries (libgambit.a, syntax-case.scm, ...) --includedir=DIR C header files (gambit.h, ...) --docdir=DIR documentation (gambit.pdf, gambit.html, ...) --infodir=DIR info documentation (gambit.info, ...) --datadir=DIR read-only architecture-independent data (gambit.el)
Thanks (also for telling me about println).
It looks like datadir defines not ~~data but ~~share which is slightly surprising. Also finding that this was the case required grepping for path-expand and digging through many layers of indirection, from lib/_nonstd.scm (to ignoring the stub gsc/_host.scm) to lib/_kernel.scm to C file(!) lib/os_files.c... I suppose because some of the C runtime needs it before the scheme environment is even setup? Or is that just an ancient relic that could now be translated to Scheme but it's more effort than was worth it so far?
To go back to the first topic in this thread: why are there *both* a README and a README.md? Shouldn't the latter be sufficient?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Your conscience never stops you from doing anything. It just stops you from enjoying it.
Hello Faré. Patches are always welcome for features that improve functionality while sticking to Gambit’s design philosophy and goals. An important aspect is that to achieve high portability Gambit links with no external libraries (except for OpenSSL but only if you enable that). For this reason Gambit does its own command line parsing (and garbage collector, and bignum library, and Unicode encoding/decoding, etc) and a lot of the runtime library is written in Scheme (for example bignums and thread system). So adding --eval would require an explicit change of the code… this is done in Scheme code in gsi/main.scm).
Concerning “loading more than one file” you can do that already like this:
gsi a.scm b.scm c.scm
This will load those files sequentially (and you can intersperse -e options). If you want the program to process command line arguments the best way it to start the “main” program module file with a shebang. So if a.scm is written like so
#! /usr/bin/env gsi (define (main . args) (pp args))
and you run
gsi a.scm 11 22 33
you will get ("11" "22" "33")
This syntax is parsed by the Gambit compiler so you can do:
% gsi a.scm 11 22 33 ("11" "22" "33") % chmod +x a.scm % ./a.scm 11 22 33 ("11" "22" "33") % gsc -exe a.scm % ./a 11 22 33 ("11" "22" "33")
Also note that the shebang approach also has an impact on the value returned by (command-line)… the file with the shebang will be returned at the head of the list. So with:
#! /usr/bin/env gsi (define (main . args) (pp (command-line)))
you will get:
% gsi a.scm 11 22 33 ("/Users/feeley/a.scm" "11" "22" "33") % ./a.scm 11 22 33 ("/Users/feeley/a.scm" "11" "22" "33") % gsc -exe a.scm % ./a 11 22 33 ("./a" "11" "22" "33")
which allows the program to get the location of the script or executable with
(path-directory (path-normalize (car (command-line))))
The compiler is smart enough to take the shebang line’s gsi runtime options (of the form -:…) and compile them into the executable as the default runtime options. For example, if you compile the following a.scm file:
#! /usr/bin/env gsi (define (main x y) (pp (/ (string->number x) (string->number y))))
you get an executable that will report run time exceptions by default:
% ./a 42 2 21 % ./a 42 0 *** ERROR IN main -- Divide by zero (/ 42 0) % echo $? 70
And if you add the -:d0 runtime option (verbosity level = 0), then run time exceptions are not reported by default:
#! /usr/bin/env gsi -:d0 (define (main x y) (pp (/ (string->number x) (string->number y))))
You will get:
% ./a 42 0 % echo $? 70 % ./a -:d1 42 0 *** ERROR IN main -- Divide by zero (/ 42 0)
I guess the -- option would still be convenient for situations where a shebang line is awkward. But should that automatically call the “main” function as is the case when a shebang is present? And adding this interferes with the Scheme program’s ad-hoc command line parsing (it can’t “see” a -- option which might be relevant to its own command line parsing logic).
As for --enable-absolute-shared-libs, I think that may do what you want. Here is the description from INSTALL.txt:
When --enable-shared is used, the option --enable-absolute-shared-libs will install executables (for gsi and gsc) which contain references to the absolute paths of the libraries. This is necessary when multiple versions of Gambit are installed so that each executable refers to the appropriate Gambit shared library.
Marc
On May 14, 2017, at 1:42 AM, Faré fahree@gmail.com wrote:
Dear Marc & gambiteers,
Could the install path from the --prefix option be included in the binary, or is there a good reason not to?
Yes it is a good idea. Can you make the appropriate changes to the configure script and makefiles, and send in a pull request?
I see an option --enable-absolute-shared-libs -- would it be doing what I want already, or is it different? What does it do?
I see that gsi does not have long options (e.g. --eval for -e) nor a help option, nor seemingly a fully general purpose declarative option parser. Is it on purpose (e.g. for size), or would you accept a patch that implement them? Maybe also a --load to directly load more than one file, in order? And a -- to terminate arguments so that user programs be provided arguments when no file was provided? In my dealing with Common Lisp invocation from the command line I found that these were a great way to let users invoke Lisp code from outside Lisp. There again, would you accept a patch to implement these?
Also, is there a way from a gsi in the $PATH to extract the installation path of gambit? Say with a suitable -e argument.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Each new generation born is in effect an invasion of civilization by little barbarians, who must be civilized before it is too late. — Thomas Sowell
On May 14, 2017, at 3:03 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
When --enable-shared is used, the option --enable-absolute-shared-libs will install executables (for gsi and gsc) which contain references to the absolute paths of the libraries. This is necessary when multiple versions of Gambit are installed so that each executable refers to the appropriate Gambit shared library.
So it sounds like —enable-shared plus —enable-multiple-versions should imply —enable-absolute-shared-libs, which it doesn’t do now.
Brad