[Ecls-list] non monolithic :dll builds fail on linking to program

Seth Burleigh seth at tewebs.com
Sat Jun 19 21:59:07 UTC 2010

Im building this with the command gcc test-meta.c -lecl -lmeta

#include <ecl/ecl.h>

void init_lib_META(cl_object);
int main(int argc, char **argv)  {
  cl_boot(argc, argv);
  cl_object obj=c_string_to_object("\"Hello world\"");

I have made meta into a .so file (note that in my ecl build, i do not
have support for dffi because for some reason, even though it is there,
it cant find ffi/ff.h during configure)

So, when i run it, i get:

FRAME-STACK overflow at size 2304. Stack can probably be resized.
Available restarts:

1. (CONTINUE) Extend stack size

Broken at NIL. In: #<process SI:TOP-LEVEL 088aefc0>.

Now, if i instead make meta into a static library (libmeta.a) using the
below command it succeeds just fine. 
(asdf:make-build :meta :type :lib :move-here "~/devel/")

However, if i build the .so file with :monolithic t , everything works
fine if i change above code to initialize lib_META_MONO.

(asdf:make-build :meta :type :dll :monolithic t :move-here "~/devel/")
The static library works either way, monolithic doesn't matter there. 

I would prefer  to keep the .so file non monolithic for later on when it
will depend on large libraries.

Here is the test code:

(in-package :meta)
(defun add (a b)
  (+ a b))

(defsystem :meta
    :serial t
    ((:file "package")
     (:file "meta"))

(defpackage :meta (:use :cl))

More information about the ecl-devel mailing list