Perl / perl5

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

Touble Installing Perl v5.6.0 on Solaris #1628

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

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

Searchable as RT2867$

p5pRT commented 24 years ago

From warb@tgf.tc.faa.gov

I just downloaded and untarred Perl v5.6.0.

Running the configure script gives​:

chassis7{root}67​: rm -f config.sh Policy.sh chassis7{root}68​: sh Configure -de

Beginning of configuration questions for perl5.

Checking echo to see how to suppress newlines... ...using \c The star should be here-->*

First let's make sure your kit is complete. Checking... lib/locale.pm​: No such file or directory

THIS PACKAGE SEEMS TO BE INCOMPLETE.

You have the option of continuing the configuration process\, despite the

distinct possibility that your kit is damaged\, by typing 'y'es. If you do\, don't blame me if something goes wrong. I advise you to type 'n'o and contact the author (perlbug@​perl.com).

Continue? [n]

Continuing make spits out :

  `sh cflags libperl.a miniperlmain.o` miniperlmain.c   CCCMD = cc -DPERL_CORE -c -I/usr/local/include -O "./intrpvar.h"\, line 14​: invalid token​: ## "./intrpvar.h"\, line 14​: undefined or not a type​: PL_ "./intrpvar.h"\, line 14​: syntax error before or at​: Iorigargc "./intrpvar.h"\, line 14​: warning​: old-style declaration or incorrect type for​: I origargc "./intrpvar.h"\, line 15​: invalid token​: ## "./intrpvar.h"\, line 15​: undefined or not a type​: PL_ "./intrpvar.h"\, line 15​: syntax error before or at​: Iorigargv "./intrpvar.h"\, line 15​: warning​: old-style declaration or incorrect type for​: I origargv ......

myconfig gives​:

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration​:

  Platform​:   osname=solaris\, osvers=2.5.1\, archname=sun4-solaris   uname='sunos chassis7 5.5.1 generic_103640-27 sun4u sparc sunw\,ultra-enterprise '   config_args='-de'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef   useperlio=undef d_sfio=undef uselargefiles=define   use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef   Compiler​:   cc='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=16   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=4   alignbytes=8\, usemymalloc=y\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags =' -L/usr/local/lib '   libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib   libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec   libc=/lib/libc.so\, so=so\, useshrplib=false\, libperl=libperl.a   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags=' '   cccdlflags='-KPIC'\, lddlflags='-G -L/usr/local/lib'

~

--   System Simulation Support Branch\, ACT-510 TGF (Target Generation Facility\, an Air Traffic Control Simulator) FAA Technical Center\, Atlantic City International Airport\, NJ 08405 Mail Stop ACT-510 Phone​: 609-485-4480 Dan Warburton warb@​tgf.tc.faa.gov

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Dan Warburton \warb@​tgf\.tc\.faa\.gov writes​:

I just downloaded and untarred Perl v5.6.0.

First let's make sure your kit is complete. Checking... lib/locale.pm​: No such file or directory

This is a symptom of using (say) a GNU tar compiled for SunOS4 on Solaris. When you run SunOS4 binaries on Solaris the run-time system magically treats pathnames matching m#lib/locale# - so when tar tries to create lib/locale.pm another one gets created instead.

You may find the file under its assumed name and be able to rename it back. Or use Sun's tar to do the extract.

miniperlmain.c CCCMD = cc -DPERL_CORE -c -I/usr/local/include -O "./intrpvar.h"\, line 14​: invalid token​: ##

You have also found the old SunOS4 /bin/cc or perhaps /usr/ucb/cc neither of which can handle ANSI C which perl5.005+ requires. You need to get an ANSI C compiler - either SunPRO or GCC is fine. (If you use gcc be sure it is compiled for version of Solaris you are using.)

-- Nick Ing-Simmons

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

At 17​:30 +0100 2000-03-30\, Nick Ing-Simmons wrote​:

Dan Warburton \warb@​tgf\.tc\.faa\.gov writes​:

I just downloaded and untarred Perl v5.6.0. ... lib/locale.pm​: No such file or directory

