[plt-scheme] NetBSD, extensions, and underscores

From: Jed Davis (jdev at panix.com)
Date: Thu Mar 9 04:12:12 EST 2006

[Anyone who isn't trying to run the PLT suite on NetBSD and doesn't want
to hear about symbol tables can safely skip this message, I think.]

NetBSD doesn't prefix global symbols with underscores when using ELF
(as opposed to a.out); on the i386 port, this means "since 1.5, which
was released over 5 years ago".  Thus, in order for native-code
extensions (is that the right term?) to work, something like the
very small patch attached below is needed.

But, in order for extension-loading to get even that far, the
configure script has to be run with --enable-shared, as otherwise the
mzscheme executable isn't linked with -E and thus important-sounding
symbols like "scheme_make_prim_w_arity" and "scheme_intern_symbol"
don't get exported therefrom for use by loaded objects, which thus
don't load.

So, if I do those things (and raise the datasize limit -- for those
unfamiliar, I suggest "unlimit datasize" or "ulimit -d `ulimit -Hd`",
depending on shell), the install process completes normally.

This may also apply to OpenBSD, if it's having similar problems.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plt-underscore.diff
Type: text/x-patch
Size: 362 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20060309/c4573e04/attachment.bin>
-------------- next part --------------

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))

Posted on the users mailing list.