Bruce Rothermal wrote:
> Responses below
>
> Norm Jacobs wrote:
>   
>> usr/src/cmd/swig/Makefile.sfw
>>
>>    * line 33, why are you overriding "--with-swiglibdir" ?  Is the
>>      default value somehow broken?
>>     
> The call make install installs the exe files and swigs translation .i 
> files to $PROTO/usr/...
> Then the packaging takes this and relocates the installation /usr/...
> swig because its initial install was to $PROTO/usr/... looks for its 
> translation .i files in $PROTO/usr/... path.
>   
You should be building it using configure options that would cause it to 
install in it's appropriate location (/usr/...) by default.  Often, open 
source software will embed paths supplied by configure options in the 
resulting files.  embedding references to your workspace can cause the 
software to only work on the system or network that it was built on and 
only when the build tree is accessable and intact.  The "customary" 
solution to configuring to install in the right place on the system and 
actually installing in a "proto" area is to configure with the "correct" 
installed paths and use DESTDIR to install in the proto area.  Ex:
    % ./configure --prefix=/usr
    % make DESTDIR=$(ROOT) install

>>      make sure you add --norunpath and check if you need the standard
>>      C++ libraries.
>>     
> What is --norunpath. How do I check standard C++ libraries?
>   
By default, the Studio C++ compiler a will augment the RUNPATH when it 
calls the linker to create executables and shared libraries so that it 
includes the compiler installation path (see man 
-M/ws/onnv-tools/SUNWspro/SS11/man CC for more details).  Since Solaris 
delivers the shared objects that it would find in the installation path 
in /lib and /usr/lib, the RUNPATH augmentation is unnecessary and 
undesirable for security reasons.  It also automatically links in it's 
own standard C++ library (libCstd) and  C++ runtime library (libCrun).  
Again, if your resulting executables and shared libraries don't need 
these library, don't link with them, but many things do.

-norunpath tells the C++ compiler not to augment the RUNPATH when 
calling the linker

-library=%none tells the C++ compiler not to use the standard C++ class 
library or runtime library
-library=no%Cstd tells the C++ compiler not to include the standard C++ 
library

You should always use "-norunpath" in the SFW consolidation.  Without 
code inspection, you can probably determine if you need either of the 
others by building with them.

>>    * lines 56-57, add "INSTALL=$(INSTALL_PROTO)" and MANSCRIPT to your
>>      environment
>>     
> what do these do?
>   
by setting INSTALL to INSTALL_PROTO, you can install your bits in the 
proto area and INSTALL_PROTO ($SRC/tools/install-proto) will performan 
any postprocessing on files that needs to happen.  MANSCRIPT is used by 
install-proto

>>    * lines 59-60, remove and use proto-fix to get the perms right on
>>      the proto area (see a2ps, hpijs, cups, or other component for an
>>      example)
>>     
> what is this supposed to do?
>   
proto-fix applies attributes from the packaging to the proto area.

>> usr/src/cmd/swig/install-swig
>>
>>    * incorporate the swig.1 manpage install into Makefile.sfw (and
>>      anything else that "cd $VER; make install" didn't cover) and
>>      remove this.  It may not be necessary.
>>     
> The examples I was following uses the install-XXXX file. Is there 
> something wrong with doing it this way?
>   
No, you can do it this way, but if you use the "install" target from the 
component's build instead of install-swig to install in the proto area, 
it should be easier to update in the future and it's less likely that 
you will miss installing a file in the proto area and packaging it for 
installation.

    -Norm


Reply via email to