Opened 15 years ago
Closed 15 years ago
#520 closed defect (worksforme)
Dev snapshots not built correctly through bootstrap compiler
| Reported by: | Ivan Raikov | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | compiler | Version: | 4.6.x |
| Keywords: | srfi-13 | Cc: | |
| Estimated difficulty: |
Description
The silex egg compiles fine with Chicken 4.6.5, but upon attempting to use it, the following error occurs:
(use silex)
csi: symbol lookup error: /Users/ivan/bin/chicken/lib/chicken/6/silex.so: undefined symbol: C_srfi_2d13_toplevel
silex works with Chicken 4.6.0, so I am guessing this is an issue with the compiler.
Change History (11)
comment:1 Changed 15 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:3 Changed 15 years ago by
Ok, does this mean that the development snapshot script needs to be changed so that it bootstraps the build properly?
comment:4 Changed 15 years ago by
I believe it already does this properly. How did you build your Chicken, and your eggs?
comment:5 Changed 15 years ago by
I thought so too. I simply downloaded the development snapshot tarball from the website, and built it with
`make PLATFORM=linux PREFIX=$HOME/bin/chicken'.
Then $HOME/bin/chicken/bin/chicken-install silex, as usual.
I just double checked to make sure I don't have some old Chicken lying around, but I can indeed confirm that I have removed all old copies of Chicken prior to the steps above.
comment:6 Changed 15 years ago by
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
| Summary: | Undefined symbol in silex → Dev snapshots not built correctly through bootstrap compiler |
hm, that sounds serious. I'll ask Mario to have a look at this.
comment:7 follow-up: 9 Changed 15 years ago by
Hi,
Unfortunately I cannot reproduce the problem here.
Here's what I did:
- downloaded http://code.call-cc.org/dev-snapshots/2011/02/09/chicken-4.6.5.tar.gz
- built it with
make PLATFORM=linux PREFIX=/home/mario/chicken-4.6.5 install(nocsi,chicken,cscnorchicken-installinPATH; nolibchicken.*in/usr/libnor/usr/local/lib). - installed silex using
/home/mario/chicken-4.6.5/bin/chicken-install silex - tried it with
(use silex):
$ /home/mario/chicken-4.6.5/bin/csi -n CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.6.5 linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2011-03-09 on mario (Linux) #;1> (use silex) ; loading /home/mario/chicken-4.6.5/lib/chicken/6/silex.import.so ... ; loading /home/mario/chicken-4.6.5/lib/chicken/6/scheme.import.so ... ; loading /home/mario/chicken-4.6.5/lib/chicken/6/srfi-13.import.so ... ; loading /home/mario/chicken-4.6.5/lib/chicken/6/silex.so ... #;2>
No error.
Are those steps correct?
Can anybody else reproduce the problem?
Regarding to the dev-snapshots tarballs, the script which generates the tarballs (release/dev-snapshot.sh, from the chicken-infrastructure repo) performs the bootstrap step and generates the C files using the compiler generated by the bootstrap process. Here's the relevant snippet from the script:
### generate the source snapshot cd $tmpdir/chicken-core touch *.scm make PLATFORM=linux CHICKEN=$chicken boot-chicken touch *.scm make PLATFORM=linux CHICKEN=./chicken-boot spotless all $csi -s scripts/makedist.scm PLATFORM=linux CHICKEN=./chicken-boot
$chicken and $csi are 4.6.0rc1.
comment:8 Changed 15 years ago by
Here's the ldd output for silex.so:
$ ldd /home/mario/chicken-4.6.5/lib/chicken/6/silex.so
linux-gate.so.1 => (0xb7f7a000)
libchicken.so.6 => /home/mario/chicken-4.6.5/lib/libchicken.so.6 (0xb7bc7000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7b89000)
libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7b84000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7a29000)
/lib/ld-linux.so.2 (0xb7f7b000)
comment:9 Changed 15 years ago by
The steps are correct, thanks for trying to reproduce this. I will try it myself again tonight, maybe somehow I clobbered or regenerated the tarball improperly.
Replying to mario:
Hi,
Unfortunately I cannot reproduce the problem here.
comment:10 Changed 15 years ago by
| Milestone: | 4.7.0 |
|---|
comment:11 Changed 15 years ago by
| Resolution: | → worksforme |
|---|---|
| Status: | reopened → closed |
The 4.6.7 snapshot works for me.

This is a known problem if you've built Chicken using an older Chicken; the toplevel C function naming convention has changed, and the new chicken is expecting the function in the new convention, but you've compiled srfi-13 with the old chicken, which generated it using the old convention.
You can either build your Chicken one more time using the *new* Chicken, or use the bootstrap process described in the README.