Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

Latest UnixWare7 (svr5.sh) hints file #703

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#1605 (status was 'resolved')

Searchable as RT1605$

p5pRT commented 24 years ago

From hops@scoot.pdev.sco.com

I reported this a couple of weeks ago but it must have got lost when the mail list was eating everything sent to it.

Heres the latest hints file for UnixWare7. Its expanded on the previous update with suppression of use of libucb (which causes problems with some later loaded modules)\, use of skunkware available ucb libdbm from /usr/local and additional lib linkage for early uw7 versions execution ability (doc of preferred fix) and various other tweaks..

# svr5 hints\, System V Release 5.x (UnixWare 7) # Reworked by hops@​sco.com Sept 1999 for better platform support # Boyd Gerber\, gerberb@​zenez.com 1999/09/21 for threads support. # Originally taken from svr4 hints.sh 21-Sep-98 hops@​sco.com # which was version of 1996/10/25 by Tye McQueen\, tye@​metronet.com

# Use Configure -Dusethreads to enable threads. # Use Configure -Dcc=gcc to use gcc. case "$cc" in '') cc='/bin/cc'   test -f $cc || cc='/usr/ccs/bin/cc'   ;; *gcc*)   # "$gccversion" not set yet   vers=`gcc -v 2>&1 | sed -n -e 's@​.*version \([^ ][^ ]*\) .*@​\1@​p'`   case $vers in   *2.95*)   ccflags='-fno-strict-aliasing'   # More optimisation provided in gcc-2.95 causes miniperl to segv.   # -fno-strict-aliasing is supposed to correct this but   # if it doesn't and you get segv when the build runs miniperl then   # disable optimisation as below   # optimize=' '   ;;   esac   ;;
esac

# Hardwire the processor to 586 for consistancy with autoconf # archname='i586-svr5' # -- seems this is generally disliked by perl porters so leave it to float

# Our default setup excludes anything from /usr/ucblib (and consequently dbm) # as later modules assume symbols found are available in shared libs # On svr5 these are static archives which causes problems for # dynamic modules loaded later (and ucblib is a bad dream anyway) # # However there is a dbm library built from the ucb sources outside ucblib # at http​://www.sco.com/skunkware (installing into /usr/local) so if we # detect this we'll use it. You can change the default # (to allow ucblib and its dbm or disallowing non ucb dbm) by # changing 'want_*' config values below to '' to disable or otherwise to enable

# Leave leading tabs so Configure doesn't propagate variables to config.sh

  want_ucb='' # don't use anything from /usr/ucblib - icky   want_dbm='yes' # use dbm if can find library in /usr/local/lib   want_gdbm='yes' # use gdbm if can find library in /usr/local/lib   want_udk70='' # link with old static libc pieces   # link with udk70 if want resulting binary to run on uw7.0*   # - it will link in referenced static symbols of libc that are (now)   # in the shared libc.so on 7.1 but were not in 7.0.   # There are still scenarios where this is still insufficient so   # overall it is preferable to get ptf7051e   # ftp​://ftp.sco.com/SLS/ptf7051e.Z   # installed on any/all 7.0 systems.

if [ "$want_ucb" ] ; then   ldflags= '-L/usr/ucblib'   ccflags='-I/usr/ucbinclude'   # /usr/ccs/include and /usr/ccs/lib are used implicitly by cc as reqd else   libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'`   glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'`

  # If see libdbm in /usr/local and not overidden assume its the   # non ucblib rebuild from skunkware and use it   if [ ! -f /usr/local/lib/libdbm.so -o ! "$want_dbm" ] ; then   i_dbm='undef'   libswanted=`echo " $libswanted " | sed -e 's/ dbm / /'`   fi fi

if [ "$want_gdbm" -a -f /usr/local/lib/libgdbm.so ] ; then   i_gdbm='define' else   i_gdbm='undef'   libswanted=`echo " $libswanted " | sed -e 's/ gdbm / /'` fi

# Don't use problematic libraries​: # libmalloc.a - Probably using Perl's malloc() anyway. # libc​: on UW7 don't want -lc explicitly as native cc gives warnings/errors libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' -e 's/ c / /'`

# Don't use irrelevant (but existing) lib dirs # don't want /usr/gnu/lib - original(older) system supplied distrib of perl5 loclibpth=`echo " $loclibpth " | sed -e 's@​ /usr/gnu/lib @​ @​'`

