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

Failure in Bytecode.pm with package B-C-1.55 #433

Open
jameysiddiqui opened this issue Nov 19, 2019 · 6 comments
Open

Failure in Bytecode.pm with package B-C-1.55 #433

jameysiddiqui opened this issue Nov 19, 2019 · 6 comments
Assignees
Labels

Comments

@jameysiddiqui
Copy link

Can't locate object method "ix" via package "0" (perhaps you forgot to load "0"?) at C:/perl/vendor/lib/B/Bytecode.pm line 1017.
Please provide any inputs

@rurban
Copy link
Owner

rurban commented Nov 19, 2019

I'm sorry, but I need your inputs. Which perl - V exactly, which testscript, does it work with the latest compiler version.

@rurban rurban self-assigned this Nov 19, 2019
@jameysiddiqui
Copy link
Author

Hi Rurban,
Thanks for reply
We were having legacy product using 5.8.2 version of perl in which Bytecode.pm was available in
'perl\lib\B' folder, recently upgraded to 5.28 version of perl for that installed B-C-1.55 package for Bytecode.pm.
I have command as follows "C:\perl\bin\perlcc.bat -o show_env.cgi -B show_env.ipl".
This was working but new version seems to have cause the issue mentioned.
Sorry I cannot provide the perl script because of copyright issues, Any inputs will be helpful.

Perl -V output

Summary of my perl5 (revision 5 version 28 subversion 0) configuration:

Platform:
osname=MSWin32
osvers=10.0.14393
archname=MSWin32-x64-multi-thread
uname=''
config_args='undef'
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='cl'
ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS'
optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise'
cppflags='-DWIN32'
ccversion='18.00.40629'
gccversion=''
gccosandvers=''
intsize=4
longsize=4
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=undef
longlongsize=8
d_longdbl=define
longdblsize=8
longdblkind=0
ivtype='__int64'
ivsize=8
nvtype='double'
nvsize=8
Off_t='__int64'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='link'
ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"'
libpth="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64"
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
libc=msvcrt.lib
so=dll
useshrplib=true
libperl=perl528.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs
dlext=dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"'

Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
HAVE_INTERP_INTERN
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Aug 16 2018 16:27:10
@inc:
c:/perl/site/lib
c:/perl/vendor/lib
c:/perl/lib

Thanks,
Jamey

@rurban
Copy link
Owner

rurban commented Nov 19, 2019

I see. I think you need to install B::C 1.57 then, the latest version.

Oops, I forgot. Perl 5.22 broke bytecide compiler completely. You can only use cperl then, which has this fixed. p5p refuses to fix several compiler bugs for years.

@jameysiddiqui
Copy link
Author

Is there any alternative to Bytecode.pm, any other package which can do similar if installed.

@jameysiddiqui
Copy link
Author

jameysiddiqui commented Nov 21, 2019

Hi Rurban,
I installed perl 5.30.1, I executed the below command
C:\perl\bin>C:\perl\bin\perlcc.bat -o test.cgi -B file.ipl

still landed in below error:
Can't locate object method "ix" via package "0" (perhaps you forgot to load "0"?) at C:/perl/vendor/lib/B/Bytecode.pm line 1017.
CHECK failed--call queue aborted.

These are contents of file.ipl
#*************************
use strict;
use warnings;

print("Hello World\n");
#*************************

I was expecting this to pass and generate CGI file.

Output of perl - V

C:\perl\bin>perl -V
Summary of my perl5 (revision 5 version 30 subversion 1) configuration:

Platform:
osname=MSWin32
osvers=10.0.14393
archname=MSWin32-x64-multi-thread
uname=''
config_args='undef'
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='cl'
ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS'
optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise'
cppflags='-DWIN32'
ccversion='18.00.40629'
gccversion=''
gccosandvers=''
intsize=4
longsize=4
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=undef
longlongsize=8
d_longdbl=define
longdblsize=8
longdblkind=0
ivtype='__int64'
ivsize=8
nvtype='double'
nvsize=8
Off_t='__int64'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='link'
ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"'
libpth="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64"
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
libc=msvcrt.lib
so=dll
useshrplib=true
libperl=perl530.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs
dlext=dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"'

Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
HAVE_INTERP_INTERN
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_THREAD_SAFE_LOCALE
Built under MSWin32
Compiled at Nov 21 2019 12:09:18
@inc:
C:/perl/site/lib
C:/perl/vendor/lib
C:/perl/lib

Any inputs will be helpful.

Thanks,
Jamey

@rurban
Copy link
Owner

rurban commented Nov 22, 2019

As I said, perl 5.22 broke the bytecode compiler. You can only use cperl or any perl before 5.22.

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

No branches or pull requests

2 participants