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

Spreadsheet/ParseExcel/Worksheet.pm - "Weak references are not implemented in the version of perl" #13427

Closed
p5pRT opened this issue Nov 18, 2013 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 18, 2013

Migrated from rt.perl.org#120567 (status was 'rejected')

Searchable as RT120567$

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

From kavikrishnanp@in.ibm.com

Team,
Attached below is the error report. Thanks for the help

Thanks
Kavikrishnan

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

From kavikrishnanp@in.ibm.com

Created by kavikrishnanp@in.ibm.com

This is a bug report for perl from kavikrishnanp@​in.ibm.com,
generated with the help of perlbug 1.39 running under perl 5.16.1.

-----------------------------------------------------------------
Subject : Spreadsheet/ParseExcel/Worksheet.pm - "Weak references are not implemented in the version of perl"

Getting below error while executing the code which is used to fetch the users from excel and removing them from Rational ClearQuest.

Error​:
C​:\CQA>cqperl UD_V1.pl
Weak references are not implemented in the version of perl at C​:/Program Files (x8
6)/IBM/RationalSDLC/common/lib/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/Spr
eadsheet/ParseExcel/Worksheet.pm line 20
BEGIN failed--compilation aborted at C​:/Program Files (x86)/IBM/RationalSDLC/commo
n/lib/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/Spreadsheet/ParseExcel/Works
heet.pm line 20.
Compilation failed in require at C​:/Program Files (x86)/IBM/RationalSDLC/common/li
b/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/Spreadsheet/ParseExcel.pm line 2
8.
BEGIN failed--compilation aborted at C​:/Program Files (x86)/IBM/RationalSDLC/commo
n/lib/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/Spreadsheet/ParseExcel.pm li
ne 28.
Compilation failed in require at UD_V1.pl line 1.
BEGIN failed--compilation aborted at UD_V1.pl line 1.

Code​:
use Spreadsheet​::ParseExcel;
use Spreadsheet​::WriteExcel;
use warnings;
use Net​::LDAP;
use CQPerlExt;
open LOG, ">>c​:/cqdellog.txt";
  print LOG " ***********************CQ USER REMOVAL******************* \n" ;
  my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $time) = localtime();
  my $currentdate = sprintf("%4d-%2.2d-%2.2d %2.2d​:%2.2d​:%2.2d", $year + 1900, $mon + 1, $mday, $hour, $min, $sec);
  print LOG "Date= ", $currentdate, "\n";
  print LOG " \n";
#Logging in to CQ database
  my $adminSession = CQAdminSession​::Build();
  $adminSession->Logon( "admin", "", "Local1" );
  my $dbObj = $adminSession->GetDatabase("Test");
  die "Unable to get database!\n" unless $dbObj;
print LOG "Deleting Users \n";
# Parsing the excel values
  my $parser = Spreadsheet​::ParseExcel->new();
  my $workbook = $parser->parse('C​:\cqdelete.xls');
 
  if ( !defined $workbook )
  {
  die $parser->error(), ".\n";
  }
  for my $worksheet ( $workbook->worksheets() )
  {
  my ( $row_min, $row_max ) = $worksheet->row_range();
  my ( $col_min, $col_max ) = $worksheet->col_range();
  $row_max = 999 ;
# Getting excel column values
  for my $row ( 0 ..$row_max) {
  my $cell1 = $worksheet->get_cell( $row, "0" );
  next unless $cell1;
  my $loginname = $cell1->value();
  print LOG "$loginname \n";
my $newUserObj;
  $newUserObj = $adminSession->GetUser($loginname);
  unless ($newUserObj) {
  print LOG " Failed username​: \"$loginname\"\n";
  next;
  }
  $newUserObj->SetActive("0");
}
}
  $dbObj->UpgradeMasterUserInfo();
  CQAdminSession​::Unbuild($adminSession);
  print LOG "\n";
  print LOG "***User Addition Ends Here***\n";
  print LOG "\n";
  close LOG;

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl 5.16.1:

Configured by sshd_server at Thu Aug 30 18:36:52 2012.

Summary of my perl5 (revision 5 version 16 subversion 1) configuration:
   
  Platform:
    osname=MSWin32, osvers=5.2, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='C:\Perl64\site\bin\gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields',
    optimize='-O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='gcc.exe (rubenvb-4.5.4) 4.5.4', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='__int64', ivsize=8, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='C:\Perl64\site\bin\g++.exe', ldflags ='-L"C:\Program Files (x86)\IBM\RationalSDLC\common\lib\perl5\site_perl\5.16.1\MSWin32-x86-thread-multi\lib\CORE"'
    libpth=\lib
    libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
    perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl516.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -L"C:\Program Files (x86)\IBM\RationalSDLC\common\lib\perl5\site_perl\5.16.1\MSWin32-x86-thread-multi\lib\CORE"'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY


