Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unknown error" as a message from compilation #5026

Closed
p5pRT opened this issue Feb 13, 2002 · 6 comments
Closed

"Unknown error" as a message from compilation #5026

p5pRT opened this issue Feb 13, 2002 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 13, 2002

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

Searchable as RT8512$

@p5pRT
Copy link
Author

p5pRT commented Feb 13, 2002

From ilya@math.ohio-state.edu

This is a bug report for perl from vera@​ia-ia.uucp,
generated with the help of perlbug 1.33 running under perl v5.7.2.

The following module​:
======================== xxx.pm
use strict;
sub AUTOLOAD { $constname || $!{EINVAL} }
1;

emits

  Unknown error
  Compilation failed in require at -e line 1.
  BEGIN failed--compilation aborted at -e line 1.

if you use it (e.g., perl -Mxxx). Apparently, $! is set when $constname
is set, but the S_require_errno overwrites it with "". see the line
before a call to yyparse() in pp_ctl.c​:S_doeval().

Enjoy,
Ilya


Flags​:
  category=core
  severity=medium


Site configuration information for perl v5.7.2​:

Configured by vera at Tue Dec 18 17​:03​:14 PST 2001.

Summary of my perl5 (revision 5.0 version 7 subversion 2 patch 13745) configuration​:
  Platform​:
  osname=os2, osvers=2.30, archname=os2
  uname='os2 ia-ia 2 2.30 i386 '
  config_args='-des -D usedevel -Dprefix=i​:/perllib'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=y, bincompat5005=define
  Compiler​:
  cc='gcc', ccflags ='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -D_EMX_CRT_REV_=63',
  optimize='-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s',
  cppflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -D_EMX_CRT_REV_=63'
  ccversion='', gccversion='2.8.1', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags ='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e​:2'
  libpth=i​:/emx.add/lib i​:/emx/lib D​:/DEVTOOLS/OPENGL/LIB I​:/JAVA11/LIB i​:/emx/lib/mt
  libs=-lsocket -lm -lbsd -lcrypt
  perllibs=-lsocket -lm -lbsd -lcrypt
  libc=i​:/emx/lib/mt/c_import.lib, so=dll, useshrplib=true, libperl=libperl.lib
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-Zdll', lddlflags='-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e​:2'

Locally applied patches​:
  DEVEL13745


@​INC for perl v5.7.2​:
  lib/os2
  lib
  i​:/perllib/lib/5.7.2/os2
  i​:/perllib/lib/5.7.2
  i​:/perllib/lib/site_perl/5.7.2/os2
  i​:/perllib/lib/site_perl/5.7.2
  i​:/perllib/lib/site_perl/5.00553/os2
  i​:/perllib/lib/site_perl/5.00553
  i​:/perllib/lib/site_perl
  .


Environment for perl v5.7.2​:
  HOME=j​:/home
  LANG=EN_US
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=...
  PERLLIB_PREFIX=f​:/perllib;i​:/perllib
  PERL_BADLANG (unset)
  PERL_SH_DIR=i​:/bin
  SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Feb 13, 2002

From @schwern

On Wed, Feb 13, 2002 at 03​:58​:19AM -0500, Ilya Zakharevich wrote​:

This is a bug report for perl from vera@​ia-ia.uucp,
generated with the help of perlbug 1.33 running under perl v5.7.2.

The following module​:
======================== xxx.pm
use strict;
sub AUTOLOAD { $constname || $!{EINVAL} }
1;

emits

Unknown error
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

if you use it (e.g., perl -Mxxx).

Confirmed @​14663, but 5.6.1 and back seem ok.

--

Michael G. Schwern <schwern@​pobox.com> http​://www.pobox.com/~schwern/
Perl Quality Assurance <perl-qa@​perl.org> Kwalitee Is Job One
Lord of Kwalitee! Wearer of the CPANTS and Slayer of Pseudo-hashes!

@p5pRT
Copy link
Author

p5pRT commented Feb 15, 2002

From @rgarcia

On 2002.02.13 09​:58 Ilya Zakharevich wrote​:

The following module​:
======================== xxx.pm
use strict;
sub AUTOLOAD { $constname || $!{EINVAL} }
1;

emits

Unknown error
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

With this small patch, the output now is

$ bleadperl -Mxxx -e1
Global symbol "$c" requires explicit package name at /home/rafael/perllib/xxx.pm line 2.
BEGIN not safe after errors--compilation aborted at /home/rafael/perllib/xxx.pm line 2.
Compilation failed in require.
BEGIN failed--compilation aborted.

Better ideas ?

Inline Patch
--- gv.c.orig	Wed Jan 23 20:55:44 2002
+++ gv.c	Fri Feb 15 23:56:53 2002
@@ -498,7 +498,7 @@
 	PUTBACK;
 	ENTER;
 	save_scalar(gv); /* keep the value of $! */
-	require_pv("Errno.pm");
+	load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Errno",5), Nullsv);
 	LEAVE;
 	SPAGAIN;
 	stash = gv_stashpvn("Errno",5,FALSE);

@p5pRT
Copy link
Author

p5pRT commented Feb 18, 2002

From [Unknown Contact. See original ticket]

At 2002-02-16 00​:06​:01, rgarciasuarez@​free.fr wrote​:

--- gv.c.orig Wed Jan 23 20​:55​:44 2002
+++ gv.c Fri Feb 15 23​:56​:53 2002
@​@​ -498,7 +498,7 @​@​

Thanks, applied. (#14745)

- ams

@p5pRT
Copy link
Author

p5pRT commented Nov 29, 2002

From @jhi

This was resolved for Perl 5.8.0, I'm marking the problem ticket as resolved, too.

@p5pRT
Copy link
Author

p5pRT commented Nov 29, 2002

@jhi - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant