Skip Menu |

This queue is for tickets about the RPerl CPAN distribution.

Report information
The Basics
Id: 113968
Status: resolved
Priority: 0/
Queue: RPerl

People
Owner: WBRASWELL [...] cpan.org
Requestors: email [...] michael.vu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: fail to compile hello world
Hi Will, I am trying RPerl on a hello world script using CPP backend. But it is not so welcoming. Can you have a look please? /usr/bin/ld: cannot find -lperl collect2: error: ld returned 1 exit status Many thanks Michael Vu
Subject: error.log
Verbose Flag......... 1 Debug Flag........... 1 in rperl, have $RPerl::DEBUG = 1 in rperl, have $RPerl::VERBOSE = 1 Input File: bin/test.pl Output File(s): bin/test.cpp bin/test bin/test.h (if needed) Modes: ops => CPP, types => CPP, check => TRACE, uncompile => OFF, compile => SUBCOMPILE, subcompile => DYNAMIC, execute => ON, label => ON DEPENDENCIES: Follow & find all deps... 0 found. PARSE PHASE 0: Check Perl syntax... done. PARSE PHASE 1: Criticize Perl syntax... done. PARSE PHASE 2: Parse RPerl syntax... done. GENERATE: Generate C++ syntax... done. SAVE PHASE 0: Final file modifications... done. SAVE PHASE 1: Format & write files to disk... done. SUBCOMPILE: Generate binary... done. [[[ SUBCOMPILE STDERR ]]] /usr/bin/ld: cannot find -lperl collect2: error: ld returned 1 exit status ERROR ECOCOSU04, COMPILER, SUBCOMPILE: C++ compiler returned error code, please run again with `rperl -D` command or RPERL_DEBUG=1 environmental variable for error messages if none appear above, croaking at /usr/local/bin/rperl line 748.
Subject: perl-version.txt
Summary of my perl5 (revision 5 version 22 subversion 1) configuration: Platform: osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-thread-multi uname='linux bcad5a346f31 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 gnulinux ' config_args='-Dusethreads -Duse64bitall -Duseshrplib -des' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/lib/perl5/5.22.1/x86_64-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_ALL 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_REENTRANT_API Locally applied patches: Devel::PatchPerl 1.38 Built under linux Compiled at Apr 5 2016 17:08:51 %ENV: PERL5LIB="/web/local/lib/perl5" @INC: /web/local/lib/perl5/x86_64-linux-thread-multi /web/local/lib/perl5 /usr/local/lib/perl5/site_perl/5.22.1/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.22.1 /usr/local/lib/perl5/5.22.1/x86_64-linux-thread-multi /usr/local/lib/perl5/5.22.1 .
Subject: test.pl
#!/usr/bin/perl use RPerl; use strict; use warnings; our $VERSION = 0.001_000; # [[[ CRITICS ]]] ## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator ## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils ## no critic qw(ProhibitInterpolationOfLiterals) # USER DEFAULT 3: allow anything print 'Hello Perl';
Hi, Thanks for your interest in RPerl! /usr/bin/ld: cannot find -lperl collect2: error: ld returned 1 exit status This error is caused by not having libperl installed, please use the new installation script in Ubuntu or a compatible OS: https://github.com/wbraswell/rperl/blob/master/script/rperl_installer.sh sudo apt-get install libperl-dev https://github.com/wbraswell/rperl/blob/master/script/rperl_installer.sh#L427 I am marking this ticket as resolved. Perling, ~ Will the Chill