[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] New user question - more explicit information concerning sha

From: Jordan Rosenthal
Subject: [Gcl-devel] New user question - more explicit information concerning shared library use
Date: Thu, 05 May 2005 08:55:01 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MITLL

Hi all,

We have a fairly large codebase for image processing that was developed on top of an older version of GCL (it is currently running on top of 2.4.4). Here's a little bit of info about what we're running

- Linux OS (although we had a version on Solaris)
- GCL 2.4.4
- extensive use of the GCL to TCL/TK 8.4 link
- On top of the TCL/TK we have built the BLT library extension (this does not affect the GCL build directly) and a custom TK extension - Our system loads in a bunch of compiled files on top of GCL and does a si::save to create a new image

One of the biggest annoyances I have with our system is that it is really painful to use external C and LISP libraries. For C libraries, we have been using the EXTRAS make variable to link in certain symbols, but this is not fun to do. External LISP libraries never seem to work out of the box, because most of them are dependent on some of the newer ANSI features (e.g., objects don't exists in GCL 2.4.4).

Lo and behold, I've recently out found that newer versions of GCL are being worked on by the group reading this email! It is moving towards ANSI compliance and apparently has the ability to link to shared libraries with the compiler::link command. (I have also seen posts regarding the gcl-elf-loader that can do this at runtime.)

I downloaded GCL 2.6.6 and have compiled without any (major) issues. However, I am having trouble with a few things in the new version:

1) There are a bunch of configure options to get dynamic loading of compiled files (e.g., static bfd, local bfd, dynamic bfd, dlopen, etc). Which is the preferred method? Currently, I am using the dynamic bfd (i.e., the shared bfd libraries on my system). Also, how does the gcl-elf-loader fit into the picture?

2) How do I use the compiler::link command? The syntax is straight-forward, but whenever I do it I get errors. I have tried both using and not using the system-p key, but in either case I get some sort of error. In one case (I can't remember which) I get a "cannot relocate" error. In the other case I get a "multiple instances of init_code defined" error.

I think my problems most likely stem from a lack of understanding about how GCL works internally, especially in regard to dynamic loading of object files. Also, I've only been using LISP (the GCL 2.4.4 variety) for a little while now so sometimes that can be a little bit of a block.

If anyone could give me a brief tutorial (or point me to some reading material) on how this stuff works, I'd really appreciate it. I've reversed engineered some of the code, but that is slow going and some sort of overview would be much appreciated.

Perhaps if it is simpler, we could work with a toy problem. Let's say I have an external shared library...maybe the BLAS numerical library or the libxml2 library on Linux. How do I create an image that let's me link to all the symbol's in these (shared) libraries from a clines construct later on?

Any help will be much appreciated.


Jordan Rosenthal

PS I also noticed a gcl-users mailing list, but I didn't post there because it seems to have very little activity. If the gcl-devel list is not the right place to post this question, just let me know and I'll move this discussion to the gcl-users list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]