Thread: install-sh patch for Mac OS X

install-sh patch for Mac OS X

From
sugita@sra.co.jp
Date:
This is a small patch for following error.

    $ make
    cc -fno-common -g -O2 -fno-common -pipe -no-precomp -I/opt/pgsql/7.2.1/include
    -I/sw/lib/ruby/1.6/powerpc-darwin5.5 -I. -I/sw/include -DHAVE_SYS_UN_H
    -DHAVE_SOCKET -DHAVE_GETHOSTNAME -I/sw/include  -c -o postgres.o postgres.c
    cc -dynamic -bundle -undefined suppress -flat_namespace  -L/sw/lib
    -L/opt/pgsql/7.2.1/lib -o postgres.bundle postgres.o -L. -lruby -lpq
    /usr/bin/ld: table of contents for archive: /opt/pgsql/7.2.1/lib/libpq.a is
    out of date; rerun ranlib(1) (can't load from it)
    make: *** [postgres.bundle] Error 1
    $
Index: config/install-sh
===================================================================
RCS file: /home/mgr/sugita/jobs/cvs-master/pgsql/src/7.2.1/build/config/install-sh,v
retrieving revision 1.1
diff -u -r1.1 install-sh
--- config/install-sh    2002/04/08 02:25:06    1.1
+++ config/install-sh    2002/07/10 10:06:41
@@ -33,7 +33,7 @@
 # put in absolute paths if you don't have them in your path; or use env. vars.

 mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
+cpprog="${CPPROG-cp -p}"
 chmodprog="${CHMODPROG-chmod}"
 chownprog="${CHOWNPROG-chown}"
 chgrpprog="${CHGRPPROG-chgrp}"

Re: install-sh patch for Mac OS X

From
Tom Lane
Date:
sugita@sra.co.jp writes:
> This is a small patch for following error.

> -cpprog="${CPPROG-cp}"
> +cpprog="${CPPROG-cp -p}"

This seems a really *bad* idea.  Won't it cause the executables to be
installed with the wrong ownership (ie, whatever you built them as,
rather than the user you are doing "make install" as)?

Perhaps we need some different installation technique for OS X
(run ranlib again after install?) but I won't agree to
making the above change for all platforms.

            regards, tom lane

Re: install-sh patch for Mac OS X

From
Peter Eisentraut
Date:
Tom Lane writes:

> Perhaps we need some different installation technique for OS X
> (run ranlib again after install?)

I think so.  That's what libtool appears to do.

--
Peter Eisentraut   peter_e@gmx.net


Re: install-sh patch for Mac OS X

From
sugita@sra.co.jp
Date:
From: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [PATCHES] install-sh patch for Mac OS X
Date: Wed, 10 Jul 2002 09:38:11 -0400

;;; sugita@sra.co.jp writes:
;;; > This is a small patch for following error.
;;;
;;; > -cpprog="${CPPROG-cp}"
;;; > +cpprog="${CPPROG-cp -p}"
;;;
;;; This seems a really *bad* idea.

I mean that timestamp of .a should not be changed.
Or ranlib again only for platforms required.

;;;                      Won't it cause the executables to be
;;; installed with the wrong ownership (ie, whatever you built them as,
;;; rather than the user you are doing "make install" as)?

Additional modifications for ownership and mode bits will fix it.


Kenji Sugita