Opened 14 years ago

Closed 14 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 14 years ago by sjamaan

Resolution: invalid
Status: newclosed

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.

comment:2 Changed 14 years ago by sjamaan

See also #467, #463 and #461

comment:3 Changed 14 years ago by Ivan Raikov

Ok, does this mean that the development snapshot script needs to be changed so that it bootstraps the build properly?

comment:4 Changed 14 years ago by sjamaan

I believe it already does this properly. How did you build your Chicken, and your eggs?

comment:5 Changed 14 years ago by Ivan Raikov

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 14 years ago by sjamaan

Resolution: invalid
Status: closedreopened
Summary: Undefined symbol in silexDev snapshots not built correctly through bootstrap compiler

hm, that sounds serious. I'll ask Mario to have a look at this.

comment:7 Changed 14 years ago by Mario Domenech Goulart

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 (no csi, chicken, csc nor chicken-install in PATH; no libchicken.* in /usr/lib nor /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 14 years ago by Mario Domenech Goulart

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 in reply to:  7 Changed 14 years ago by Ivan Raikov

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 14 years ago by felix winkelmann

Milestone: 4.7.0

comment:11 Changed 14 years ago by Ivan Raikov

Resolution: worksforme
Status: reopenedclosed

The 4.6.7 snapshot works for me.

Note: See TracTickets for help on using tickets.