# remove /shlib and /lib from library search path as both symlink to /usr/lib # where runtime shared libc is glibpth=`echo " $glibpth " | sed -e 's/ \/shlib / /' -e 's/ \/lib / /`

# Don't use BSD emulation pieces (/usr/ucblib) regardless # these would probably be autonondetected anyway but ... d_Gconvert='gcvt((x)\,(n)\,(b))' # Try gcvt() before gconvert(). d_bcopy='undef' d_bcmp='undef' d_bzero='undef' d_safebcpy='undef' d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef' d_setlinebuf='undef' d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1

# use nm to probe libs - its fast enough on uw7 case "$usenm" in '') usenm=true;; esac

# Broken C-Shell tests (Thanks to Tye McQueen)​: # The OS-specific checks may be obsoleted by the this generic test.   sh_cnt=`sh -c 'echo /*' | wc -c`   csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c`   csh_cnt=`expr 1 + $csh_cnt` if [ "$sh_cnt" -ne "$csh_cnt" ]; then   echo "You're csh has a broken 'glob'\, disabling..." >&2   d_csh='undef' fi

# Unixware-specific problems. UW7 give correctname with uname -s # UnixWare has a broken csh. (This might already be detected above). # Configure can't detect memcpy or memset on Unixware 2 or 7 # # Leave leading tabs on the next two lines so Configure doesn't # propagate these variables to config.sh   uw_ver=`uname -v`   uw_isuw=`uname -s 2>&1`

if [ "$uw_isuw" = "UnixWare" ]; then   case $uw_ver in   7.1*)   d_csh='undef'   d_memcpy='define'   d_memset='define'   stdio_cnt='((fp)->__cnt)'   d_stdio_cnt_lval='define'   stdio_ptr='((fp)->__ptr)'   d_stdio_ptr_lval='define'

  d_bcopy='define' # In /usr/lib/libc.so.1   d_setregid='define' # "   d_setreuid='define' # "

  if [ -f /usr/ccs/lib/libcudk70.a -a "$want_udk70" ] ; then   libswanted=" $libswanted cudk70"   fi   ;;   7*)   d_csh='undef'   d_memcpy='define'   d_memset='define'   stdio_cnt='((fp)->__cnt)'   d_stdio_cnt_lval='define'   stdio_ptr='((fp)->__ptr)'   d_stdio_ptr_lval='define'   ;;   esac fi # End of Unixware-specific tests.

############################################################### # Dynamic loading section​: # # ccdlflags : must tell the linker to export all global symbols # cccdlflags​: must tell the compiler to generate relocatable code # lddlflags : must tell the linker to output a shared library # # /usr/local/lib is added for convenience\, since additional libraries # are usually put there # # use shared perl lib
useshrplib='true'

case "$cc" in   *gcc*)   ccdlflags='-Xlinker -Bexport -L/usr/local/lib'   cccdlflags='-fpic'   lddlflags='-G -L/usr/local/lib'   ;;

  *)   ccdlflags='-Wl\,-Bexport -L/usr/local/lib'   cccdlflags='-Kpic'   lddlflags='-G -Wl\,-Bexport -L/usr/local/lib'   ;; esac

############################################################### # Use dynamic loading usedl='define' dlext='so' dlsrc='dl_dlopen.xs'

############################################################################ # Thread support # use Configure -Dusethreads to enable # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. cat > UU/usethreads.cbu \<\<'EOCBU' case "$usethreads" in $define|true|[yY]*)   ccflags="$ccflags"   set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`   shift   libswanted="$*"   case "$cc" in   *gcc*)   ccflags="-D_REENTRANT $ccflags -fpic -pthread"   cccdlflags='-fpic'   lddlflags='-pthread -G -L/usr/local/lib '   ;;   *)   ccflags="-D_REENTRANT $ccflags -KPIC -Kthread"   ccdlflags='-Kthread -Wl\,-Bexport -L/usr/local/lib'   cccdlflags='-KPIC -Kthread'   lddlflags='-G -Kthread -Wl\,-Bexport -L/usr/local/lib'   ldflags='-Kthread -L/usr/local/lib'   ;;   esac esac EOCBU

# Just in case Configure fails to find lstat() Its in /usr/lib/libc.so.1. d_lstat=define

d_suidsafe='define' # "./Configure -d" can't figure this out easily

################## final caveat msgs to builder ############### cat \<\<'EOM' >&4

If you wish to use dynamic linking\, you must use   LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH or   setenv LD_LIBRARY_PATH `pwd` before running make.

