I have now added the generated .c files to the github repo and changed the makefiles so that a "make commit" does not commit the generated .c files, and a "make new-revision" (and new-minor and new-major) does commit the generated .c files . This means that cloning the github repo is sufficient to build Gambit.
The steps to follow are:
git clone git@github.com:feeley/gambit.git cd gambit ./configure --enable-single-host make make check
If no errors are reported, then
make bootstrap
will prepare the executable gsc-boot, which is the Gambit Scheme compiler used for bootstrapping. If any of the .scm files are changed, it will be used to generate the corresponding .c files.
When changes need to be committed, use
make commit
(do *not* use "git commit" which would commit all changed files including the generated .c files).
To push the commits to the repo, use
make push
Please let me know if you encounter problems with the new makefiles.
Marc
Afficher les réponses par date
That's great news Marc!
On Mon, Apr 16, 2012 at 4:26 PM, Marc Feeley feeley@iro.umontreal.cawrote:
I have now added the generated .c files to the github repo and changed the makefiles so that a "make commit" does not commit the generated .c files, and a "make new-revision" (and new-minor and new-major) does commit the generated .c files . This means that cloning the github repo is sufficient to build Gambit.
The steps to follow are:
git clone git@github.com:feeley/gambit.git cd gambit ./configure --enable-single-host make make check
If no errors are reported, then
make bootstrap
will prepare the executable gsc-boot, which is the Gambit Scheme compiler used for bootstrapping. If any of the .scm files are changed, it will be used to generate the corresponding .c files.
When changes need to be committed, use
make commit
(do *not* use "git commit" which would commit all changed files including the generated .c files).
To push the commits to the repo, use
make push
Please let me know if you encounter problems with the new makefiles.
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On 2012-04-16, at 4:26 PM, Marc Feeley wrote:
I have now added the generated .c files to the github repo and changed the makefiles so that a "make commit" does not commit the generated .c files, and a "make new-revision" (and new-minor and new-major) does commit the generated .c files . This means that cloning the github repo is sufficient to build Gambit.
The steps to follow are:
I sent the previous message too quickly and did not account for the steps to build the system with all the committed changes since the latest release. So here are the correct steps:
git clone git@github.com:feeley/gambit.git cd gambit ./configure --enable-single-host make bootstrap make bootclean make bootstrap
The first "make bootstrap" builds the bootstrap compiler "gsc-boot" from the (stale) .c files. The "make bootclean" removes these stale .c files. The second "make bootstrap" generates up to date .c files from the up to date .scm files using gsc-boot, and replaces gsc-boot with the up to date gsc.
Marc
On Apr 16, 2012, at 4:26 PM, Marc Feeley wrote:
The steps to follow are:
git clone git@github.com:feeley/gambit.git
I'm far from being a git expert, but I think that first line only works for those who have write access to the repository (at least it errors for me when I try it).
This works for everyone:
git clone https://github.com/feeley/gambit.git
warmest regards,
Ralph
Raffael Cavallaro raffaelcavallaro@me.com
On 2012-04-17, at 7:19 AM, Raffael Cavallaro wrote:
On Apr 16, 2012, at 4:26 PM, Marc Feeley wrote:
The steps to follow are:
git clone git@github.com:feeley/gambit.git
I'm far from being a git expert, but I think that first line only works for those who have write access to the repository (at least it errors for me when I try it).
This works for everyone:
git clone https://github.com/feeley/gambit.git
warmest regards,
Thank you. I had forgotten about that. Here is what I have put at the top of the README file (which is shown on the main github page):
Quick-install instructions for a typical installation -----------------------------------------------------
git clone https://github.com/feeley/gambit.git cd gambit ./configure --enable-single-host make bootstrap make bootclean make make check sudo make install
Detailed installation instructions are given in the file "INSTALL.txt".
And here is what I have added at the top of the INSTALL.txt file:
1) Obtaining the Gambit source code ===================================
The Gambit source code can be obtained in different ways.
- You can get the most recent version of the sources directly from the Gambit repository on github:
% git clone https://github.com/feeley/gambit.git % cd gambit
Note that the source code obtained may contain some stale .c files. Up to date files can be obtained after the system is built using the commands "make bootstrap; make bootclean; make". The last "make" uses the Gambit compiler to generate up to date .c files.
- You can get a specific release, preferably the latest, in the form of a compressed tar ball (.tgz extension). The simplest is to use a browser to visit the Gambit wiki (http://gambit.iro.umontreal.ca) and click on "Development Sources" to download the compressed tar ball. Alternatively, use wget or curl from the command line, for example:
% wget http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/gambc-v4_6_5... % tar zxf gambc-v4_6_5-devel.tgz % mv gambc-v4_6_5-devel gambit % cd gambit
Note that releases come in two flavors. The "developer" release, which has a "-devel" suffix in its name, contains the complete git history. It is a snapshot of the Gambit repository at a particular point in time. The "plain" release, without the "-devel" suffix in its name, does not contain the git history and is much more compact than the developer release.
Obtaining a version of the sources with the git history is required if you intend to contribute changes to the Gambit repository. In that case you will need a github account. Please send a message with your github user name to gambit@iro.umontreal.ca to request write permissions.
Marc:
On Tue, 2012-04-17 at 09:38 -0400, Marc Feeley wrote:
Quick-install instructions for a typical installation
git clone https://github.com/feeley/gambit.git cd gambit ./configure --enable-single-host make bootstrap make bootclean make
The following variant fails:
28 10:58 git clone https://github.com/feeley/gambit.git 29 11:00 cd gambit 30 11:00 ./configure 'CC=/pkgs/gcc-4.7.0/bin/gcc -march=native -fschedule-insns -frename-registers' '--enable-single-host' '--enable-multiple-versions' '--enable-shared' 31 11:05 make bootstrap 32 11:22 make bootclean 33 11:22 make
with
making all in include make[1]: Entering directory `/home/lucier/programs/gambit/include' major=`echo v4.6.5 | sed -e "s/v//g" -e "s/.[^.]*.[^.]*//g"`; \ minor=`echo v4.6.5 | sed -e "s/v[^.]*.//g" -e "s/.[^.]*//g"`; \ revision=`echo v4.6.5 | sed -e "s/v[^.]*.[^.]*.//g" -e "s///g"`; \ version_num=`eval expr "( 100000 \* $major ) + ( 1000 \* $minor ) + $revision"`; \ echo "#error "The version indicated in ___VERSION is not supported by gambit.h"" > gambit-not$version_num.h; \ echo "#error "You are probably compiling C code generated by a Gambit compiler earlier or later than v4.6.5"" >> gambit-not$version_num.h; \ echo "#error "___VERSION will be set to $version_num to reduce other errors"" >> gambit-not$version_num.h; \ echo "#undef ___VERSION" >> gambit-not$version_num.h; \ echo "#define ___VERSION $version_num" >> gambit-not$version_num.h; \ echo "#include "gambit.h"" >> gambit-not$version_num.h make[1]: Leaving directory `/home/lucier/programs/gambit/include' making all in lib make[1]: Entering directory `/home/lucier/programs/gambit/lib' LD_LIBRARY_PATH=../lib:../gsi:../gsc:/usr/local/Gambit-C/current/lib: ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm ../gsc-boot: error while loading shared libraries: ../lib/libgambc.so: cannot open shared object file: No such file or directory make[1]: *** [_io.c] Error 127 make[1]: Leaving directory `/home/lucier/programs/gambit/lib' make: *** [all-recursive] Error 1
evidently, you can't do --enable-shared. Or perhaps "make bootclean" should leave the libraries, which might be better.
Also, if I do "make -j 4 bootstrap" after the configure, I get the failure
make[1]: Entering directory `/home/lucier/programs/gambit/lib' ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _num.scm /bin/sh: ../gsc-boot: not found /bin/sh: make[1]: *** [_io.c] Error 127 make[1]: *** Waiting for unfinished jobs.... ../gsc-boot: not found make[1]: *** [_num.c] Error 127 make[1]: Leaving directory `/home/lucier/programs/gambit/lib' make: *** [all-recursive] Error 1 make: *** Waiting for unfinished jobs....
It appears the makefile dependencies should be changed to allow parallel makes.
Brad
I have pushed a fix for the first problem. I think it may solve the second problem also. Can you check?
Marc
On 2012-04-17, at 12:52 PM, Bradley Lucier wrote:
The following variant fails:
28 10:58 git clone https://github.com/feeley/gambit.git 29 11:00 cd gambit 30 11:00 ./configure 'CC=/pkgs/gcc-4.7.0/bin/gcc -march=native -fschedule-insns -frename-registers' '--enable-single-host' '--enable-multiple-versions' '--enable-shared' 31 11:05 make bootstrap 32 11:22 make bootclean 33 11:22 make
On Wed, 2012-04-18 at 12:11 -0400, Marc Feeley wrote:
I have pushed a fix for the first problem. I think it may solve the second problem also. Can you check?
Sorry, I have the same problem. The following
3 12:57 git clone https://github.com/feeley/gambit.git 4 12:57 cd gambit 5 12:57 ./configure 'CC=/pkgs/gcc-4.7.0/bin/gcc -march=native -fschedule-insns -frename-registers' '--enable-single-host' '--enable-multiple-versions' '--enable-shared' 6 12:57 make bootstrap 7 13:09 make bootclean 8 13:09 make
gives me
heine:~/crap/gambit> make making all in include make[1]: Entering directory `/home/lucier/crap/gambit/include' major=`echo v4.6.5 | sed -e "s/v//g" -e "s/.[^.]*.[^.]*//g"`; \ minor=`echo v4.6.5 | sed -e "s/v[^.]*.//g" -e "s/.[^.]*//g"`; \ revision=`echo v4.6.5 | sed -e "s/v[^.]*.[^.]*.//g" -e "s///g"`; \ version_num=`eval expr "( 100000 \* $major ) + ( 1000 \* $minor ) + $revision"`; \ echo "#error "The version indicated in ___VERSION is not supported by gambit.h"" > gambit-not$version_num.h; \ echo "#error "You are probably compiling C code generated by a Gambit compiler earlier or later than v4.6.5"" >> gambit-not$version_num.h; \ echo "#error "___VERSION will be set to $version_num to reduce other errors"" >> gambit-not$version_num.h; \ echo "#undef ___VERSION" >> gambit-not$version_num.h; \ echo "#define ___VERSION $version_num" >> gambit-not$version_num.h; \ echo "#include "gambit.h"" >> gambit-not$version_num.h make[1]: Leaving directory `/home/lucier/crap/gambit/include' making all in lib make[1]: Entering directory `/home/lucier/crap/gambit/lib' LD_LIBRARY_PATH=..:/usr/local/Gambit-C/current/lib: ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm ../gsc-boot: error while loading shared libraries: ../lib/libgambc.so: cannot open shared object file: No such file or directory make[1]: *** [_io.c] Error 127 make[1]: Leaving directory `/home/lucier/crap/gambit/lib' make: *** [all-recursive] Error 1
Brad
On 2012-04-18, at 1:12 PM, Bradley Lucier wrote:
LD_LIBRARY_PATH=..:/usr/local/Gambit-C/current/lib: ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm ../gsc-boot: error while loading shared libraries: ../lib/libgambc.so: cannot open shared object file: No such file or directory make[1]: *** [_io.c] Error 127 make[1]: Leaving directory `/home/lucier/crap/gambit/lib' make: *** [all-recursive] Error 1
It would seem that the linux dynamic loader behaves differently from Mac OS X. Can you verify that the file libgambc.so has been copied to the root of the distribution (where gsc-boot is located)? I expected the LD_LIBRARY_PATH=.. to force the dynamic loader to load libgambc.so from the root directory.
Marc
I have now pushed a fix which uses the -Wl,-soname option on linux to force a specific name for the Gambit runtime library. Please let me know if this fixes the problem.
Marc
On 2012-04-18, at 3:06 PM, Marc Feeley wrote:
On 2012-04-18, at 1:12 PM, Bradley Lucier wrote:
LD_LIBRARY_PATH=..:/usr/local/Gambit-C/current/lib: ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c -check _io.scm ../gsc-boot: error while loading shared libraries: ../lib/libgambc.so: cannot open shared object file: No such file or directory make[1]: *** [_io.c] Error 127 make[1]: Leaving directory `/home/lucier/crap/gambit/lib' make: *** [all-recursive] Error 1
It would seem that the linux dynamic loader behaves differently from Mac OS X. Can you verify that the file libgambc.so has been copied to the root of the distribution (where gsc-boot is located)? I expected the LD_LIBRARY_PATH=.. to force the dynamic loader to load libgambc.so from the root directory.
On Wed, 2012-04-18 at 16:06 -0400, Marc Feeley wrote:
I have now pushed a fix which uses the -Wl,-soname option on linux to force a specific name for the Gambit runtime library. Please let me know if this fixes the problem.
That fixed the "Library not found problem," thanks.
The "make -j 4" problem is still there: In the first "make -j 4 bootstrap", the makefile doesn't guarantee that gsc-boot is built before it tries to call it.
Brad
On 2012-04-18, at 5:37 PM, Bradley Lucier wrote:
On Wed, 2012-04-18 at 16:06 -0400, Marc Feeley wrote:
I have now pushed a fix which uses the -Wl,-soname option on linux to force a specific name for the Gambit runtime library. Please let me know if this fixes the problem.
That fixed the "Library not found problem," thanks.
Great.
The "make -j 4" problem is still there: In the first "make -j 4 bootstrap", the makefile doesn't guarantee that gsc-boot is built before it tries to call it.
The make dependency on gsc-boot was at the wrong place. It should work now.
Marc