I don't believe that this is the correct solution. The 'parrot' binary needs to be linked to the correct library. Currently it's being linked against /usr/local/lib/libparrot.dylib instead of blib/lib/libparrot.dylib. For some reason it does this even when blib/lib is specific to be searched first:
$ c++ -o parrot -L/Users/jhoblitt/parrot/blib/lib -L/usr/local/lib \
compilers/imcc/main.o -lparrot -lm -lreadline \
src/parrot_config.o
$ otool -L parrot
parrot:
/usr/local/lib/libparrot.dylib (compatibility version 0.0.0, current
version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.2)
/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version
2.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 7.3.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version
92.0.0)
The fix is to figure out how to make the linker behave.
-J
--
On Mon, Feb 20, 2006 at 07:21:32PM -0600, Joshua Isom wrote:
> I've spent a lot of time looking for something that would work(and
> found some stuff that documentation seemed to say should work but
> didn't for me), and on darwin, that's the only way I know how, either
> that or a static parrot. The only other option I can think of that
> would perhaps do the trick would be far messier, i.e. have parrot load
> libparrot.dylib instead of link against it.
>
> On Feb 20, 2006, at 7:17 PM, Joshua Hoblitt wrote:
>
> >Is there some reason that this can't be a -L flag passed to CC? IMHO -
> >it's bad policy to go littering makefile with env variable declaration
> >as the effect is global until the end of the makefile.
> >
> >-J
> >
> >--
> >On Mon, Feb 20, 2006 at 06:40:24PM -0600, Joshua Isom wrote:
> >>It was working on 11676, and I got it to build with 11686. But I
> >>notice one problem: "Library not loaded:
> >>/usr/local/lib/libparrot.dylib"
> >>
> >>On darwin, if you want a shared parrot, you must set DYLD_LIBRARY_PATH
> >>to include parrot's blib/lib.
> >>
> >>For tcsh(os x default), it'd be "setenv DYLD_LIBRARY_PATH
> >>blib/lib:$DYLD_LIBRARY_PATH" and for sh it'd be export
> >>DYLD_LIBRARY_PATH blib/lib:$DYLD_LIBRARY_PATH" if you're in the parrot
> >>root directory.
> >>
> >>On Feb 20, 2006, at 5:34 PM, Will Coleda (via RT) wrote:
> >>
> >>># New Ticket Created by Will Coleda
> >>># Please include the string: [perl #38597]
> >>># in the subject line of all future correspondence about this issue.
> >>># <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38597 >
> >>>
> >>>
> >>>r11684
> >>>
> >>>make realclean
> >>>CXX='ccache g++-4.0'
> >>>CC='ccache gcc-4.0'
> >>>/usr/bin/perl Configure.pl --cc="$CC" --cxx="$CXX" --link="$CXX" --
> >>>ld="$CXX" --optimize --parrot_is_shared $@
> >>>
> >>>Generates the following error:
> >>>
> >>>src/parrot_config.c
> >>>'runtime/parrot/include/config.fpmc' is truncated. Remove it and
> >>>rerun make
> >>>make: *** [src/parrot_config.c] Error 255
> >>>
> >>>So, I follow the directions:
> >>>
> >>>CokeZero:~/research/parrot wcoleda$ rm runtime/parrot/include/
> >>>config.fpmc
> >>>CokeZero:~/research/parrot wcoleda$ make
> >>>Compiling with:
> >>>xx.c
> >>>ccache gcc-4.0 -I./include -g -pipe -fno-common -no-cpp-precomp -I/
> >>>usr/local/include -pipe -fno-common -Wno-long-double -
> >>>DDISABLE_GC_DEBUG=1 -DNDEBUG -Os -I/sw/include -I /usr/local/include
> >>>-
> >>>Wall -Wstrict-prototypes -Wmissing-prototypes -Winline -Wpointer-
> >>>arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -
> >>>Winline -W -Wno-unused -Wsign-compare -Wformat-nonliteral -Wformat-
> >>>security -Wpacked -Wdisabled-optimization -falign-functions=16 -Wno-
> >>>shadow -DHAS_JIT -DPPC -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c
> >>>Invoking Parrot to generate runtime/parrot/include/config.fpmc --
> >>>cross your fingers
> >>>./miniparrot config_lib.pasm > runtime/parrot/include/config.fpmc
> >>>dyld: Library not loaded: /usr/local/lib/libparrot.dylib
> >>> Referenced from: /Users/wcoleda/research/parrot/./miniparrot
> >>> Reason: image not found
> >>>make: *** [runtime/parrot/include/config.fpmc] Error 133
> >>>
> >>>It's been this way for about a day. I can run the "which revision
> >>>introduced this bug" if no one sees anything obvious.
> >>>
> >>
>
pgpPBroxnrWvV.pgp
Description: PGP signature
