testing 'make install'

Andy Dougherty doughera at lafayette.edu
Tue Jan 20 14:13:20 UTC 2009


On Mon, 19 Jan 2009, Allison Randal wrote:

> While you're running your usual platform tests in preparation for 
> tomorrow's release, if you're on a *nix-related platform, please also 
> run 'make install' (after running the tests). Run the tests again and 
> report if you encounter any failures that appear after the install.

I haven't tested the shared library install (because it doesn't work for 
me, see [1]
  http://lists.parrot.org/pipermail/parrot-dev/2008-December/000783.html )

but I think that you probably need something like the following; 
otherwise, the installed versions of the binaries aren't going to know 
where to find their shared libraries:

[1] and there's no Trac ticket because I get the error message
    TICKET_CREATE privileges are required to perform this operation

Index: config/inter/libparrot.pm
===================================================================
--- config/inter/libparrot.pm	(revision 35798)
+++ config/inter/libparrot.pm	(working copy)
@@ -75,6 +75,8 @@
         : '$(LIBPARROT_STATIC)',
     );
 
+    # 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') )
         ? $conf->data->get('rpath')
@@ -83,6 +85,15 @@
             . $conf->data->get('blib_dir')
         : ''
     );
+    
+    # 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') )
+        ? $conf->data->get('rpath')
+            . $conf->data->get('libdir')
+        : ''
+    );
 
     unless ( defined( $conf->data->get('libparrot_ldflags') ) ) {
         $conf->data->set(libparrot_ldflags =>
Index: config/gen/makefiles/root.in
===================================================================
--- config/gen/makefiles/root.in	(revision 35798)
+++ config/gen/makefiles/root.in	(working copy)
@@ -798,7 +798,7 @@
     $(PARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/main$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS) $(SRC_DIR)/install_config$(O)
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(SRC_DIR)/install_config$(O)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 $(INC_DIR)/parrot.h : $(INC_DIR)/pbcversion.h $(INC_DIR)/vtable.h
@@ -897,7 +897,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/parrot_debugger$(O) \
     $(SRC_DIR)/parrot_config$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
@@ -915,7 +915,7 @@
 $(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_disassemble$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
@@ -933,7 +933,8 @@
 $(INSTALLABLEPDUMP) : $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pdump$(O) \
-    $(SRC_DIR)/packdump$(O) $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    $(SRC_DIR)/packdump$(O) \
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 
@@ -949,7 +950,7 @@
 $(INSTALLABLEPINFO) : $(SRC_DIR)/pbc_info$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_info$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
@@ -967,7 +968,7 @@
 	$(LINK) @ld_out@$@ \
     $(SRC_DIR)/pbc_merge$(O) \
     $(SRC_DIR)/install_config$(O) \
-    $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 
-- 
    Andy Dougherty		doughera at lafayette.edu



More information about the parrot-dev mailing list