If you are using shared libraries from /usr/local/lib for libdbm or libgdbm you may need to set   LD_RUN_PATH=/usr/local/lib; export LD_RUN_PATH in order for Configure to compile the simple test program

EOM

Perl Info ``` Site configuration information for perl 5.00503: Configured by hops at Sun Sep 26 16:52:59 PDT 1999. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=svr5, osvers=7.1.0, archname=i386-svr5 uname='unixware scoot 5 7.1.0 i386 x86at sco unix_svr5 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='/bin/cc', optimize='-O', gccversion= cppflags='-I/usr/local/include' ccflags ='-I/usr/local/include' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=y, prototype=define Linker and Libraries: ld='/bin/cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldbm -ldl -lld -lm -lcrypt libc=/usr/lib/libc.so.1, so=so, useshrplib=true, libperl=libperl.so.503 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-Bexport -L/usr/local/lib' cccdlflags='-Kpic', lddlflags='-G -Wl,-Bexport -L/usr/local/lib' Locally applied patches: @INC for perl 5.00503: /usr/local/lib/perl5/5.00503/i386-svr5 /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-svr5 /usr/local/lib/perl5/site_perl/5.005 . Environment for perl 5.00503: HOME=/home/hops LANG=C LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/hops/bin:/home/hops/bin/tcl:/usr/local/bin:/opt/bin:/usr/bin/X11:/usr/bin:/usr/ccs/bin:/usr/sbin:/usr/java/bin:/sbin:/etc:/usr/ucb:. PERL_BADLANG (unset) SHELL=/usr/local/bin/bash ```
p5pRT commented 24 years ago

From @doughera88

On Tue\, 12 Oct 1999\, Mike Hopkirk wrote​:

Heres the latest hints file for UnixWare7. Its expanded on the previous update with suppression of use of libucb (which causes problems with some later loaded modules)\, use of skunkware available ucb libdbm from /usr/local and additional lib linkage for early uw7 versions execution ability (doc of preferred fix) and various other tweaks..

Thanks for the work. Sorry to nit-pick\, but I have a number of questions​:

case "$cc" in '') cc='/bin/cc' test -f $cc || cc='/usr/ccs/bin/cc' ;;

Is this really necessary? At this point in Configure\, /usr/ccs/bin *is* included in PATH\, so why won't the later search by Configure pick this up? Also\, is there a difference between /bin/cc and /usr/ccs/bin/cc?

In short\, why can't we rely on $PATH to pick up the correct cc?

*gcc*) # "$gccversion" not set yet vers=`gcc -v 2>&1 | sed -n -e 's@​.*version \([^ ][^ ]*\) .*@​\1@​p'` case $vers in *2.95*) ccflags='-fno-strict-aliasing' # More optimisation provided in gcc-2.95 causes miniperl to segv. # -fno-strict-aliasing is supposed to correct this but # if it doesn't and you get segv when the build runs miniperl then # disable optimisation as below # optimize=' ' ;;

A more general version of this test is already in Configure for _62 and beyond\, and could easily be back-ported to 5.005_03.

want\_gdbm='yes'     \# use gdbm if can find library in /usr/local/lib

if [ "$want_gdbm" -a -f /usr/local/lib/libgdbm.so ] ; then i_gdbm='define' else i_gdbm='undef' libswanted=`echo " $libswanted " | sed -e 's/ gdbm / /'` fi

Configure should automatically figure out whether or not you have libgdbm or not. Is this test really necessary? This test also fails if the user has gdbm installed in /opt/gnu or in a private directory (even though that exact case is documented to work in the INSTALL file).

# Don't use irrelevant (but existing) lib dirs # don't want /usr/gnu/lib - original(older) system supplied distrib of perl5 loclibpth=`echo " $loclibpth " | sed -e 's@​ /usr/gnu/lib @​ @​'`

Umm -- what if the user *wants* /usr/gnu/lib? How is the older supplied distribution of perl5 relevant here? I don't understand.

# use nm to probe libs - its fast enough on uw7 case "$usenm" in '') usenm=true;; esac

I don't understand the purpose of this part. The default is for Configure to usenm (if Configure can figure out how). It looks to me like you are just setting usenm to the default value it's going to get anyway I also don't understand the "fast enough" comment. I am aware of no cases where using nm is the slower alternative. I am aware of cases where nm is insufficient\, however.

