From jeff@gli.pn.wagsky.com  Fri Oct 30 21:01:27 1998
Received: from gli.pn.wagsky.com (wagsky.vip.best.com [206.86.71.127])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA11090
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Oct 1998 20:59:52 -0800 (PST)
          (envelope-from jeff@gli.pn.wagsky.com)
Received: (from root@localhost)
	by gli.pn.wagsky.com (8.9.1/8.9.1) id UAA19018;
	Fri, 30 Oct 1998 20:59:47 -0800 (PST)
	(envelope-from jeff)
Message-Id: <199810310459.UAA19018@gli.pn.wagsky.com>
Date: Fri, 30 Oct 1998 20:59:47 -0800 (PST)
From: root@gli.pn.wagsky.com
Reply-To: root@gli.pn.wagsky.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: rc.conf/rc fails to set ldconfig -aout
X-Send-Pr-Version: 3.2

>Number:         8517
>Category:       conf
>Synopsis:       rc.conf/rc fails to set ldconfig -aout
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 30 21:10:00 PST 1998
>Closed-Date:    Mon Jun 26 03:26:30 PDT 2000
>Last-Modified:  Mon Jun 26 03:27:44 PDT 2000
>Originator:     Jeff Kletsky
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Wagsky Associates
>Environment:
cvsup of 3.0-CURRENT as of 981015 and 
ports collection as of 981030
>Description:
With cvsup of 3.0-CURRENT as of 981015 and ports collection as of 981030,
build of emacs20 fails with

[...]
./temacs -batch -l loadup dump
/usr/libexec/ld-elf.so.1: Shared object "libXaw.so.6" not found
gmake[1]: *** [emacs] Error 1
gmake[1]: Leaving directory
`/usr/ports/editors/emacs20/work/emacs-20.3/src'
gmake: *** [src] Error 2
*** Error code 2
[...]

This has been traced to 'rc.conf' 
[...]
ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" # shared library search paths
ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" # a.out shared library search paths
[...]

and the execution of the startup script 'rc' 

[...]
        # Default the a.out ldconfig path, in case the system's
        # /etc/rc.conf hasn't been updated.
        : ${ldconfig_paths_aout=${ldconfig_paths}}
        _LDC=/usr/lib/aout
        for i in $ldconfig_paths_aout; do
                if test -d $i; then
                        _LDC="${_LDC} $i"
                fi
        done
        echo 'setting a.out ldconfig path:' ${_LDC}
        ldconfig -aout ${_LDC}
[...]

which apparently fails to properly set the aout ldconfig path.  

Executing ldconfig manually results in:

bash-2.02# ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib
bash-2.02# ldconfig -aout /usr/lib/compat/aout /usr/X11R6/lib/aout \
/usr/local/lib/aout
ldconfig: /usr/local/lib/aout: No such file or directory

as /usr/local/lib/aout apparently is not created by the 'make world'
process.  

>How-To-Repeat:

Install "fresh" RELEASE-3.0
cvsup -current
make world (build new kernel, update /etc, /dev, /stand/sysinstall)
reboot
cd /usr/ports/editors/emacs20
make clean
make install

>Fix:
Workaround:
ldconfig -aout /usr/lib/compat/aout /usr/X11R6/lib/aout

Fix:
This could easily be solved by modifying 'rc' or the "hierarchy"
('BSD.usr.dist') portion of the make process to ensure that
/usr/local/lib/aout exists.





>Release-Note:
>Audit-Trail:

From: Peter Hawkins <thepish@FreeBSD.ORG>
To: root@gli.pn.wagsky.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/8517: rc.conf/rc fails to set ldconfig -aout
Date: Sun, 1 Nov 1998 12:46:09 +1100 (EST)

 >        # Default the a.out ldconfig path, in case the system's
 >        # /etc/rc.conf hasn't been updated.
 >        : ${ldconfig_paths_aout=${ldconfig_paths}}
 >        _LDC=/usr/lib/aout
 >        for i in $ldconfig_paths_aout; do
 >                if test -d $i; then
 >                        _LDC="${_LDC} $i"
 >                fi
 >        done
 >        echo 'setting a.out ldconfig path:' ${_LDC}
 >        ldconfig -aout ${_LDC}
 >
 >Executing ldconfig manually results in:
 >
 >bash-2.02# ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib
 >bash-2.02# ldconfig -aout /usr/lib/compat/aout /usr/X11R6/lib/aout \
 >/usr/local/lib/aout
 >ldconfig: /usr/local/lib/aout: No such file or directory
 
 2 points:
 
 1. you should remove /usr/local/lib/aout from your rc.config if you don't have
    such a directory
 
 2. if you take a look at the syntax in rc (above) it tests each directory in
    your ldconfig_paths_aout string before appending them to _LDC anyway!
    in short, your rc will execute the ldconfig command as:
 
      ldconfig -aout /usr/lib/compat/aout /usr/X11R6/lib/aout
 You can verify this yourself by taking a cut-down version of rc and executing
 it with -x. You'll see:
 
 [...]
 + : /usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout
 + _LDC=/usr/lib/aout
 + test -d /usr/lib/compat/aout
 + _LDC=/usr/lib/aout /usr/lib/compat/aout
 + test -d /usr/X11R6/lib/aout
 + _LDC=/usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout
 + test -d /usr/local/lib/aout
 + echo setting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout
 setting a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout
 + ldconfig -aout /usr/lib/aout /usr/lib/compat/aout /usr/X11R6/lib/aout
 
 
 >as /usr/local/lib/aout apparently is not created by the 'make world'
 >process.  
 
 Actually, it is if you use make aout_to_elf and have aout libs to be moved.
 
 Peter (thepish@FreeBSD.org)
 
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Mon Jun 26 03:26:30 PDT 2000 
State-Changed-Why:  
This seems to work now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8517 
>Unformatted:
