Error while compiling Racket BC

29 views
Skip to first unread message

Killian Zhuo (KDr2)

unread,
Feb 5, 2021, 6:44:34 PM2/5/21
to Racket Users
Here is my configure command:

./configure --enable-cs --enable-bc --enable-csdefault --enable-racket=$HOME/programs/racket/bin/racket

$HOME/programs/racket/bin/racket is a prebuilt Racket whose version is 7.9.

Then I ran `make cs` and `make install-cs`, all worked well.

Then `make bc` it also worked well, but when I ran `make install-bc`, some errors occured:

make[4]: Entering directory '/data/zhuoql/Work/hall/racket/racket/src/bc'
if [ "" = "" ]; then \
  echo "/data/zhuoql/Work/hall/racket/racket/lib"; \
fi
/data/zhuoql/Work/hall/racket/racket/lib
make[4]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/bc'
make[3]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src'
make[2]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src'
cd bc && make install-setup-3m SELF_ROOT_CONFIG_FLAG="-Z" PLT_SETUP_OPTIONS="" SETUP_MACHINE_FLAGS=""
make[2]: Entering directory '/data/zhuoql/Work/hall/racket/racket/src/bc'
/data/zhuoql/programs/racket/bin/racket -X "/data/zhuoql/Work/hall/racket/racket/collects" -G "/data/zhuoql/Work/hall/racket/racket/etc"  -Z ../../../../build/config  --no-user-path -N "raco" -l- setup --no-user
raco setup: bootstrapping from source...
 read-compiled-linklet: version mismatch  expected: "7.9"  found: "8.0.0.5"  in: /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/compiled/cm-minimal_rkt.zo
