[comp.lang.perl] Config on APOLLO SR10.2

dave@vlsi-mentor.jpl.nasa.gov (David Hayes) (11/03/90)

Something's not entirely right about Configure on Apollo's running SR10.2.

... 
dup2() not found
 
fchmod() not found
 
fchown() not found
 
fcntl.h found.
 
flock() not found
 
getgroups() not found
... 
lstat() not found
... 
mkdir() not found

etc.

Yet these routines DO exist. Somewhere. I always have to go into config.h
and fix it up to realize that these routines are there. 

Has anyone found a useful way to let Configure know what is really there?
I really HATE editing config.h....
-- 
----
Dave Hayes  dave@vlsi-mentor.jpl.nasa.gov   
			{ucbvax,ames}!elroy!vlsi-mentor!dave
"Attempt to find truth by realizing that it will generally find YOU."

kgallagh@digi.lonestar.org (Kevin Gallagher) (11/04/90)

In article <1990Nov2.225524.6123@vlsi-mentor.jpl.nasa.gov> dave@vlsi-mentor.jpl.nasa.gov (David Hayes) writes:
>Something's not entirely right about Configure on Apollo's running SR10.2.
>... 
>dup2() not found
>fchmod() not found
>fchown() not found
>[more of the same deleted]
>Yet these routines DO exist. Somewhere. I always have to go into config.h
>and fix it up to realize that these routines are there. 
>
>Has anyone found a useful way to let Configure know what is really there?
>I really HATE editing config.h....

The problem is that Apollo's /bin/cc compiler has two C libraries: /lib/clib
and /lib/libc.  Configure only finds one and just searches it.  It does not
search the other unless told to do so.  You need to tell it to do so by
specifying the missing library with the -l option when asked by Configure.

Unfortunately, Configure will add this -l option in the make files, which will
cause the compiler to abort when it encounters the option.  So be sure to
delete this -l option from the make files before kicking off the build.

/bin/cc will search both libaries on its own.
-- 
----------------------------------------------------------------------------
Kevin Gallagher        kgallagh@digi.lonestar.org OR ...!uunet!digi!kgallagh
DSC Communications               OR apcihq!apcidfw!digi!kgallagh
----------------------------------------------------------------------------

sscott@camdev.comm.mot.com (Steve Scott) (11/05/90)

kgallagh@digi.lonestar.org (Kevin Gallagher) writes:

>In article <1990Nov2.225524.6123@vlsi-mentor.jpl.nasa.gov> dave@vlsi-mentor.jpl.nasa.gov (David Hayes) writes:
>>Something's not entirely right about Configure on Apollo's running SR10.2.
>>... 
>>dup2() not found
>>fchmod() not found
>>fchown() not found
>>[more of the same deleted]
>>Yet these routines DO exist. Somewhere. I always have to go into config.h
>>and fix it up to realize that these routines are there. 
>>
>>Has anyone found a useful way to let Configure know what is really there?
>>I really HATE editing config.h....

>The problem is that Apollo's /bin/cc compiler has two C libraries: /lib/clib
>and /lib/libc.  Configure only finds one and just searches it.  It does not
>search the other unless told to do so.  You need to tell it to do so by
>specifying the missing library with the -l option when asked by Configure.

>Unfortunately, Configure will add this -l option in the make files, which will
>cause the compiler to abort when it encounters the option.  So be sure to
>delete this -l option from the make files before kicking off the build.

>/bin/cc will search both libaries on its own.

Interesting, eh?

-- 
+------------------------------------------------------------------------------+
| Steve Scott                                | Internet: sscott@mot.com        |
| Fort Worth Research and Development Center | UUCP:     uunet!csccat!sscott   |
| Cellular Infrastructure Group              | Internal: TX14/4G               |
| Radio Telephone Systems Group              | Voice:    (817) 232-6317        |
| Motorola, Inc.                             | Fax:      (817) 232-6081        |
+------------------------------------------------------------------------------+

vinoski@apollo.HP.COM (Stephen Vinoski) (11/05/90)

In article <1990Nov2.225524.6123@vlsi-mentor.jpl.nasa.gov> dave@vlsi-mentor.jpl.nasa.gov (David Hayes) writes:
>Something's not entirely right about Configure on Apollo's running SR10.2.
>dup2() not found
>fchmod() not found
>fchown() not found
>fcntl.h found.
>flock() not found
>getgroups() not found
>lstat() not found
>mkdir() not found

You have to make sure that both /lib/libc and /lib/clib are examined to find
these functions.  It used to be that only /lib/libc was examined, but I seem to
remember that Larry fixed that at pl28.  I added these lines just be sure (this
is a pl37 diff):

*** Configure.from_kit	Tue Oct 23 19:19:37 1990
--- Configure	Tue Oct 23 19:20:01 1990
***************
*** 1404,1409 ****
--- 1404,1412 ----
      libc="$1"
  elif test -f $libc; then
      echo "Your C library is in $libc, like you said before."
+     if test $libc = "/lib/libc"; then
+ 	libc="$libc /lib/clib"
+     fi
  elif test -f /lib/libc.a; then
      echo "Your C library is in /lib/libc.a.  You're normal."
      libc=/lib/libc.a

Let me know via email if you still have trouble after looking through both
global libraries.


-steve


| Steve Vinoski  (508)256-6600 x5904       | Internet: vinoski@apollo.com     |
| Testability and Diagnostics              | UUCP: ...mit-eddie!apollo!vinoski|
| HP Apollo Division, Chelmsford, MA 01824 |       ...uw-beaver!apollo!vinoski|
|                             I feel crapulous today.                         |