DBD::Pg compilation error (Windows 10 / Strawberry Perl) - perl

I'm trying to install the DBD::Pg (3.7.4) module on my windows 10/Strawberry Perl, but the compilation failed
For that I downloaded the module on metacpan and executed following command in the windows terminal:
perl Makefile.PL phrtsd_orig
Response:
Configuring DBD::Pg 3.7.4
PostgreSQL version: 90603 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: C:/STRAWB~1/c/include
POSTGRES_LIB: C:/STRAWB~1/c/lib
OS: MSWin32
Multiple copies of Driver.xst found in: C:/Strawberry/perl/site/lib/auto/DBI/ C:/Strawberry/perl/vendor/lib/auto/DBI/ at Makefile.PL line 182.
Multiple copies of Driver.xst found in: C:/Strawberry/perl/site/lib/auto/DBI/ C:/Strawberry/perl/vendor/lib/auto/DBI/ at Makefile.PL line 285.
Using DBI 1.64 (for perl 5.026001 on MSWin32-x64-multi-thread) installed in C:/Strawberry/perl/site/lib/auto/DBI/
Generating a gmake-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json
But the problem comes after the execution of the command gmake.
Response:
Skip blib\lib/Bundle/DBD/Pg.pm (unchanged)
Skip blib\lib\DBD/Pg.pm (unchanged)
Running Mkbootstrap for Pg ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Pg.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Pg.bs blib\arch\auto\DBD\Pg\Pg.bs 644
gcc -c -I"C:/STRAWB~1/c/include" -IC:\Strawberry\perl\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.7.4\" -DXS_VERSION=\"3.7.4\" "-IC:\STRAWB~1\perl\lib\CORE" Pg.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:\Strawberry\perl\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.7.4\" -DXS_VERSION=\"3.7.4\" "-IC:\STRAWB~1\perl\lib\CORE" dbdimp.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:\Strawberry\perl\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.7.4\" -DXS_VERSION=\"3.7.4\" "-IC:\STRAWB~1\perl\lib\CORE" quote.c
gcc -c -I"C:/STRAWB~1/c/include" -IC:\Strawberry\perl\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=90603 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.7.4\" -DXS_VERSION=\"3.7.4\" "-IC:\STRAWB~1\perl\lib\CORE" types.c
g++ Pg.def -o blib\arch\auto\DBD\Pg\Pg.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" Pg.o dbdimp.o quote.o types.o "C:\STRAWB~1\perl\lib\CORE\libperl526.a" "C:\STRAWB~1\c\lib\libpq.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libsecur32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
quote.o:quote.c:(.text+0x63d): undefined reference to `__imp__snprintf.constprop.4'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:496: blib\arch\auto\DBD\Pg\Pg.xs.dll] Error 1
In case this information can help, I have two other module installed:
Switch (2.17)
DBI (1.640)
Thanks in advance for you help !

I can reproduce this with DBD-Pg-3.7.4. It is a known bug. The patch by kmx worked for me.

Related

Unable to setup pg_repack in ubuntu22.04.1 LTS

I want to perform pg_repack in remote postgres server. pg_repack is used to remove bloat from PostgreSQL.
I am following this for reference: https://reorg.github.io/pg_repack/#installation
After installing pgxn, we need to install pg_repack. It's done by
sudo pgxn install pg_repack
And it's resulting in this
INFO: best version: pg_repack 1.4.8
INFO: saving /tmp/tmp3dyb4e3e/pg_repack-1.4.8.zip
INFO: unpacking: /tmp/tmp3dyb4e3e/pg_repack-1.4.8.zip
INFO: building extension
gmake[1]: Entering directory '/tmp/tmp3dyb4e3e/pg_repack-1.4.8/bin'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -I/usr/include/postgresql -DREPACK_VERSION=1.4.8 -I. -I./ -I/usr/include/postgresql/14/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o pg_repack.o pg_repack.c
gmake[1]: gcc: No such file or directory
gmake[1]: *** [<builtin>: pg_repack.o] Error 127
gmake[1]: Leaving directory '/tmp/tmp3dyb4e3e/pg_repack-1.4.8/bin'
gmake: *** [Makefile:35: all] Error 2
ERROR: command returned 2: gmake PG_CONFIG=/usr/bin/pg_config all`
I tried to clone this repo and perform gmake on it directly
gmake PG_CONFIG=/pg_config all
but still I'm getting
gmake: *** No rule to make target 'all'. Stop.