This is a symptom of using (say) a GNU tar compiled for SunOS4 on Solaris.

As this is becoming something of an FAQ\, here's Nick's advice recast as a patch for INSTALL (trusting that's OK\, Nick)​:

Inline Patch ```diff --- perl-5.6.0/INSTALL~ Tue Mar 7 22:40:27 2000 +++ perl-5.6.0/INSTALL Fri Mar 31 10:39:12 2000 @@ -113,8 +113,38 @@ =head1 WARNING: This version requires a compiler that supports ANSI C. -If you find that your C compiler is not ANSI-capable, try obtaining +Most C compilers are now ANSI-compliant. However, a few current +computers, notably from Hewlett-Packard and Sun, are delivered with an +older C compiler expressly for rebuilding the system kernel. Such +compilers are not suitable for building Perl. Alternatively, you may +have an old machine which was shipped before ANSI compliance became +widespread. + +If you find that your C compiler is not ANSI-capable, There are several +avenues open to you: + +=over 4 + +=item * + +You may try obtaining GCC, available from GNU mirrors worldwide (e.g. ftp://ftp.gnu.org/pub/gnu). +If, rather than building gcc from source code, you locate a +binary version configured for your platform, be sure that it is +compiled for version of the operating system that you are +using. + +=item * + +You may purchase a commercial ANSI C compiler from your system +supplier or elsewhere. (Or your organization may already have +licensed the software -- ask your colleagues to find out how to access +it.) If there is a README file for your system in the Perl +distribution (for example, F), it may contain advice on +suitable compilers. + +=item * + Another alternative may be to use a tool like ansi2knr to convert the sources back to K&R style, but there is no guarantee this route will get you anywhere, since the prototypes are not the only ANSI features used @@ -128,6 +158,8 @@ form, be sure to email perlbug@perl.com to let us know the steps you followed. This will enable us to officially support this option. +=back + Although Perl can be compiled using a C++ compiler, the Configure script does not work with some C++ compilers. @@ -1517,6 +1549,21 @@ to include the GNU utils before running Configure, or specify the vendor-supplied utilities explicitly to Configure, for example by Configure -Dar=/bin/ar. + +=item lib/locale.pm: No such file or directory + +This is a symptom of using (say) a GNU tar compiled for SunOS4 on +Solaris. When you run SunOS4 binaries on Solaris the run-time system +magically alters pathnames matching m#lib/locale# - so when tar tries +to create lib/locale.pm a differently-named file gets created instead. + +You may find the file under its assumed name and be able to rename it +back. Or use Sun's tar to do the extract. + +=item invalid token: ## + +You are using a non-ANSI-compliant C compiler. See L. =item Miscellaneous ```
p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Dominic Dunlop \domo@​computer\.org writes​:

As this is becoming something of an FAQ\, here's Nick's advice recast as a patch for INSTALL (trusting that's OK\, Nick)​:

Sure - saved me the effort. I thought both of these were already there and meant to go check.

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Dominic Dunlop (lists.p5p)​:

+compiled for version of the operating system that you are   ^the

Sorry. Feeling pedantic\, but therein lies accurate documentation.

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

+compiled for version of the operating system that you are ^the

Sorry. Feeling pedantic\, but therein lies accurate documentation.

Accurate documentation must always concern itself with what lies therein you might find. :-)

--tom

p5pRT commented 24 years ago

From @AlanBurlison

Dominic Dunlop wrote​:

+computers\, notably from Hewlett-Packard and Sun\, are delivered with an +older C compiler expressly for rebuilding the system kernel. Such

Not true for Solaris - the kernel doesn't ever need rebuilding by end-users. I'm not exactly sure why there is still a cc in /usr/ucb/cc.

Alan Burlison

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Dominic Dunlop \domo@​computer\.org wrote

+ +=item lib/locale.pm​: No such file or directory +

Won't this error first show up as a failure of the MANIFEST check\,

  THIS PACKAGE SEEMS TO BE INCOMPLETE

?

Wouldn't this item be better put there?

Mike Guy

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

At 16​:04 +0100 2000-03-31\, M.J.T. Guy wrote​:

Won't this error first show up as a failure of the MANIFEST check\,

THIS PACKAGE SEEMS TO BE INCOMPLETE

Good point. I'll have another shot at the patch.

p5pRT commented 24 years ago

From @AlanBurlison

One of my colleagues reminded me of why /usr/ucb/cc is there​:

  It magically sets the include and library paths to use the BSD   compatibility components before passing the invocation on to the   Workshop compiler.

Alan Burlison

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

According to Dominic Dunlop \domo@​computer\.org​: :+Most C compilers are now ANSI-compliant. However\, a few current :+computers\, notably from Hewlett-Packard and Sun\, are delivered with an :+older C compiler expressly for rebuilding the system kernel. Such

Note however that this is not technically true. Sun has not for quite some time 'delivered' a non-ANSI compliant compiler. That's because a number of years ago they quit including a C compiler with the OS. What you may want to say is something like "people using antique versions of OSes will of course realize that there is a likelihood that their out of date\, no longer supported OS may be so old as to not have such a compiler.

Sun delivers a _wrapper_ called /usr/ucb/cc . This wrapper at one time attempted to juggle paths\, libraries and include files to generate a compile/link using UCB compatible libraries. It invoked whatever compiler one had on the system.

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

At 10​:09 +0100 2000-04-02\, Alan Burlison wrote​:

One of my colleagues reminded me of why /usr/ucb/cc is there​:

It magically sets the include and library paths to use the BSD compatibility components before passing the invocation on to the Workshop compiler.

So you only have it if you've got the Workshop\, right? And it only bites you if your path is perverse?

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Dominic Dunlop \domo@​computer\.org writes​:

At 10​:09 +0100 2000-04-02\, Alan Burlison wrote​:

One of my colleagues reminded me of why /usr/ucb/cc is there​:

It magically sets the include and library paths to use the BSD compatibility components before passing the invocation on to the Workshop compiler.

So you only have it if you've got the Workshop\, right?

No. It is there on my home machine and that never has had Workshop. But without Workshop all it does it say "Optional software not installed".

And it only bites you if your path is perverse?

That is true enough - you have to have /usr/ucb there for it to bite\, and I at least consider that "perverse".

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

OK. Here's a revised patch for INSTALL. I hope that it answers all the points that people have raised. Couple of supplementary points​:

-- Is it worth leaving that stuff about ansi2knr in? Even if you can convert prototypes\, you've still got cpp issues to hack\, and anyway\, thanks largely to gcc\, perl's requirement for an ANSI C compiler doesn't seem to be that big a deal​: does anybody know of any platform stuck with an old perl because it's impossible to obtain an ANSI compiler for it? The 3B1 springs to mind\, but only because Andy D's mentioned it recently. It's probably true of some of the other MIA systems listed at the end of perlport.pod\, but how much do we care? AFAICT\, K&R support isn't on either (any?) to-do list\, so I'd vote for dropping discussion of it from INSTALL. (And\, BTW\, why aren't Todo and pod/perltodo.pod the same thing?)

-- Strikes me that there's enough Sun-specific stuff in INSTALL to make it worthwhile breaking it out into a separate README.sun. Anybody care to volunteer?

Inline Patch ```diff --- perl-5.6.0/INSTALL-as-received Tue Mar 7 22:40:27 2000 +++ perl-5.6.0/INSTALL Mon Apr 3 11:21:33 2000 @@ -6,7 +6,7 @@ First, make sure you are installing an up-to-date version of Perl. If you didn't get your Perl source from CPAN, check the latest version at -. +. The basic steps to build and install perl5 on a Unix system with all the defaults are: @@ -113,8 +113,42 @@ =head1 WARNING: This version requires a compiler that supports ANSI C. -If you find that your C compiler is not ANSI-capable, try obtaining -GCC, available from GNU mirrors worldwide (e.g. ftp://ftp.gnu.org/pub/gnu). +Most C compilers are now ANSI-compliant. However, a few current +computers are delivered with an older C compiler expressly for +rebuilding the system kernel, or for some other historical reason. +Alternatively, you may have an old machine which was shipped before +ANSI compliance became widespread. Such compilers are not suitable +for building Perl. + +If you find that your default C compiler is not ANSI-capable, but you +know that an ANSI-capable compiler is installed on your system, you +can tell F to use the correct compiler by means of the +C<-Dcc=> command-line option -- see L<"gcc">. + +If do not have an ANSI-capable compiler there are several avenues open +to you: + +=over 4 + +=item * + +You may try obtaining GCC, available from GNU mirrors worldwide, +listed at . If, rather than +building gcc from source code, you locate a binary version configured +for your platform, be sure that it is compiled for the version of the +operating system that you are using. + +=item * + +You may purchase a commercial ANSI C compiler from your system +supplier or elsewhere. (Or your organization may already have +licensed such software -- ask your colleagues to find out how to +access it.) If there is a README file for your system in the Perl +distribution (for example, F), it may contain advice on +suitable compilers. + +=item * + Another alternative may be to use a tool like ansi2knr to convert the sources back to K&R style, but there is no guarantee this route will get you anywhere, since the prototypes are not the only ANSI features used @@ -128,6 +162,8 @@ form, be sure to email perlbug@perl.com to let us know the steps you followed. This will enable us to officially support this option. +=back + Although Perl can be compiled using a C++ compiler, the Configure script does not work with some C++ compilers. @@ -1517,6 +1553,36 @@ to include the GNU utils before running Configure, or specify the vendor-supplied utilities explicitly to Configure, for example by Configure -Dar=/bin/ar. + +=item THIS PACKAGE SEEMS TO BE INCOMPLETE + +The F program has not been able to find all the files which +make up the complete Perl distribution. You may have a damaged source +archive file (in which case you may also have seen messages such as +C and C), or you may have obtained a structurally-sound but +incomplete archive. In either case, try downloading again from the +official site named at the start of this document. If you do find +that any site is carrying a corrupted or incomplete source code +archive, please report it to the site's maintainer. + +This message can also be a symptom of using (say) a GNU tar compiled +for SunOS4 on Solaris. When you run SunOS4 binaries on Solaris the +run-time system magically alters pathnames matching m#lib/locale# - so +when tar tries to create lib/locale.pm a differently-named file gets +created instead. + +You may find the file under its assumed name and be able to rename it +back. Or use Sun's tar to do the extract. + +=item invalid token: ## + +You are using a non-ANSI-compliant C compiler. See L. + +=item lib/locale.pm: No such file or directory + +See L. =item Miscellaneous ```
p5pRT commented 24 years ago

From @doughera88

On Sun\, 2 Apr 2000\, Dominic Dunlop wrote​:

At 10​:09 +0100 2000-04-02\, Alan Burlison wrote​:

One of my colleagues reminded me of why /usr/ucb/cc is there​:

It magically sets the include and library paths to use the BSD compatibility components before passing the invocation on to the Workshop compiler.

So you only have it if you've got the Workshop\, right? And it only bites you if your path is perverse?

No\, at least in Solaris 2.6 (and earlier\, I'm pretty sure). The /usr/ucb/cc shell script wrapper is there even without the add-on compilers\, but it's just a shell script wrapper. If it can't find the appropriate actual compiler\, it exits with the error message​:

  /usr/ucb/cc​: language optional software package not installed

Thanks\, by the way\, for politely trying to help out with this and many other Configuration issues.

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

p5pRT commented 24 years ago

From @doughera88

On Mon\, 3 Apr 2000\, Nick Ing-Simmons wrote​:

And it only bites you if your path is perverse?

That is true enough - you have to have /usr/ucb there for it to bite\, and I at least consider that "perverse".

Actually Configure adds /usr/ucb at the end of PATH anyway\, since\, at least for earlier versions of Solaris (2.4 is where I did this stuff) Configure tries to use commands only found in /usr/ucb. (If memory serves\, hostname or perhaps domainname was the relevant command.)

But putting /usr/ucb early in PATH is definitely not the recommended strategy.

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