After resolving our previous build issues, we ran into another problem.  Some 
of the servers on which we must install the new Kornshell binary are missing 
some required libraries.  The servers we control have all the necessary 
components, but many other servers belong to another agency and are outside our 
control.  The process for gaining approval for installation of new software 
requires months of political wrangling among inter-agency security authorities, 
and sometimes approvals are denied.  What we need to do is produce a static 
build of KSH so that we can provide a single, monolithic binary.  Since 
Kornshell is already installed on all the servers, we are allowed to upgrade it 
without additional authorizations.

We have been searching for a way to build a static binary but have not been 
successful.  Based on a message in the archives, we tried setting SHOPT_DYNAMIC 
to 0 in the Kornshell makefile, but this had no effect on the result.  The 
compiled program was the exact same size as previous builds and would still not 
run on the problem servers.

There is also this statement by Dave Korn from a message posted in ast-users on 
June 28, 2008:

"if you build a dynamic [later corrected to "static"] version of ksh93, then 
you will not be able to load built-ins at run time."

Can someone explain what this means?

These are old, HP PA-RISC servers running HP-UX 11.11.  We have been entirely 
successful with the binary on our own servers, but the DOD servers belonging to 
another agency, which are of the same type and O/S, cannot run the software.  
We know at the very least that they are missing libiconv.sl and may be missing 
other libraries as well.  Can anyone be of any assistance with this?

Cheers,
Russ Cannon, Oracle DBA
HQ AFLCMC/HIBD USAF



On Feb 7, 2015, 00:57, at 00:57, Russell Cannon <russell.t.can...@gmail.com> 
wrote:
>I managed to solve this problem by adding -lm -liconv to the gcc
>command.
>
>
>
>On Jan 29, 2015, 14:04, at 14:04, Russell Cannon
><russell.t.can...@gmail.com> wrote:
>>We have been trying to build ksh93u+ 2012-08-01 on an old PA-RISC
>>system to
>>bring the software up-to-date for an important project.  It currently
>>has
>>93t+ 2009-05-01.  But, the build has been failing consistently with
>the
>>output shown at the bottom.  Libiconv is present as
>>/usr/local/lib/libiconv.* with correct ownership and permissions.  The
>>build command we have been using is:
>>
>>CC='gcc -std=gnu99 -O3 -fstrict-aliasing -Wstrict-aliasing'
>bin/package
>>make
>>
>>and, the library path environment is set to:
>>
>>LD_LIBRARY_PATH=/usr/local/lib:/usr/contrib/lib:/opt/gnome/lib:/usr/lib:/usr/share/lib:/usr/contrib/X11R6/lib:/usr/ccs/lib:/lib
>>SHLIB_PATH=$LD_LIBRARY_PATH
>>
>>This is on an HP PA-RISC 2.0 server running HP-UX 11.11.  We are
>>wondering
>>what libraries are missing or whether we are misunderstanding the
>>output.
>>Can anyone give us some insight as to why the build is failing?  We
>>have
>>spent many hours perusing the archives trying to find a solution
>>without
>>result.
>>
>>This is happening for any AST file set--ast-ksh, ast-base, ast-open,
>>and
>>just ksh.  Our procedure follows the instructions provided in the
>build
>>from source page.
>>
>>Any help or suggestions anyone can offer will be much appreciated.
>>
>>Cheers,
>>Russ Cannon
>>
>>
>>
>>+ cc -O2 -L/aces/sw/ast/arch/hp.0w/lib -o probe probe.o
>>/aces/sw/ast/arch/hp.0w/lib/libast.a /aces/sw/ast/ar
>>ch/hp.0w/lib/libast.a
>>/usr/ccs/bin/ld: Unsatisfied symbols:
>>   libiconv (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>   _Isinf (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   frexp (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   _Signbit (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   libiconv_open (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>   ldexp (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   libiconv_close (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>collect2: ld returned 1 exit status
>>mamake [cmd/probe]: *** exit code 1 making probe
>>mamake: *** exit code 1 making cmd/probe
>>+ mamake -C lib/libpp -k install
>>+ cc -O2 -L/aces/sw/ast/arch/hp.0w/lib -o ppsym ppsym.o
>>/aces/sw/ast/arch/hp.0w/lib/libast.a /aces/sw/ast/ar
>>ch/hp.0w/lib/libast.a
>>/usr/ccs/bin/ld: Unsatisfied symbols:
>>   libiconv (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>   _Isinf (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   frexp (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   _Signbit (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   libiconv_open (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>   ldexp (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(sfcvt.o)) (code)
>>   libiconv_close (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>collect2: ld returned 1 exit status
>>mamake [lib/libpp]: *** exit code 1 making ppsym
>>+ test  = libpp.a
>>+ /bin/cmp -s libpp.a /aces/sw/ast/arch/hp.0w/lib/libpp.a
>>+ 2> /dev/null
>>+ /bin/mv /aces/sw/ast/arch/hp.0w/lib/libpp.a
>>/aces/sw/ast/arch/hp.0w/lib/libpp.a.old
>>+ 2> /dev/null
>>+ /bin/cp libpp.a /aces/sw/ast/arch/hp.0w/lib/libpp) (code)
>>   libiconv_open (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>   ldexp (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(strtod.o)) (code)
>>   libiconv_close (first referenced in
>>/aces/sw/ast/arch/hp.0w/lib/libast.a(iconv.o)) (code)
>>collect2: ld returned 1 exit status
>>mamake [cmd/nmake]: *** exit code 1 making nmake
>>+ nmake --base --compile
>--file=/aces/sw/ast/src/cmd/nmake/Makerules.mk
>>/bin/posix/sh[4]: nmake:  not found.
>>mamake [cmd/nmake]: *** exit code 127 making Makerules.mo
>>mamake: *** exit code 1 making cmd/nmake
>>package: make: errors making /aces/sw/ast/arch/hp.0w/bin/nmake
_______________________________________________
ast-developers mailing list
ast-developers@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to