Subject: Re: shared object problem
To: None <ross@teraflop.com>
From: Arne Henrik Juul <arnej@stud.math.ntnu.no>
List: port-alpha
Date: 07/26/1998 03:20:37
Ross Harvey <ross@teraflop.com> writes:
> With a slight command adjustment, it works for me. You just have to get
> the magic incantation right.  And be careful, mispronouncing the spells
> can get you turned into a frog or something. :-)

Yes, that worked!  And I haven't turned into a frog yet :-)

> It would be cool if the entire problem with dynamic programs was this
> simple.

yes :-)  I now have a perl 5.004_04 with dynamic modules and it seems
to work OK, I just need to clean up the mess I made in the source
tree, rebuild, test, and then I'll hopefully have a clean patch.
If anyone is very impatient here's the relevant snippet from the
hints/netbsd.sh file, which may be enough, but no guarantees etc...
        pmax)
                d_dlopen=$define
                d_dlerror=$define
                cccdlflags="-DPIC -fPIC $cccdlflags"
                ccdlflags=-Wl,--export-dynamic
                lddlflags="-x -shared $lddlflags"
                ;;

> 	cc -Wl,--export-dynamic main.c -o main

is this option expected to be necessary?  I guess it's all right since
there are few programs wanting to actually link shared modules against
the main program's symbols (I can't think of anyone besides perl).  I
can certainly live with it for now.

> (For testing it doesn't matter, but to install this successfully note that
> the script needs a -rpath and a -soname also.)

yes, of course, I just wanted the minimal test case... maybe this
should be a regress test case also?  I'll look at send-pr'ing at
least the cerror testcase on Monday, Jonathan.  (I should be in bed
already but just had to check this out :-).

  -  Arne H. J.