On Mon, 9 Sep 2002, H.Merijn Brand wrote:
[HP-UX 11.00, GNU gcc-3.2]
> > cd languages/perl6
> > make
>
> For gcc (which was the last I used) I got :(
>
> /usr/bin/ld -o imcc imcparser.o imclexer.o imc.o stacks.o symreg.o instructions.o
>cfg.o sets.o debug.o anyop.o ../../platform.o -lcl -lpthread -lnsl -lnm -lmalloc
>-ldld -lm -lndir -lcrypt -lsec
(My fault. imcc needs to be built with $(LINK), not $(LD). I'll send a
patch separately.)
> /usr/bin/ld -shared -L/usr/local/lib -o blib/lib/libparrot.so exceptions.o
>global_setup.o interpreter.o parrot.o register.o core_ops.o core_ops_prederef.o
>memory.o packfile.o stacks.o string.o sub.o encoding.o chartype.o runops_cores.o
>trace.o pmc.o key.o hash.o core_pmcs.o platform.o resources.o rx.o rxstacks.o
>intlist.o embed.o warnings.o misc.o core_ops_cg.o packout.o byteorder.o debug.o
>smallobject.o headers.o dod.o method_util.o io/io.o io/io_buf.o io/io_unix.o
>io/io_win32.o io/io_stdio.o classes/array.o classes/boolean.o classes/continuation.o
>classes/coroutine.o classes/csub.o classes/default.o classes/intlist.o
>classes/intqueue.o classes/key.o classes/multiarray.o classes/perlarray.o
>classes/perlhash.o classes/perlint.o classes/perlnum.o classes/perlstring.o
>classes/perlundef.o classes/pointer.o classes/sub.o encodings/singlebyte.o
>encodings/utf8.o encodings/utf16.o encodings/utf32.o chartypes/unicode.o
>chartypes/usascii.o -lcl -lpthread -lnsl -lnm -lmalloc -ldld!
-!
> lm -lndir -lcrypt -lsec
> /usr/bin/ld: (Warning) Can't hide symbol "ared"
> /usr/bin/ld: Unsatisfied symbols:
> memset (first referenced in interpreter.o) (code)
> __ftello64 (first referenced in exceptions.o) (code)
> strerror (first referenced in core_ops.o) (code)
> memcpy (first referenced in register.o) (code)
> abort (first referenced in core_ops.o) (code)
> :
> :
> :
> Again, my fingers have to do the right thing:
Soon, parrot will use perl5's $Config{ld} and $Config{lddlflags} which are
variables designed for just this purpose of building shared libraries.
> /usr/ccs/bin/ld: DP relative code in file /usr/ccs/lib/crt0.o - shared library must
>be position
> independent. Use +z or +Z to recompile.
This is a bigger (but very real!) problem. Building a shared library is
not simply repackaging the existing objects. If we want to build a shared
library, we should re-compile the components with -fpic or equivalent. The
actual variable we need is perl5's $Config{cccdlflags}.
> Back to you guys.
I'd like to hand this one off to someone who understands why we have to
build a shared library in the first place and what, eventually, we might
have to do with it. (For example, what's the plan for platforms that
can't do dynamic loading?)
--
Andy Dougherty [EMAIL PROTECTED]
Dept. of Physics
Lafayette College, Easton PA 18042