############################################################### # Dynamic loading section​: # # ccdlflags : must tell the linker to export all global symbols # cccdlflags​: must tell the compiler to generate relocatable code # lddlflags : must tell the linker to output a shared library # # /usr/local/lib is added for convenience\, since additional libraries # are usually put there

That should be done automatically by Configure. Are you sure this is necessary? If it is\, the Configure test is somehow broken.

############################################################### # Use dynamic loading usedl='define' dlext='so' dlsrc='dl_dlopen.xs'

Aren't these already the Configure defaults? Why force them?

case "$usethreads" in $define|true|[yY]*) ccflags="$ccflags" set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`

How can this work? Above\, you removed the / c / :

libc​: on UW7 don't want -lc explicitly as native cc gives warnings/errors

# Just in case Configure fails to find lstat() Its in /usr/lib/libc.so.1. d_lstat=define

Do you know why Configure fails to find lstat()? Perhaps we could fix the test.

Overall\, many thanks again for tackling Configure hints. Sorry to appear so nit-picking\, but future maintenance of hints files and Configure is greatly eased when the hints files do only the minimum necessary and allow for the maximum flexibility at the user's end.

--   Andy Dougherty doughera@​lafayette.edu   Dept. of Physics   Lafayette College\, Easton PA 18042

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

On Wed Oct 13\,1999 (10​:20​:12AM -0400)\, doughera@​lafayette.edu(Andy Dougherty) wrote​:

On Tue\, 12 Oct 1999\, Mike Hopkirk wrote​:

Heres the latest hints file for UnixWare7. Its expanded on the previous update with suppression of use of libucb (which causes problems with some later loaded modules)\, use of skunkware available ucb libdbm from /usr/local and additional lib linkage for early uw7 versions execution ability (doc of preferred fix) and various other tweaks..

Background - this started from the svr4 hints file - some of the pieces came from that unchanged and I hadnot attempted to optimise out any redundancies.

Thanks for the work. Sorry to nit-pick\, but I have a number of questions​:

No problem

case "$cc" in '') cc='/bin/cc' test -f $cc || cc='/usr/ccs/bin/cc' ;;

Is this really necessary?

probably not - it came across from svr4.sh

At this point in Configure\, /usr/ccs/bin *is* included in PATH\, so why won't the later search by Configure pick this up?

I presume it will - which makes it redundant I guess ( unless theres any value in wiring the path to a known place at this point)

Also\, is there a difference between /bin/cc and /usr/ccs/bin/cc?

In actuality No - /usr/bin/ccs is a symlink to /usr/ccs/bin/cc

In short\, why can't we rely on $PATH to pick up the correct cc?

probably can - I'll give it a go.

*gcc*) # "$gccversion" not set yet vers=`gcc -v 2>&1 | sed -n -e 's@​.*version \([^ ][^ ]*\) .*@​\1@​p'` case $vers in *2.95*) ccflags='-fno-strict-aliasing' # More optimisation provided in gcc-2.95 causes miniperl to segv. # -fno-strict-aliasing is supposed to correct this but # if it doesn't and you get segv when the build runs miniperl then # disable optimisation as below # optimize=' ' ;;

A more general version of this test is already in Configure for _62 and beyond\, and could easily be back-ported to 5.005_03.

OK - I've not looked at what the _62 version is up to yet.

The comment and alternative non-use of optimize is for working around a bug where the gcc-2.95 being used was built on UW7 without all the reccomended (SCO) patches (unfortunately the currently provided skunkware version of gcc-2.95 was built this way (so we found in testing this perl configure/build).

want\_gdbm='yes'     \# use gdbm if can find library in /usr/local/lib

if [ "$want_gdbm" -a -f /usr/local/lib/libgdbm.so ] ; then i_gdbm='define' else i_gdbm='undef' libswanted=`echo " $libswanted " | sed -e 's/ gdbm / /'` fi

Configure should automatically figure out whether or not you have libgdbm or not. Is this test really necessary?

Yes - I need the option of building a perl without libgdbm support even though its installed on my build system. (for deployment of perl on systems that don't have libgdbm installed).

This test also fails if the user has gdbm installed in /opt/gnu or in a private directory (even though that exact case is documented to work in the INSTALL file).

I missed that - I expected that libgdbm would be (from skunkware) in /usr/local/lib

I guess the check should just force i_gdbm to 'undef' if want_gdbm is '' and rely on the (later) lookup for the library otherwise...

# Don't use irrelevant (but existing) lib dirs # don't want /usr/gnu/lib - original(older) system supplied distrib of perl5 loclibpth=`echo " $loclibpth " | sed -e 's@​ /usr/gnu/lib @​ @​'`

Umm -- what if the user *wants* /usr/gnu/lib? How is the older supplied distribution of perl5 relevant here? I don't understand.

As UW7 is distributed theres nothing in /usr/gnu/lib apart from the supplied version of perl\, Additional open source stuff (skunkware) is loaded into /usr/local and thats generally where we recommend additional pieces get added. - I don't know if theres any Configure checks/setups that would fall over detecting perl files there or not - if you think perl configuration won't get tangled with that I suppose this clause can be removed.

(My bias would be to deprecate any use/lookup of /usr/gnu/* and save   ourselves a directory probe)

# use nm to probe libs - its fast enough on uw7 case "$usenm" in '') usenm=true;; esac

I don't understand the purpose of this part. The default is for Configure to usenm (if Configure can figure out how).

Its possibly unneeded - this clause came from svr4.sh where it was set to false. I just wired it on cos it seemed to work.

It looks to me like you are just setting usenm to the default value it's going to get anyway I also don't understand the "fast enough" comment.

I think that was some weirdness fron sysVrR4.

I am aware of no cases where using nm is the slower alternative. I am aware of cases where nm is insufficient\, however.

############################################################### # Dynamic loading section​: # # ccdlflags : must tell the linker to export all global symbols # cccdlflags​: must tell the compiler to generate relocatable code # lddlflags : must tell the linker to output a shared library # # /usr/local/lib is added for convenience\, since additional libraries # are usually put there

That should be done automatically by Configure. Are you sure this is necessary?

(/usr/local/lib ??) possibly not - its more for doc than anything else

If it is\, the Configure test is somehow broken.

############################################################### # Use dynamic loading usedl='define' dlext='so' dlsrc='dl_dlopen.xs'

Aren't these already the Configure defaults?

I don't know

Why force them?

Early on building this I had some problems getting it to configure that it should be building dynamic libraries. At one stage I wired these explicitly which made it work.

case "$usethreads" in $define|true|[yY]*) ccflags="$ccflags" set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`