/data/zhuoql/Work/hall/racket/racket/collects/racket/fixnum.rkt:12:9: provide: provided identifier is not defined or required
  at: fx+/wraparound
  in: (#%provide (expand (provide-trampoline fx->fl fl->fx fxabs fx+ fx- fx* fx+/wraparound fx-/wraparound fx*/wraparound fxquotient fxremainder fxmodulo fxand fxior fxxor fxnot fxrshift fxlshift fxlshift/wraparound fx>= fx> fx= fx< fx<= fxmin fxmax fixnum-fo...
  location...:
   /data/zhuoql/Work/hall/racket/racket/collects/racket/fixnum.rkt:12:9
  context...:
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:610:0: compile-zo*
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:409:15
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:374:0: maybe-compile-zo
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:208:0: compile-root
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:144:4: compilation-manager-load-handler
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:610:0: compile-zo*
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:409:15
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:374:0: maybe-compile-zo
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:208:0: compile-root
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:144:4: compilation-manager-load-handler
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:610:0: compile-zo*
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:409:15
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:374:0: maybe-compile-zo
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:208:0: compile-root
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:144:4: compilation-manager-load-handler
   /data/zhuoql/Work/hall/racket/racket/collects/compiler/private/cm-minimal.rkt:610:0: compile-zo*
   ...
Makefile:469: recipe for target 'install-setup-3m' failed
make[2]: *** [install-setup-3m] Error 1
make[2]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/bc'
Makefile:179: recipe for target 'install-3m' failed
make[1]: *** [install-3m] Error 2
make[1]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src'
Makefile:114: recipe for target 'install-bc' failed
make: *** [install-bc] Error 2



I worked on the head of the master branch, anyone knows how to fix this? Thanks.

Greetings.

Killian Zhuo (KDr2, https://kdr2.com)

Sam Tobin-Hochstadt

unread,
Feb 5, 2021, 6:47:42 PM2/5/21
to Killian Zhuo (KDr2), Racket Users
This means that you're building with a previous version of Racket that is too old (which might be quite recent but is nonetheless too old to use in place of bootstrapping). 

Sam

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/252652007.2153435.1612568669639%40mail.yahoo.com.

Killian Zhuo (KDr2)

unread,
Feb 5, 2021, 6:52:35 PM2/5/21
to Sam Tobin-Hochstadt, Racket Users
Thank you, does that mean I need a v8.0.0.5 to compile a v8.0.0.5?

I thought v7.9 is new enough...

Greetings.

Killian Zhuo (KDr2, https://kdr2.com)

Sam Tobin-Hochstadt

unread,
Feb 5, 2021, 6:54:01 PM2/5/21
to Killian Zhuo (KDr2), Racket Users
In general, yes, although you can often get away with slightly older. 

Shu-Hung You

unread,
Feb 5, 2021, 6:58:09 PM2/5/21
to Killian Zhuo (KDr2), Sam Tobin-Hochstadt, Racket Users
The snapshot build here may help: https://snapshot.racket-lang.org/

The HEAD version could add new internal primitives from time to time.

Shu-Hung

On Fri, Feb 5, 2021 at 5:52 PM 'Killian Zhuo (KDr2)' via Racket Users
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/120349817.2158523.1612569152021%40mail.yahoo.com.

Matthew Flatt

unread,
Feb 5, 2021, 7:00:52 PM2/5/21
to Killian Zhuo (KDr2), Racket Users
Maybe I missed some context, but why are you using `--enable-racket`?
Normally, with a Git checkout, you'd just use `make cs` and/or `make
bc` in the root directory.

Using `--enable-racket` is mostly for cross compilation.
> https://groups.google.com/d/msgid/racket-users/120349817.2158523.1612569152021%4
> 0mail.yahoo.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to racket-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAMTzy%2BbzwyqxPqoyWwsaYM0shbmWxk
> 03D4M-nbP1xom8730Wqg%40mail.gmail.com.

Killian Zhuo (KDr2)

unread,
Feb 5, 2021, 8:04:01 PM2/5/21
to Matthew Flatt, Racket Users
Hi, I use `--enable-racket=` because that I found that without it I can't build Racket CS:

I ran 

```
 ./configure --enable-cs --enable-bc --enable-csdefault
make 
make install
```

After that only racketbc is built and installed, then I ran `make cs` to built CS explicitly, and error occurs:

...
mkdir -p ChezScheme
if [ "./raw_racketcs" != "./raw_racketcs" ] ; \
          then make scheme-via-rktboot BOOTFILE_RACKET="./raw_racketcs" ; \
          else make scheme-via-pb ; fi
make[4]: Entering directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
/bin/sh ./check_boot.sh ta6le "./../../ChezScheme" ChezScheme
if [ -f boot_pending ] ; then make pb-bootquick ; fi
make[5]: Entering directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
make config-scheme MACH=pb CONFIG_SCHEME_MODE=--pb
make[6]: Entering directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
cd ChezScheme && ".././../../ChezScheme"/configure --pb --machine=ta6le --disable-x11 --disable-curses --disable-auto-flags --enable-warning-flags  CC="gcc" CFLAGS="-g -O2 -Wall  -DELF_FIND_BOOT_SECTION  -pthread" LDFLAGS="-pthread" LIBS="-ldl -lm  -lrt" AR="ar" ARFLAGS="rc" RANLIB="ranlib" WINDRES="windres"
No suitable machine type found in "boot".

Available machine types:


Since no directory in "boot" exists for pb, you can try
using Racket v7.1 or later with
  racket rktboot/main.rkt --machine pb
to create the boot files, and then try .././../../ChezScheme/configure again.
Makefile:164: recipe for target 'config-scheme' failed
make[6]: *** [config-scheme] Error 1
make[6]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
Makefile:147: recipe for target 'pb-bootquick' failed
make[5]: *** [pb-bootquick] Error 2
make[5]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
Makefile:142: recipe for target 'scheme-via-pb' failed
make[4]: *** [scheme-via-pb] Error 2
make[4]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
Makefile:126: recipe for target 'scheme' failed
make[3]: *** [scheme] Error 2
make[3]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
Makefile:81: recipe for target 'cs' failed
make[2]: *** [cs] Error 2
make[2]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src/cs/c'
Makefile:76: recipe for target 'racketcs' failed
make[1]: *** [racketcs] Error 2
make[1]: Leaving directory '/data/zhuoql/Work/hall/racket/racket/src'
Makefile:83: recipe for target 'cs' failed
make: *** [cs] Error 2




Greetings.

Killian Zhuo (KDr2, https://kdr2.com)

> email to racket-users+unsub...@googlegroups.com.

> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/252652007.2153435.1612568669639%4
> 0mail.yahoo.com.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsub...@googlegroups.com.

> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/120349817.2158523.1612569152021%4
> 0mail.yahoo.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to racket-users+unsub...@googlegroups.com.

> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAMTzy%2BbzwyqxPqoyWwsaYM0shbmWxk
> 03D4M-nbP1xom8730Wqg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsub...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20210205170048.2bc%40sirmail.smtps.cs.utah.edu.

Matthew Flatt

unread,
Feb 5, 2021, 9:32:20 PM2/5/21
to Killian Zhuo (KDr2), Racket Users
At Sat, 6 Feb 2021 01:03:54 +0000 (UTC), "Killian Zhuo (KDr2)" wrote:
> Hi, I use `--enable-racket=` because that I found that without it I can't build
> Racket CS:
> I ran 
> ``` ./configure --enable-cs --enable-bc --enable-csdefault
> make make install```

True --- that won't work. The Git repo is not set up to work with
`configure`, etc., out of the box.

But a plain `make` in the top-level directory of the Git repo will sort
out the needed bootstrapping automatically. Just use `make` at the top
of the repo --- I'm pretty sure that's what you'll want to do.


For more information, see "build.md" at the top of the repo:

https://github.com/racket/racket/blob/master/build.md#1-building-racket-from-source

As it says there, another possibility is to get a source distribution,
and that will work in the `configure`, etc., way that you expect.


Hope that helps,
Matthew

Killian Zhuo (KDr2)

unread,
Feb 6, 2021, 1:50:25 AM2/6/21
to Matthew Flatt, Racket Users
Thank you for the reply, it helped me a lot.

I was following https://github.com/racket/racket/blob/master/racket/src/README.txt to build a minimal racket (both bc and cs), and now I found out a way to do that:

in `racket/src` directory:


       ./configure --enable-cs --enable-bc --enable-csdefault
       make bc
       make install-bc

this will build racket bc in `../bin`. 
notice here if we run `make && make install` (i.e. without the bc words), it will still build racket bc but not racket cs.

then we run

       ./configure --enable-cs --enable-bc --enable-csdefault \
                   --enable-racket=../bin/racketbc
       make cs
       make install-cs


this will build and install racket cs in `../bin`.

So I think the document about this is not such accurate.

Greetings.

Killian Zhuo (KDr2, https://kdr2.com)


Matthew

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages