﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1433	Static egg linkling seems to be broken	felix winkelmann		"Compiling this with `srfi-1` egg installed attempts to load a shared library and fails

{{{
(import srfi-1)
}}}

With `csc -static x.scm -kv -debug 2:

{{{
'/home/felix/chicken/chicken-5-master/bin/chicken' 'x.scm' -output-file 'x.c' -static -verbose -debug 2 -emit-link-file x.link

Note: re-importing already imported identifier: assoc

Note: re-importing already imported identifier: member
[canonicalized]
(##core#callunit library)

(##core#callunit eval)

(##core#callunit expand)

(##core#callunit srfi-1)

(##core#undefined)

(##core#undefined)

(##core#undefined)

(scheme#eval '(import-for-syntax scheme chicken.base chicken.syntax))

(scheme#eval '(import scheme chicken.base chicken.syntax))

(##core#undefined)

(scheme#newline)

((chicken.base#implicit-exit-handler))

'gcc' 'x.c' -o 'x.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -g -Wall -Wno-unused -I/home/felix/chicken/chicken-5-master/include/chicken
'gcc' 'x.o' '/home/felix/chicken/chicken-5-master/lib/chicken/9/srfi-1.o' -o 'x' -L/home/felix/chicken/chicken-5-master/lib  -Wl,-R'/home/felix/chicken/chicken-5-master/lib' /home/felix/chicken/chicken-5-master/lib/libchicken.a -lm -ldl
[debug] application startup...
[debug] heap resized to 1048576 bytes
[debug] stack bottom is 0x7fff624cffd0.
[debug] entering toplevel...
[debug] entering library...
[debug] entering build-version...
[debug] entering eval...
[debug] entering chicken-syntax...
[debug] entering expand...
[debug] entering internal...
[debug] entering modules...
[debug] entering srfi-1...
; loading /home/felix/chicken/chicken-5-master/lib/chicken/9/chicken.import.so ...

Error: (load) during expansion of (import-syntax ...) - unable to load compiled module - cannot load compiled code dynamically - this is a statically linked executable: ""/home/felix/chicken/chicken-5-master/lib/chicken/9/chicken.import.so""

	Call history:

	<syntax>	  (import scheme chicken.base chicken.syntax)
	<syntax>	  (##core#begin (##core#require library scheme#) (##core#require library chicken.base#) (##core#requir...
	<syntax>	  (##core#require library scheme#)
	<syntax>	  (##sys#load-library (##core#quote library))
	<syntax>	  (##core#quote library)
	<syntax>	  (##core#require library chicken.base#)
	<syntax>	  (##sys#load-library (##core#quote library))
	<syntax>	  (##core#quote library)
	<syntax>	  (##core#begin (##core#require expand chicken.syntax#))
	<syntax>	  (##core#require expand chicken.syntax#)
	<syntax>	  (##sys#load-library (##core#quote expand))
	<syntax>	  (##core#quote expand)
	<eval>	  (##sys#load-library (##core#quote library))
	<eval>	  (##sys#load-library (##core#quote library))
	<eval>	  (##sys#load-library (##core#quote expand))
	<syntax>	  (import-syntax (except scheme member assoc) chicken)	<--
␄
}}}
"	defect	closed	critical	5.0	core libraries	5.0.0	worksforme		sjamaan	medium
