marcomaggi / vicare

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

[vicare.boot] Illegal instruction #61

Closed AndySpider closed 10 years ago

AndySpider commented 10 years ago

platform: openSuse 12.3 vicare version: 0.3d7, master both

After ./configure, make outputs:

make[2]: Entering directory `/home/andy/Tmp/vicare-0.3d7/build/scheme'
echo '(define vicare-version "0.3d7")' >ikarus.config.ss
echo '(define vicare-lib-dir "/usr/local/lib/vicare-scheme")' >>ikarus.config.ss
echo '(define scheme-lib-dir "/usr/local/lib/scheme/r6rs")' >>ikarus.config.ss
echo '(define (host-info) "i686-pc-linux-gnu")' >>ikarus.config.ss
echo '(define wordsize 4)' >>ikarus.config.ss
echo '(define platform-endianness (quote little))' >>ikarus.config.ss
echo '(define arguments-validation (positive? 1))' >>ikarus.config.ss
echo '(define bootfile "/usr/local/lib/vicare-scheme/vicare.boot")' >>ikarus.config.ss
VICARE_SRC_DIR=../../scheme                     \
  VICARE_BUILD_DIR=.                            \
  VICARE_LIBRARY_PATH=.:../../scheme:../../scheme/../lib:./../lib               \
   ../src/vicare -b ../../scheme/vicare.boot.4.prebuilt \
   --r6rs-script ../../scheme/makefile.sps
make[2]: *** [vicare.boot] Illegal instruction
make[2]: Leaving directory `/home/andy/Tmp/vicare-0.3d7/build/scheme'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/andy/Tmp/vicare-0.3d7/build'

make again outputs:

make[2]: Entering directory `/home/andy/Tmp/vicare-0.3d7/build/scheme'
VICARE_SRC_DIR=../../scheme                     \
  VICARE_BUILD_DIR=.                            \
  VICARE_LIBRARY_PATH=.:../../scheme:../../scheme/../lib:./../lib               \
   ../src/vicare -b ../../scheme/vicare.boot.4.prebuilt \
   --r6rs-script ../../scheme/makefile.sps
make[2]: *** [vicare.boot] Segmentation fault
make[2]: Leaving directory `/home/andy/Tmp/vicare-0.3d7/build/scheme'

marcomaggi commented 10 years ago

Thanks for the report. I will look into it this week.

marcomaggi commented 10 years ago

Sorry for the delay. I have screwed up between tag before-rotating-boot-image-2013-09-19 and tag after-rotating-boot-image-2013-09-19; release 0.3d4 should work on 32-bit platforms. I have to replay all the commits, and it will take some time to find time to do everything needed.

AndySpider commented 10 years ago

Thanks for your reply. Forgot to mention that my opensuse is 64bit, and now I found that I can't compile it on my 64bit ubuntu 12.04 either. Seems it's the common problem related to 64bits platform? I don't have a 32bit version at hand, but I'll try it later.

marcomaggi commented 10 years ago

I am currently developing it on a Slackware Linux 64-bit with no problems. From the log you posted it seems Automake's config.guess script detected a i686-pc-linux-gnu which is weird for a 64-bit Linux; on my system I get x86_64-unknown-linux-gnu; also the wordsize is determined as AC_CHECK_SIZEOF(void *) by configure and it results in 4 on your system. Do you have a 64-bit computer with a 32-bit Linux installed?

AndySpider commented 10 years ago

Yeah, my desktop is 64-bit with a 32-bit Opensuse installed, which prompt the above errors when compiling.

Now I have successfully installed it on my laptop which is a Ubuntu 12.04 64bit. But during the compiling, it's very cpu and memory consuming (100% which is obviously abnormal!) . it seems like there is sth wrong with the doc stuff regarding the output:

  make[1]: Entering directory `/home/andy/Repos/vicare/build/doc'
restore=: && backupdir=".am$$" && \
        am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd ../../doc && \
        rm -rf $backupdir && mkdir $backupdir && \
        if (/bin/bash /home/andy/Repos/vicare/autotools/missing --run makeinfo --version) >/dev/null 2>&1; then \
          for f in ../../doc/vicare-libs.info ../../doc/vicare-libs.info-[0-9] ../../doc/vicare-libs.info-[0-9][0-9] ../../doc/vicare-libs.i[0-9] ../../doc/vicare-libs.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/bash /home/andy/Repos/vicare/autotools/missing --run makeinfo   -I ../../doc \
         -o ../../doc/vicare-libs.info ../../doc/vicare-libs.texi; \
        then \
          rc=0; \
          CDPATH="${ZSH_VERSION+.}:" && cd ../../doc; \
        else \
          rc=$?; \
          CDPATH="${ZSH_VERSION+.}:" && cd ../../doc && \
          $restore $backupdir/* `echo "./../../doc/vicare-libs.info" | sed 's|[^/]*$||'`; \
        fi; \
        rm -rf $backupdir; exit $rc
../../doc/vicare-libs.texi:7: @include `version-libs.texi': No such file or directory.
../../doc/vicare-libs.texi:157: warning: undefined flag: VERSION.
../../doc/vicare-libs.texi:195: warning: undefined flag: VERSION.
makeinfo: Removing output file `../../doc/vicare-libs.info' due to errors; use --force to preserve.
make[1]: *** [../../doc/vicare-libs.info] Error 1
make[1]: Leaving directory `/home/andy/Repos/vicare/build/doc'
make: *** [install-recursive] Error 1

Despite the error, I then run make install, and vicare is installed and works.

marcomaggi commented 10 years ago

I have checked the tarball for release 0.3d7, and all the required files version-*.texi are there. If you are building from a repository checkout, as the README file says, you must configure with:

$ configure --enable-maintainer-mode ...
AndySpider commented 10 years ago

It works, thanks! Back to the original problem, how to compile it on my 32bit Opensuse?

marcomaggi commented 10 years ago

Before the end of the year I plan to upgrade my Slackware 64-bit installation, and also install the 32-bit packages needed to create a 32-bit "subsystem". This way I should be able to compile for both 32-bit and 64-bit on my faster computer. After that I will fix the 32-bit boot image in the repository. Unless everything goes incredibly smooth, it will take some days.

marcomaggi commented 10 years ago

I have pushed a branch https://github.com/marcomaggi/vicare/tree/support-for-32-bit.marcomaggi-2013-12-27 which should fix the problem. Can you test it before I merge it into the devel branch?

AndySpider commented 10 years ago

Good job, it works!

marcomaggi commented 10 years ago

Thank you for trying it!