Ticket #520 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

Dev snapshots not built correctly through bootstrap compiler

Reported by: iraikov Owned by:
Priority: major Milestone:
Component: compiler Version: 4.6.x
Keywords: srfi-13 Cc:

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

  Changed 2 years ago by sjamaan

  • status changed from new to closed
  • resolution set to invalid

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.

  Changed 2 years ago by sjamaan

See also #467, #463 and #461

  Changed 2 years ago by iraikov

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

  Changed 2 years ago by sjamaan

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

  Changed 2 years ago by iraikov

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.

  Changed 2 years ago by sjamaan

  • status changed from closed to reopened
  • resolution invalid deleted
  • summary changed from Undefined symbol in silex to Dev snapshots not built correctly through bootstrap compiler

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

follow-up: ↓ 9   Changed 2 years ago by mario

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.

  Changed 2 years ago by mario

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)

in reply to: ↑ 7   Changed 2 years ago by iraikov

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.

  Changed 2 years ago by felix

  • milestone 4.7.0 deleted

  Changed 2 years ago by iraikov

  • status changed from reopened to closed
  • resolution set to worksforme

The 4.6.7 snapshot works for me.

Note: See TracTickets for help on using tickets.