Ora2Pg installing Install DBD::Oracle on windows 10

Im trying to install Ora2Pg and am up to the step of Installing DBD::Oracle
I type
perl -MCPAN -e "install DBD::Oracle" and get the below error
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv --
Oracle.xsc Oracle.c
gcc -c -IC:/WINDOWS.X64_193000_db_home/oci/include -
IC:/WINDOWS.X64_193000_db_home/rdbms/demo -
IC:\Strawberry\perl\vendor\lib\auto\DBI -DWIN32 -DWIN64 -
D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -
DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-
strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.83\" -
DXS_VERSION=\"1.83\" "-IC:\STRAWB~1\perl\lib\CORE" -Wall -Wno-
comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.3.0.0\" -DORA_OCI_102 -
DORA_OCI_112 Oracle.c
gcc: error: CreateProcess: No such file or directory
gmake: *** [Makefile:368: Oracle.o] Error 1
ZARQUON/DBD-Oracle-1.83.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'DBD::Oracle'.
Failed during this command:
ZARQUON/DBD-Oracle-1.83.tar.gz : make NO
Can someone tell advise where I am going wrong
Thank you

cpan XML::LibXSLT failed to install

i tried installing the perl module XML::LibXSLT but it fails. googled for it for hours now but nothing help so i am posting this. Maybe someone can help!
Thanks in advance!
cpan XML::LibXSLT
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
Database was generated on Mon, 28 Oct 2013 11:08:37 GMT
Running install for module 'XML::LibXSLT'
CPAN: YAML loaded ok (v0.84)
Running make for S/SH/SHLOMIF/XML-LibXSLT-1.81.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.062)
Checksum for /root/.cpan/sources/authors/id/S/SH/SHLOMIF/XML-LibXSLT-1.81.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.58)
XML-LibXSLT-1.81/
XML-LibXSLT-1.81/perl-libxml-mm.h
XML-LibXSLT-1.81/benchmark/
XML-LibXSLT-1.81/benchmark/Driver/
XML-LibXSLT-1.81/benchmark/Driver/Sablotron.pm
XML-LibXSLT-1.81/benchmark/Driver/LibXSLT.pm
XML-LibXSLT-1.81/benchmark/Driver/BaseClass.pm
XML-LibXSLT-1.81/benchmark/benchmark.pl
XML-LibXSLT-1.81/Changes
XML-LibXSLT-1.81/LibXSLT.pm
XML-LibXSLT-1.81/MANIFEST
XML-LibXSLT-1.81/testcases/
XML-LibXSLT-1.81/testcases/default.conf
XML-LibXSLT-1.81/example/
XML-LibXSLT-1.81/example/fatal.xsl
XML-LibXSLT-1.81/example/2.xml
XML-LibXSLT-1.81/example/bad3.xsl
XML-LibXSLT-1.81/example/nonfatal.xsl
XML-LibXSLT-1.81/example/1.xml
XML-LibXSLT-1.81/example/bad2.xsl
XML-LibXSLT-1.81/example/1.xsl
XML-LibXSLT-1.81/example/2.xsl
XML-LibXSLT-1.81/example/bad1.xsl
XML-LibXSLT-1.81/Makefile.PL
XML-LibXSLT-1.81/META.yml
XML-LibXSLT-1.81/META.json
XML-LibXSLT-1.81/README
XML-LibXSLT-1.81/t/
XML-LibXSLT-1.81/t/04params.t
XML-LibXSLT-1.81/t/rt71345_a.t
XML-LibXSLT-1.81/t/09exslt.t
XML-LibXSLT-1.81/t/06output.t
XML-LibXSLT-1.81/t/03input.t
XML-LibXSLT-1.81/t/08literal.t
XML-LibXSLT-1.81/t/02dromeds.t
XML-LibXSLT-1.81/t/06entities.t
XML-LibXSLT-1.81/t/11utf8.t
XML-LibXSLT-1.81/t/10functions.t
XML-LibXSLT-1.81/t/05quick.t
XML-LibXSLT-1.81/t/07blankdoc.t
XML-LibXSLT-1.81/t/13error.t
XML-LibXSLT-1.81/t/01basic.t
XML-LibXSLT-1.81/t/14security.t
XML-LibXSLT-1.81/t/12import.t
XML-LibXSLT-1.81/t/15misc.t
XML-LibXSLT-1.81/t/rt71345_b.t
XML-LibXSLT-1.81/typemap
XML-LibXSLT-1.81/LibXSLT.xs
XML-LibXSLT-1.81/ppport.h
XML-LibXSLT-1.81/perl-libxml-mm.c
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build S/SH/SHLOMIF/XML-LibXSLT-1.81.tar.gz
running xslt-config... failed
using fallback values for LIBS and INC
options:
LIBS='-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm'
INC='-I/usr/local/include -I/usr/include'
If this is wrong, Re-run as:
$ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include'
looking for -lxslt... yes
looking for -lexslt... yes
running pkg-config libexslt... ok
Checking if your kit is complete...
Looks good
Generating a GNU-style Makefile
Writing Makefile for XML::LibXSLT
Writing MYMETA.yml and MYMETA.json
cp LibXSLT.pm blib/lib/XML/LibXSLT.pm
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap -typemap typemap LibXSLT.xs > LibXSLT.xsc && mv LibXSLT.xsc LibXSLT.c
gcc -c -I/usr/local/include -I/usr/include -I/usr/include/libxml2 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.81\" -DXS_VERSION=\"1.81\" -fPIC "-I/usr/lib64/perl5/CORE" -DHAVE_BLANK -DHAVE_BLANK -DHAVE_EXSLT LibXSLT.c
LibXSLT.xs: In function ‘LibXSLT__function’:
LibXSLT.xs:252: warning: pointer targets in passing argument 1 of ‘xmlNewDoc’ differ in signedness
/usr/include/libxml2/libxml/tree.h:735: note: expected ‘const xmlChar *’ but argument is of type ‘char *’
LibXSLT.xs: In function ‘LibXSLT_context_element’:
LibXSLT.xs:518: warning: unused variable ‘ent’
LibXSLT.xs: In function ‘LibXSLT_init_functions’:
LibXSLT.xs:916: warning: suggest parentheses around assignment used as truth value
LibXSLT.xs: In function ‘LibXSLT_init_elements’:
LibXSLT.xs:948: warning: suggest parentheses around assignment used as truth value
gcc -c -I/usr/local/include -I/usr/include -I/usr/include/libxml2 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.81\" -DXS_VERSION=\"1.81\" -fPIC "-I/usr/lib64/perl5/CORE" -DHAVE_BLANK -DHAVE_BLANK -DHAVE_EXSLT perl-libxml-mm.c
rm -f blib/arch/auto/XML/LibXSLT/LibXSLT.so
LD_RUN_PATH="/usr/lib64:/lib64" gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic LibXSLT.o perl-libxml-mm.o -o blib/arch/auto/XML/LibXSLT/LibXSLT.so \
-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm -lexslt -lgcrypt -ldl -lgpg-error -lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc \
/usr/bin/ld: cannot find -lgdbm
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/XML/LibXSLT/LibXSLT.so] Error 1
SHLOMIF/XML-LibXSLT-1.81.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
'
Any help is highly appreciated!
The error is /usr/bin/ld: cannot find -lgdbm. do you find gdbm library on your system?
run:
# updatedb
# locate gdbm
The output of locate command should list libgdbm.so. If it is not then try installing the same using your Distro's package manager:
Here is output on my ubuntu:
# locate gdbm
/usr/lib/libgdbm.so.3
/usr/lib/libgdbm.so.3.0.0
/usr/lib/libgdbm_compat.so.3
/usr/lib/libgdbm_compat.so.3.0.0
and here is the output from my RHEL 6.4:
# locate gdbm
/usr/lib64/libgdbm.so.2
/usr/lib64/libgdbm.so.2.0.0
To install gdbm, run these commands:
on ubuntu: apt-get install libgdbm3
On centos/RHEL: yum install gdbm
hope this helps.
/usr/bin/ld: cannot find -lgdbm
Looks like you don't have the gdbm library installed. I can't see which Linux (or, perhaps, Unix) distribution you're using, but gdbm is almost certainly per-packaged for it, so you just need to work out what the package is called and use apt or yum (or whatever is appropriate) to install it.