@INC for perl 5.16.1:
    C:/Program Files (x86)/IBM/RationalSDLC/common/lib/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/site/lib
    C:/Program Files (x86)/IBM/RationalSDLC/common/lib/perl5/site_perl/5.16.1/MSWin32-x86-thread-multi/lib
    .


Environment for perl 5.16.1:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files (x86)\IBM\RationalSDLC\common\lib\perl5\site_perl\5.16.1\MSWin32-x86-thread-multi\site\bin;C:\Program Files (x86)\IBM\RationalSDLC\common\lib\perl5\site_perl\5.16.1\MSWin32-x86-thread-multi\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Program Files (x86)\IBM\RationalSDLC\common;C:\Program Files (x86)\IBM\RationalSDLC\Clearquest\cqcli\bin;C:\Program Files (x86)\ActiveState Komodo Edit 7\;C:\Perl64\site\bin;C:\Perl64\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Broadcom\WHL\;C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64\;C:\Program Files\Broadcom\WHL\SysWow64\syswow64;C:\Program Files (x86)\Lenovo\Access Connections\;C:\pcomm\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\13.0\DLLShared\;C:\Program Files (x86)\IBM\Mobility Client\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\:C:\Program Files (x86)\IBM\Java70\jre\bin;C:\Program Files (x86)\IBM\Java60\jre;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\PROGRA~2\IBM\SQLLIB\BIN;C:\PROGRA~2\IBM\SQLLIB\FUNCTION;C:\PROGRA~2\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
    PERL_BADLANG (unset)
    PERL_INLINE_JAVA_JNI=1
    SHELL (unset)
=

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

From @bulk88

On Mon Nov 18 05​:19​:43 2013, kavikrishnanp@​in.ibm.com wrote​:

Team,
Attached below is the error report. Thanks for the help

Thanks
Kavikrishnan

I see 3 different perls in your path. An IBM Perl, An ActivePerl 64b with GCC installed via ppm, and a 32 bit ActivePerl.


  ld='C​:\Perl64\site\bin\g++.exe', ldflags ='-L"C​:\Program Files (x86)\IBM\RationalSDLC\common\lib\perl5\site_perl\5.16.1\MSWin32-x86-thread-multi\lib\CORE"'


My @​INC knowledge is poor, but my guess isperlbug ran with ActivePerl 64, which used IBM Perl's Config.pm.

What is the -V of cqperl.exe, not perl.exe?

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

From @ikegami

That messages comes from an incomplete installation of Scalar​::Util.
Specifically, when the XS component missing. Reinstalling it will fix the
issue.

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

From @jkeenan

'perlbug' and rt.perl.org are for the purpose of reporting bugs in Perl 5 or the Perl 5 core distributions.

Spreadsheet​::ParseExcel is not part of the Perl 5 core distribution. This problem should have been reported at​:
https://rt.cpan.org/Ticket/Create.html?Queue=Spreadsheet-ParseExcel

Closing this ticket. Should you need further assistance, please note the instructions for bug reporting which the maintainers of Spreadsheet​::ParseExcel have posted at that rt.cpan.org page.

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented Nov 18, 2013

@jkeenan - Status changed from 'open' to 'rejected'

@p5pRT p5pRT closed this as completed Nov 18, 2013
@p5pRT
Copy link
Author

p5pRT commented Nov 19, 2013

From @ikegami

On Mon, Nov 18, 2013 at 6​:55 PM, James E Keenan via RT <
perlbug-followup@​perl.org> wrote​:

'perlbug' and rt.perl.org are for the purpose of reporting bugs in Perl 5
or the Perl 5 core distributions.

Spreadsheet​::ParseExcel is not part of the Perl 5 core distribution. This
problem should have been reported at​:
https://rt.cpan.org/Ticket/Create.html?Queue=Spreadsheet-ParseExcel

Closing this ticket. Should you need further assistance, please note the
instructions for bug reporting which the maintainers of
Spreadsheet​::ParseExcel have posted at that rt.cpan.org page.

Thank you very much.
Jim Keenan

The problem simplifies to

perl -MScalar​::Util=weaken -e1

Scalar​::Util is a core module, but it has upstream of cpan. You would be
redirected to report that problem at
https://rt.cpan.org/Ticket/Create.html?Queue=Scalar-List-Utils

That said, you would be told it's a problem with your installation and to
reinstall Scalar​::Util. Should you need assistance with that, I recommend
posting on PerlMonks or StackOverflow.

haarg pushed a commit to haarg/perl5 that referenced this issue Oct 21, 2019
RT Perl#13427

TRIE_STORE_REVCHAR() was creating SvPV()s with no trailing '\0'. This
doesn't really matter given the specialised use these are put to, but
it upset valgrind et al when perl was run with -Drv which printf("%s")'s
the contents of the string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant