configure option to link ikarus with libpthread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Medium
|
Abdulaziz Ghuloum |
Bug Description
Altough Ikarus doesn't use POSIX threads (yet), it might make sense to provide a configure option to link it against libpthread; I ran across this issue while hacking on sbank, which makes use of dlopen from (ikarus foreign) to load third-party shared libraries into the Ikarus process.
These shared libraries may in turn be linked against libpthread, which is a problem on several platforms, as (I can't really verify this, because I have no access to a e.g. a *BSD) threaded code can only be loaded into programs that are linked against libpthread, either directly, or via some other library. I was pointed to this issue in http://
This is apparenly not a problem on Linux, though even on Linux it leads to spurious GDB errors when doing a dlopen on a libpthread-linked library from Ikarus:
(gdb) r
Starting program: /home/rotty/
Ikarus Scheme version 0.0.3+ (revision 1695, build 2008-11-29, 64-bit)
Copyright (c) 2006-2008 Abdulaziz Ghuloum
> (import (ikarus foreign))
> (dlopen "libgthread-
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find new threads: generic error
(gdb) c
>
Related branches
Changed in ikarus: | |
assignee: | nobody → Abdulaziz Ghuloum (aghuloum) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Do you only need to link it with pthread/gthread or would I need to do something more?
Wouldn't doing ./configure LDFLAGS="-lgthread" be sufficient?