Installing Perl/Tk on fedora

I am having trouble trying to install perl Tk on my system(fedora,perl v5.8.8).I downloaded the tarred module from http://search.cpan.org/~srezic/Tk-804.029/pod/gencmd, untarred it.In the terminal,I gave "perl Makefile.PL" which worked fine and then "make" which could not complete.Here is what it gave:
"make[1]: Entering directory `/work/harikal/Tk-804.029/pTk'
gcc -c -I.. -I. -Ibitmaps -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\"804.029\" -DXS_VERSION=\"804.029\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE" -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__ tkImgPhoto.c
tkImgPhoto.c: In function ‘AllocateColors’:
tkImgPhoto.c:3584: warning: implicit declaration of function ‘sazeof’
tkImgPhoto.c:3584: error: expected expression before ‘XColor’
make[1]: *** [tkImgPhoto.o] Error 1
make[1]: Leaving directory `/work/harikal/Tk-804.029/pTk'
make: *** [pTk/libpTk.a] Error 2"
and then it exits. What am I supposed to do??
Please Help
Thanks.
If you're using the system-installed Perl, then why not use the Fedora project's pre-built package for the module.
$ sudo yum install perl-Tk
I looked at http://cpansearch.perl.org/src/SREZIC/Tk-804.029/pTk/mTk/generic/tkImgPhoto.c - line 3584 and here says "sizeof" not "sazeof". Doublecheck your source/download.

Problem when installing RSPerl on RedHat

I want to run R (the statistical package) from Perl in RedHat Linux. I found online that there is a package called RSPerl that does this job but I have hard time installing it in RedHat. This software requires R to be installed as a shared library. I followed the instructions but I am facing the following problem when (after installing R without problem) I try to install RSPerl.
[root#xxx opt]# R CMD INSTALL -c -l ./ RSPerl_0.92-1.tar.gz
* installing *source* package âRSPerlâ ...
checking for perl... /usr/bin/perl
No support for any of the Perl modules from calling Perl from R.
*****************************************************
Set PERL5LIB to /opt/RSPerl/perl
*****************************************************
Testing: -L/usr/local/lib64/R/lib -lR
Using '/usr/bin/perl' as the perl executable
Perl modules (no):
Adding R package to list of Perl modules to enable callbacks to R from Perl
Creating the C code for dynamically loading modules with native code for Perl: R
modules: R; linking:
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Support R in Perl: yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating inst/scripts/RSPerl.csh
config.status: creating inst/scripts/RSPerl.bsh
config.status: creating src/RinPerlMakefile
config.status: creating src/Makefile.PL
config.status: creating cleanup
config.status: creating src/R.pm
config.status: creating R/perl5lib.R
making target all in RinPerlMakefile
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c Converters.c -o Converters.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c Reflectance.c -o Reflectance.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c ForeignReference.c -o ForeignReference.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c UserConverters.c -o UserConverters.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c GeneralConverters.c -o GeneralConverters.o
making libPerlConverter.so
/usr/local/lib64/R/bin/R CMD SHLIB -o libPerlConverter.so Converters.c Reflectance.c ForeignReference.c UserConverters.o GeneralConverters.o
make[1]: Entering directory `/tmp/RtmpSqebDp/R.INSTALL68be5031/RSPerl/src'
gcc -std=gnu99 -shared -L/usr/local/lib64 -o libPerlConverter.so Converters.o Reflectance.o ForeignReference.o UserConverters.o GeneralConverters.o -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/local/lib64/R/lib -lR
make[1]: Leaving directory `/tmp/RtmpSqebDp/R.INSTALL68be5031/RSPerl/src'
if test ! -d /opt/RSPerl/libs ; then mkdir /opt/RSPerl/libs ; fi
cp libPerlConverter.so /opt/RSPerl/libs
Makefile.PL PREFIX=/opt/RSPerl LIB=/opt/RSPerl/perl
make: Makefile.PL: Command not found
make: *** [Makefile.perl] Error 127
calling make -f Makefile.perl install
make: Makefile.perl: No such file or directory
make: *** No rule to make target `Makefile.perl'. Stop.
chmod: cannot access `blib/lib/R.pm': No such file or directory
Finished configuration
** libs
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlElements.c -o RPerlElements.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlEval.c -o RPerlEval.o
RPerlEval.c: In function âRS_PerlEvalStringâ:
RPerlEval.c:20: warning: ISO C90 forbids mixed declarations and code
RPerlEval.c: In function âRS_PerlGetâ:
RPerlEval.c:128: warning: ISO C90 forbids mixed declarations and code
RPerlEval.c: In function âRS_PerlCallModifiedâ:
RPerlEval.c:208: warning: ISO C90 forbids mixed declarations and code
RPerlEval.c: In function âRS_PerlCallâ:
RPerlEval.c:377: warning: ISO C90 forbids mixed declarations and code
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlInit.c -o RPerlInit.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlNew.c -o RPerlNew.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlReference.c -o RPerlReference.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c RPerlVars.c -o RPerlVars.o
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c Utils.c -o Utils.o
Utils.c: In function âcharacterVectorToNullTerminatedArrayâ:
Utils.c:35: warning: assignment discards qualifiers from pointer target type
Utils.c: In function âcharacterVectorToArrayâ:
Utils.c:78: warning: assignment discards qualifiers from pointer target type
gcc -std=gnu99 -I/usr/local/lib64/R/include -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fpic -g -O2 -c xsinit.c -o xsinit.o
gcc -std=gnu99 -shared -L/usr/local/lib64 -o RSPerl.so Converters.o ForeignReference.o GeneralConverters.o RPerlElements.o RPerlEval.o RPerlInit.o RPerlNew.o RPerlReference.o RPerlVars.o Reflectance.o UserConverters.o Utils.o xsinit.o -Wl,-E -Wl,-rpath,/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/local/lib64/R/lib -lR
installing to /opt/RSPerl/libs
** R
** inst
** preparing package for lazy loading
** help
Warning: /tmp/RtmpSqebDp/R.INSTALL68be5031/RSPerl/man/PerlReferenceObjects.Rd:32: unknown macro '\textit'
*** installing help indices
** building package indices ...
Removing additional files
rm: cannot remove `src/Makefile.perl': No such file or directory
rm: cannot remove `src/pm_to_blib': No such file or directory
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/RSPerl/libs/RSPerl.so':
/opt/RSPerl/libs/RSPerl.so: undefined symbol: boot_R
Error: loading failed
Execution halted
ERROR: loading failed
* removing â/opt/RSPerlâ
* restoring previous â/opt/RSPerlâ
[root#xxx opt]#
My system information is the following:
Linux version 2.6.18-194.el5 (mockbuild#x86-005.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Tue Mar 16 21:52:39 EDT 2010
and it runs on a 64 bit Xeon server.
Do you have any idea what's going on?
Thank you in advance.
From R-2.12 they remove requirement on perl, hence the PERL (env variable) in lib/R/etc/Renviron will not be set anymore.
One quick fix is to manually set PERL, as following:
PERL=`which perl` R --vanilla CMD INSTALL -c -l ~/library/ RSPerl_0.92-1.tar.gz
make sure you get perl-dev, not only perl (e.g. under ubuntu, apt-get install libperl-dev, if you compiled perl yourself, this won't be a problem)
RSPerl is an interface between R (or S) and Perl. It looks like you need to do some more research and find a Perl package that fits your installation or if you do have a compatible version use a compiler flag or an environment variable that tells R where to find it. Then install RSPerl.
You might want to look at this example of setting environment variables from an admittedly old posting from Duncan Temple Lang.