/usr/bin/perl : Symbol look-up error; undefined symbol: Perl_Istack_sp_ptr - perl

Whenever I am using lcov command (lcov-1.9) for gcc 3.4 compiled objects and the corresponding .gcda files, I get an error.
Command I execute:
lcov -c -d . --gcov-tool /usr/bin/gcov34 -o datafile
Error:
/usr/bin/perl: symbol lookup error: /u01/R122_EBS/fs1/FMW_Home/webtier/perl/lib/5.10.0/x86_64-linux-thread-multi/auto/Cwd/Cwd.so: undefined symbol: Perl_Istack_sp_ptr
Is it because something is wrong with Perl? (But, Perl on our development server should be probably be alright.) Or because of some version mismatches between lcov and GCC or something else?
Any clues?

Related

Issue with net-snmp build on Solaris 11

I am building net-snmp 5.7.3 on Solaris11 sparc. I am having my path set as:
/usr/local/lib:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/ade/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gnu:/usr/sbin:/usr/bin:/usr/ccs/bin/ar
I run ./configure --prefix=/opt with default option and it was successful. After that when i do make, i am getting below error message, Any help is appreciated.
libtool: compile: gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c keytools.c -fPIC -DPIC -o .libs/keytools.o
keytools.c: In function ‘generate_Ku’:
keytools.c:153:9: warning: assignment makes pointer from integer without a cast
keytools.c:161:9: error: invalid use of void expression
keytools.c:166:13: error: invalid use of void expression
*** Error code 1
make: Fatal error: Command failed for target `keytools.lo'
Current working directory /scratch/kkumsati/net-snmp/snmplib
*** Error code 1
The following command caused the error:
if test "snmplib agent apps man local mibs" != ""; then \
it="snmplib agent apps man local mibs" ; \
for i in $it ; do \
echo "making all in `pwd`/$i"; \
( cd $i ; make ) ; \
if test $? != 0 ; then \
exit 1 ; \
fi \
done \
fi
make: Fatal error: Command failed for target `subdirs'
Look for README.solaris file in source folder. It has 'Compiling net-snmp' section.
In README you could find the following:
You need to set your $PATH. This is extremely important
because otherwise there may be conflicts between the various
components of the development environment.
Wrong PATH is your problem.
The other possible problem are old openssl headers in your system.
You have an error about function EVP_MD_CTX_create() (error in keytools.c:153:9), this function is declared in Solaris file /usr/include/openssl/evp.h, this file is included in package pkg:/library/security/openssl. Version of this package on my OS is 1.0.1.18-0.175.3.5.0.5.0.
I recommend you to update OS, or package pkg:/library/security/openssl or try to run configure script with --with-openssl=internal option.
Also update gcc, I used this version
pkg install developer/gcc-48
export PATH=/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/bin:
./configure --prefix=/opt --with-mib-modules="ucd-snmp/lmSensors \
ucd-snmp/diskio smux mibII/mta_sendmail" --with-cc=gcc
gmake
Here I received an error about:
/usr/include/sys/processor.h:188:45: error: unknown type name 'kthread_t'
extern boolean_t i_processor_affinity_check(kthread_t *, struct cpu *);
^
/usr/include/sys/processor.h:189:37: error: unknown type name 'kthread_t'
extern int i_processor_affinity_one(kthread_t *, id_t, boolean_t);
^
/usr/include/sys/processor.h:190:33: error: unknown type name 'kthread_t'
extern int i_processor_affinity(kthread_t *, uint_t *, id_t *, uint32_t *,
^
To solve this edit file agent/mibgroup/host/data_access/swrun_procfs_psinfo.c and add to its header at 26 line (before problem line):
#include <sys/processor.h>
#include <sys/procset.h>
#include <thread.h>
Link about this bug
then repeat
gmake
gmake test
gmake install; #this command with root permissons
I succeed on SPARC.

Install Perl Image::Magick on Fedora

I'm installing Image::Magick via cpan and I keep getting this error. I've tried with and without forcing it. I've trimmed the install log. I've read something about missing an ImageMagick.h file but don't exactly know anything other then that. Apparently this has been a common problem since 2007.....
[gandalf#Durmstrang ~]$ cpan -if Image::Magick
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap "/usr/share/perl5/ExtUtils/typemap" -typemap "typemap" Magick.xs > Magick.xsc && mv Magick.xsc Magick.c
gcc -c -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-6" -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"6.89\" -DXS_VERSION=\"6.89\" -fPIC "-I/usr/lib64/perl5/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs: In function ‘XS_Image__Magick_ComplexImages’:
Magick.xs:3475:5: error: unknown type name ‘ComplexOperator’
ComplexOperator
^
Magick.xs:3510:8: error: ‘UndefinedComplexOperator’ undeclared (first use in this function)
op=UndefinedComplexOperator;
^
Magick.xs:3510:8: note: each undeclared identifier is reported only once for each function it appears in
Magick.xs:3516:31: error: ‘MagickComplexOptions’ undeclared (first use in this function)
in=ParseCommandOption(MagickComplexOptions,MagickFalse,(char *)
^
Magick.xs:3524:13: error: ‘ComplexOperator’ undeclared (first use in this function)
op=(ComplexOperator) in;
^
Magick.xs:3524:30: error: expected ‘;’ before ‘in’
op=(ComplexOperator) in;
^
Magick.xs:3548:38: error: expected ‘;’ before ‘in’
op=(ComplexOperator) in;
^
Magick.xs:3563:5: warning: implicit declaration of function ‘ComplexImages’ [-Wimplicit-function-declaration]
image=ComplexImages(image,op,exception);
^
Magick.xs:3563:10: warning: assignment makes pointer from integer without a cast [enabled by default]
image=ComplexImages(image,op,exception);
^
Magick.xs: In function ‘XS_Image__Magick_Mogrify’:
Magick.xs:9824:11: warning: implicit declaration of function ‘RotationalBlurImageChannel’ [-Wimplicit-function-declaration]
image=RotationalBlurImageChannel(image,channel,geometry_info.rho,
^
Magick.xs:9824:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=RotationalBlurImageChannel(image,channel,geometry_info.rho,
^
Magick.xs:10895:11: warning: implicit declaration of function ‘CannyEdgeImage’ [-Wimplicit-function-declaration]
image=CannyEdgeImage(image,geometry_info.rho,geometry_info.sigma,
^
Magick.xs:10895:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=CannyEdgeImage(image,geometry_info.rho,geometry_info.sigma,
^
Magick.xs:10916:11: warning: implicit declaration of function ‘HoughLineImage’ [-Wimplicit-function-declaration]
image=HoughLineImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10916:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=HoughLineImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10939:11: warning: implicit declaration of function ‘MeanShiftImage’ [-Wimplicit-function-declaration]
image=MeanShiftImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10939:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=MeanShiftImage(image,(size_t) geometry_info.rho,(size_t)
^
make: *** [Magick.o] Error 1
JCRISTY/PerlMagick-6.89-1.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
The problem is that CPAN doesn't know about non-Perl dependencies.
The Perl Image::Magick module is just a wrapper around a C library. You'll need that library installed before you can build the Perl module.
$ sudo yum install ImageMagick
It also probably need ImageMagick's development package.
$ sudo yum install ImageMagick-devel
But it's probably easier to just install the RPM version that has already been packaged for Fedora (that will automatically pull in any other requirements).
$ sudo yum install ImageMagick-perl
In Fedora, CentOS, Ubuntu and more there have been this type of challenge in geting Image::Magick to install via the cpan program, and there have been sensitivities about the install-script for Image::Magick for a couple of years, it seems (if one searches around). This is so both for on desktop Linux and, even more so, via Apache cpanel. There are recipies but at least at Ubuntu, they have not been solving all issues. Sometimes, to get it right, one must first do removal of relevant libraries using ImageMagick to reset the links. All the proposed solutions center around installing other things before using 'cpan'. However, the best approach, I find, isn't at all to compile from source but to install the binary ImageMagick application when that is available, and relevant libraries before and after cpan, like this--in Ubuntu, but adapted for Fedora it should be similar or much the same:
sudo apt-get install perlmagick
sudo apt-get install ImageMagick
sudo cpan install Image::Magick
sudo apt-get install libperl-dev
For the sake of completeness, if one cannot find the right binary, one must take care to preinstall all relevant libraries as indicated on http://www.imagemagick.org and then this set of commands will replace the line#2 above, when performed after 'sudo -i' (in Ubuntu) or equivalent in Fedora, inside a temporary folder:
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd Imag*
./configure --with-perl
make
make install
When this installation is complete, proceed with line#3 above. Adapt the beginning of the command to the form that fits with other forms of linuxes. After this, a perl program having use Image::Magick; in its start should be able to do such as resizing of jpg images etc flawlessly.

unable to build binutils for my cross compiler

i am trying to build binutils 2.19.1 with mingw/msys using following commands:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
and im getting following errors:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'. Stop.
make: *** No rule to make target `install-gcc'. Stop.
i am getting the same error even for the diff binutils version,i have tried binutils-2.19.1, 2.22.0, 2.23.1
so what can be the problem ??
also my mingw's gcc compiler version is 4.6.2
i've also tried the command
make CFLAGS="-Os -w"
bt still the same problem persists
I'm getting a similar error ("cygpath: command not found"), but with newer versions. FWICT there is a line within binutils that assumes that Cygwin is present, although I didn't see any notes in the build instructions saying that Cygwin was required (I might have missed it, though).
I suppose the correct approach would be to install Cygwin, but I'm not sure if that will interfere with Mingw in other ways. It looks like binutils is just trying to use cygpath to convert between O/S path naming conventions, so I got around this problem by creating a little dummy cygpath shell script:
#options described at http://cygwin-lite.sourceforge.net/html/cygpath.html
#echo "MISSING CYGPATH"
if [ "x$1" == "x-w" ]
then
echo $2 #just echo path name back as-is
else
read -p "MISSING CYGPATH. PARAMS WERE: 1=$1 2=$2 3=$3 4=$4 5=$5"
fi
I placed this on the PATH so binutils could find it, instead of getting an error during the build. This script just echoes the path name back as-is (for the path renaming scenario), since Windows seems to be able to understand Unix-style paths anyways these days (and I was running on Windows). For anything else, this script will pause and display the first few command line parameters, to provide some hints as to what further functionality is needed.
HTH someone get a little farther

Installing Text::Aspell on windows XP

I've installed Aspell-0-50-3-3-Setup.exe and the dictionary Aspell-en-
0.50-2-3.exe from http://aspell.net/win32/ I've included this folder in my
environment variable PATH : C:\Program Files\Aspell\bin but I still can't
install Text::Aspell. My perl version is ActivePerl 5.16.1
Build 1601. These are the error messages that I get:
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -laspell
Aspell.xs:4:20: aspell.h: No such file or directory
Aspell.xs:9: error: syntax error before "AspellCanHaveError"
Aspell.xs:9: warning: no semicolon at end of struct or union
Aspell.xs:10: warning: data definition has no type or storage class
Aspell.xs:11: error: syntax error before '*' token
Aspell.xs:11: warning: data definition has no type or storage class
Aspell.xs:14: error: syntax error before '}' token
Aspell.xs:14: warning: data definition has no type or storage class
Aspell.xs:17: error: syntax error before '*' token
Aspell.xs: In function `_create_speller':
Writing Makefile for Text::Aspell
Writing MYMETA.yml and MYMETA.json
cp Aspell.pm blib\lib\Text\Aspell.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -noprototypes -typemap
C:\Perl\lib\ExtUtils\typemap -typemap typemap Aspell.xs > Aspell.xsc &&
C:\Perl\bin\perl.exe -MExtUtils::Command -e mv -- Aspell.xsc Aspell.c
C:\Perl\site\bin\gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT
DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -
DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-
aliasing -mms-bitfields -O2 -DVERSION=\"0.09\" -
DXS_VERSION=\"0.09\" "-IC:\Perl\lib\CORE" Aspell.c
[32m HANK/Text-Aspell-0.09.tar.gz[0m
[31m C:\Perl\site\bin\dmake.exe -- NOT OK[0m
[32mRunning make test
[32m Can't test without successful make
[32mRunning make install Make had returned bad status, install seems impossible
[32mFailed during this command:
HANK/Text-Aspell-0.09.tar.gz
: make NO
[32m[0m
Your problem is Note (probably harmless): No library found for -laspell
The solution from http://cpansearch.perl.org/src/HANK/Text-Aspell-0.09/README
is to tell Makefile.PL where to find libaspell
perl Makefile.PL CCFLAGS=-I$HOME/local/include LIBS="-L$HOME/local/lib -laspell"
You can read about CCFLAGS/LIBS in ExtUtils::MakeMaker and probably some tutorials too :)

Error When Trying to Install DBD::Oracle with CPANM

Okay, so I was trying to install a combination of the CGI module, DBI module, and DBD::Oracle driver using CPANM on a 64bit Solaris 11 machine with an Oracle11g database.
I installed that latest version of Perl using Perlbrew, updated CPANM, and then did the following...
cpanm -v -f -i CGI
cpanm -v -f -i DBI
And both of those modules installed fine, the DBI did have a small test error (t/zvxnp_85gofer.t) when I tried to install it normally, but the force install seemed to work.
So then I went to try to install the final part that I needed:
cpanm -v -f -i DBD::Oracle
And this was the error that came out towards the end of the installation...
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/rdbms/lib" gcc -G -L/usr/gnu/lib -fstack-protector Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/oracle/rdbms/lib/ -lclntsh -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -R/opt/oracle/rdbms/lib -laio -lposix4 -lkstat -lm -lpthread \
ld: fatal: file /opt/oracle/rdbms/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
FAIL
! Installing DBD::Oracle failed. See /home/oracle/.cpanm/build.log for details.
I'm guessing just from the wrong ELF class: ELFCLASS64 it has to do with some mismatch between the 64 bit binaries that exist and that this driver requires the 32 bit binaries to install? Some research has indicated that I need to find the lib32 directory to continue the installation, but I can't seem to find it.
I did:
echo $ORACLE_HOME ---> /opt/oracle/rdbms
ls $ORACLE_HOME
That returned the following directories...
apex emcli mgw rdbms
assistants has network relnotes
bin hs nls root.sh
ccr ide oc4j scheduler
cdata install odbc slax
cfgtoollogs install.platform olap sqldeveloper
clone instantclient ons sqlj
config inventory OPatch sqlplus
crs j2ee opmn srvm
csmig javavm oracore sysman
css jdbc oraInst.loc timingframework
ctx jdev ord ucp
cv jdk oui uix
dbs jlib owb utl
dc_ocm ldap owm wwg
deinstall lib64 perl xdk
demo log plsql
diagnostics md precomp
dv mesg racg
So I see a lib64, but no lib or lib32. Has anyone ever had this problem before, found a solution to it, or know how I could continue from here?
I had the same issue. Fixed it by doing ./Configure -es -Dprefix=$HOME/usr/local -Dcc=gcc -Duse64bitall -Dusethreads for perl install
please take a look at 1271236.1 and 883702.1 at oracle.com. It will explain how to get the 32bit libraries for 11i client installation.