Hello all,

I have two requests to make here, and I hope that at least the second
request will receive something of a favourable reply.

To begin, I am working to port over scheme48 for OpenBSD for my own
personal use, and the ports "works," so far. Enough that most of the
things necessary to post it up are done. The problem is that I don't
run -current. I'm well aware of the rules that I must be running
-current if I want to submit a port; I just can't do that right now
(stability). Instead, I was wondering if there is someone who would be
willing to pick up moving the port to -current for me? The software
itself is very self-contained and minimal. I have attached what I have
thus far, and if someone is willing to work with me on testing and
fixing it, I would greatly appreciate it.

Second, there is one known bug in this port so far. It is causing
me no end in my headaches. 

Basically, Scheme allows external C libraries to access the
scheme48vm's internal C structures through a scheme48.h header
file. One such program (http://magic.xmog.com) is using a postgresql.c
wrapper file to provide special wrappers to my Scheme programs. In
doing so, it utilizes some of the internal structures (functions,
variables, etc.) declared in scheme48.h. 

However, when I load this software (further instructions on
reproducing the exact error are below), and run the proper commands,
the program faults out (segfault) giving me errors that it cannot find
the functions internal to scheme48vm (the virtual machine which loads
the postgresql.so wrapper library in Magic). Learning about stripping
from the ports docs, I thought perhaps the stripped executable was not
able to reference its own functions when they were called from an
external library. I supposed that removing the stripping from the
executable might solve my problem. Doing so, I verified that the
necessary functions were indeed inside the vm, and then I tried
again. Still, I had no luck, and the same error occurs. :-(

I am now at a loss as to what might be special about OpenBSD (this
works in Slackware 10.2) that would result in a program being unable
to locate its own functions. I hope that submitting this problem to
the OpenBSD porting gurus will result in some hidden knowledge being
released, as I was unable to find any porting troubles related to my
topic being mentioned anywhere on any of the searchable mailing lists
of NetBSD or FreeBSD, both of which have ports of Scheme48. In
addition, a general search and request to IRC and search engines
reveals nothing.

What could be causing this problem?

REPRODUCING SEGFAULT ERROR IN SCHEME48

To duplicate the problem, one can use this port to install scheme48,
then, get a copy of Magic from (http://magic.xmog.com) and install it
to some directory. Please then install the error_stuff.tar.gz package
to the Magic directory. After doing so, enter the Magic directory and

$ cd c
$ cp ../error_stuff/Makefile .
$ make

This will make and install the postgresql.so file into magic_dir/lib.

$ cd magic_dir
$ scheme48
[you will see the scheme48 prompt, represented as ">"]
> ,config ,load packages.scm
> ,config ,load error_stuff/packages.scm
> ,in application

>From this you should receive the following output:

/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_pop_gc_rootsB'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_enter_integer'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_stob_ref'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_stob_has_type'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_extract_byte_vector'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_make_vector'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_enter_string'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_call_scheme'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_stob_set'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_extract_string'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_enter_byte_vector'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_define_exported_binding'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_raise_scheme_exception'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_enter_pointer'
/usr/local/lib/scheme48/scheme48vm:lib/postgresql.so: undefined symbol 
's48_push_gc_rootsB'
Segmentation fault (core dumped) 


-- 
Aaron Hsu <[EMAIL PROTECTED]> 
<http://www.aaronhsu.com> 
XMPP/Jabber/GTalk: [EMAIL PROTECTED] | ICQ: 153114301
AIM/Yahoo: NoorahAbeer | MSN: [EMAIL PROTECTED]

Attachment: error_stuff.tar.gz
Description: application/tar-gz

Attachment: scheme48.tar.gz
Description: application/tar-gz

Reply via email to