marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

problems with build on mac osx #90

Closed yinwang0 closed 8 years ago

yinwang0 commented 8 years ago

I am using Vicare Scheme master branch on a Mac OS X 10.11.4 system. The 1st and 3rd issues also happen with the downloaded tar ball vicare-scheme-0.4d0pre4.tar.xz.

I'm trying to build vicare on a mac, and it has been painful. I had to dig out the details in the build system to make it pass several obstacles, and still not succeeding. Here are the problems I have met so far:

  1. Won't find GMP even if it's installed. brew has installed gmp's header and lib files inside /usr/local/include and /usr/local/lib. These are pretty standard directories, but the configure script doesn't find them.
  2. Problem with texinfo files. After successfully configured by manually supplying GMP's locations, the build will fail with a problem with texinfo files. I removed the texinfo dependencies from the Makefile to proceed.

    /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
    restore=: && backupdir=".am$$" && \
    am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
    rm -rf $backupdir && mkdir $backupdir && \
    if (/bin/sh /Users/u289/Code/vicare/meta/autotools/missing makeinfo --version) >/dev/null 2>&1; then \
     for f in doc/vicare-scheme.info doc/vicare-scheme.info-[0-9] doc/vicare-scheme.info-[0-9][0-9] doc/vicare-scheme.i[0-9] doc/vicare-scheme.i[0-9][0-9]; do \
       if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
     done; \
    else :; fi && \
    cd "$am__cwd"; \
    if /bin/sh /Users/u289/Code/vicare/meta/autotools/missing makeinfo   -I doc -I ./doc \
    -o doc/vicare-scheme.info ./doc/vicare-scheme.texi; \
    then \
     rc=0; \
     CDPATH="${ZSH_VERSION+.}:" && cd .; \
    else \
     rc=$?; \
     CDPATH="${ZSH_VERSION+.}:" && cd . && \
     $restore $backupdir/* `echo "./doc/vicare-scheme.info" | sed 's|[^/]*$||'`; \
    fi; \
    rm -rf $backupdir; exit $rc
    ./doc/vicare-scheme.texi:7: @include `version-scheme.texi': No such file or directory.
    ./doc/vicare-scheme.texi:113: warning: undefined flag: VERSION.
    ./doc/vicare-scheme.texi:151: warning: undefined flag: VERSION.
  3. After that the build will proceed for a while, but then failed for a strange "Bus error":

    vicare: including file: /Users/u289/Code/vicare/scheme/ikarus.wordsize.scm
    vicare: searching include file: ikarus.config.scm
    vicare: including file: /Users/u289/Code/vicare/scheme/ikarus.config.scm
    vicare: searching include file: ikarus.config.scm
    vicare: including file: /Users/u289/Code/vicare/scheme/ikarus.config.scm
    /bin/sh: line 1: 74905 Bus error: 10           ./vicare -b ./boot/vicare.boot.8.prebuilt --no-rcfile --library-locator source -O2 --no-rcfile --library-locator source --r6rs-script ./scheme/makefile.sps
    make[1]: *** [vicare.boot] Error 138
    make: *** [all] Error 2
marcomaggi commented 8 years ago

Unfortunately I cannot test on Mac OS X, but other people reported that they were able to build.

Let's start from the second problem: when building from a repository checkout you have to use the option --enable-maintainer-mode with the configure script, as is explained in the README file.

First problem: on my GNU+Linux system I have GMP installed in the same location, and I can build with no problems. Remember that to explicitcly specify locations for libraries and include files you can use the standard Autoconf interface, that is: put CPPFLAGS and LDFLAGS variables on the command line of configure. As follows:

$ ./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib

What do you see in the file config.log when configure fails to find GMP?

Third problem: I can do nothing about this. I know that there is (most likely) a garbage collector error somewhere, but it shows very very rarely on my system, and I have been unable to locate the origin.