How can this work? Above\, you removed the / c / :

Good point. This can probably be removed

It works because the native devsys doesn't need or want this lib spec - its added automatically in the right place with the -Kthread flag. It works for gcc cos it automatically wired -pthread into the ccflags line which does the same thing.

libc​: on UW7 don't want -lc explicitly as native cc gives warnings/errors

# Just in case Configure fails to find lstat() Its in /usr/lib/libc.so.1. d_lstat=define

Do you know why Configure fails to find lstat()? Perhaps we could fix the test.

This was from svr4.sh also - I think the comment in earlier versions of that is something like # Configure may fail to find lstat() since it's a static/inline function # in \<sys/stat.h> on Unisys U6000 SVR4\, UnixWare 2.x\, and possibly other # SVR4 derivatives. (Though UnixWare has it in /usr/ccs/lib/libc.so.)

This is probably redundant here.

Overall\, many thanks again for tackling Configure hints. Sorry to appear so nit-picking\, but future maintenance of hints files and Configure is greatly eased when the hints files do only the minimum necessary and allow for the maximum flexibility at the user's end.

OK - It seemed more reasonable to me to explicitly wire the values to desired values (to doc what the platform expects/works with) since I had some problems working out either the defaults or what Configure is doing outside the hints file. If the preference is to rely on defaults or later configuration discovery I can do that as well.

I'll go over the hints file again removing the (above) things that seem redundant and see if I can get a equally clean and obvious build.

Question​:

theres a comment early on

# Hardwire the processor to 586 for consistancy with autoconf # archname='i586-svr5' # -- seems this is generally disliked by perl porters so leave it to float

I did this to be sorta same as autoconf setup where we've wired the architecture to i586 (since UW7 suggested to run on that or better) and so that we get a common architecture path name (invariant of build machine) for installing perl modules into later.

Boyd thought that there was a porters discussion which ended up suggesting that this was a bad thing and that it should float to whatever the platform provided (and Configure mediated it to). I couldn't find any record of this in the mail list archive.

Do you have any canonical suggestion/reccomendation for this wrt perl ?

-- - hops

Everything disclaimed (including disclaimer) ------\hops@&#8203;sco\.com-------------------------------------- Mike Hopkirk (hops) | Whenever possible steal code. SCO Inc | Tom Duff. (ex) Bell Labs

p5pRT commented 23 years ago

From The RT System itself

perl-current 22Oct00 appears to use newer file.