--- parrot-1.0.0.orig/config/gen/makefiles/json.in +++ parrot-1.0.0/config/gen/makefiles/json.in @@ -9,6 +9,8 @@ PGE_DIR := ../../compilers/pge TGE_DIR := ../../compilers/tge +export LD_LIBRARY_PATH := ../../blib/lib + # the default target all: JSON.pbc --- parrot-1.0.0.orig/config/gen/makefiles/nqp.in +++ parrot-1.0.0/config/gen/makefiles/nqp.in @@ -9,6 +9,8 @@ PARROT_LIBRARY := @build_dir@/runtime/parrot/library PGE_LIBRARY := @build_dir@/runtime/parrot/library/PGE +export LD_LIBRARY_PATH := ../../blib/lib + all: nqp.pbc SOURCES := \ --- parrot-1.0.0.orig/config/gen/makefiles/pct.in +++ parrot-1.0.0/config/gen/makefiles/pct.in @@ -11,6 +11,8 @@ PGE_DIR := ../../compilers/pge TEST_DIR := ../../t/compilers/pct +export LD_LIBRARY_PATH := ../../blib/lib + # Where to put things PARROT_LIBRARY := ../../runtime/parrot/library --- parrot-1.0.0.orig/config/gen/makefiles/pge.in +++ parrot-1.0.0/config/gen/makefiles/pge.in @@ -9,6 +9,8 @@ TOOL_DIR := ../.. +export LD_LIBRARY_PATH := ../../blib/lib + # Where to put things PARROT_LIBRARY := ../../runtime/parrot/library --- parrot-1.0.0.orig/config/gen/makefiles/root.in +++ parrot-1.0.0/config/gen/makefiles/root.in @@ -534,6 +534,8 @@ .pbc$(O) : # suffix rule (limited support) $(PARROT) -o $@ $< +# This sets up proper internal dynamic linking in case we don't set an rpath +export LD_LIBRARY_PATH = $(CUR_DIR)/blib/lib ############################################################################### # @@ -750,7 +752,7 @@ runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT) @echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers - $(MINIPARROT) config_lib.pasm > $@ + LD_LIBRARY_PATH=$(CUR_DIR)/blib/lib $(MINIPARROT) config_lib.pasm > $@ $(PARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \ lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \ --- parrot-1.0.0.orig/config/gen/makefiles/tge.in +++ parrot-1.0.0/config/gen/makefiles/tge.in @@ -6,6 +6,8 @@ RM_F := @rm_f@ PARROT := ../../parrot@exe@ +export LD_LIBRARY_PATH := ../../blib/lib + # Where to put things PARROT_LIBRARY := ../../runtime/parrot/library PERL6GRAMMAR := $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc --- parrot-1.0.0.orig/config/inter/libparrot.pm +++ parrot-1.0.0/config/inter/libparrot.pm @@ -34,6 +34,7 @@ sub runstep { my ( $self, $conf ) = @_; my $parrot_is_shared = $conf->options->get('parrot_is_shared'); + my $site_install = $conf->options->get('site_install'); $parrot_is_shared = integrate( $conf->data->get('parrot_is_shared'), @@ -98,7 +99,8 @@ # Set -rpath (or equivalent) for executables to find the # shared libparrot in the build directory. $conf->data->set( - rpath_blib => ( $parrot_is_shared && $conf->data->get('rpath') ) + rpath_blib => ( $parrot_is_shared && $conf->data->get('rpath') + && !$site_install ) ? $conf->data->get('rpath') . $conf->data->get('build_dir') . $conf->data->get('slash') @@ -109,7 +111,8 @@ # Set -rpath (or equivalent) for the installed executables to find the # installed shared libparrot. $conf->data->set( - rpath_lib => ( $parrot_is_shared && $conf->data->get('rpath') ) + rpath_lib => ( $parrot_is_shared && $conf->data->get('rpath') + && !$site_install ) ? $conf->data->get('rpath') . $conf->data->get('libdir') : '' --- parrot-1.0.0.orig/lib/Parrot/Configure/Options/Conf/Shared.pm +++ parrot-1.0.0/lib/Parrot/Configure/Options/Conf/Shared.pm @@ -62,6 +62,7 @@ sbindir sharedstatedir silent + site_install sysconfdir test verbose