Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Devel::Dprof Installation Issues

by pm_amorg00 (Novice)
on Jun 07, 2006 at 02:26 UTC ( [id://553950]=perlquestion: print w/replies, xml ) Need Help??

pm_amorg00 has asked for the wisdom of the Perl Monks concerning the following question:

I tried to install the Devel::DProf package and during make it failed with:
In file included from /usr/local/lib/perl5/5.8.3/sun4-solaris/CORE/per +l.h:651, from DProf.xs:4: /usr/include/sys/stat.h:253: parse error before "blksize_t" /usr/include/sys/stat.h:257: parse error before '}' token /usr/include/sys/stat.h:313: parse error before "blksize_t" /usr/include/sys/stat.h:317: parse error before '}' token make: *** [DProf.o] Error 1
Basically the stat.h somehow includes the /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.1.1/include/sys/types.h which doesn't have the blksize_t declared in it, whereas the /usr/include/sys/types.h does.

What is the correct way to fix this situation please?

Thanks

Replies are listed 'Best First'.
Re: Devel::Dprof Installation Issues
by samtregar (Abbot) on Jun 07, 2006 at 05:20 UTC
    Just a guess: you're trying to compile Devel::DProf with gcc, but your Perl was built with a different compiler (likely Sun's). You need to compile XS modules with the same compiler you (or someone else) used to compile Perl.

    If that's not it, post the output of "perl -V". It might give us a clue.

    -sam

      It does seem to choose gcc, which is evident from the perl -V output below. Does that mean that the perl install was made using gcc as well? If not How should I change it in the perl Makefile.PL?

      perl -V output:
      Summary of my perl5 (revision 5.0 version 8 subversion 3) configuratio +n: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos 5.7 generic_patch sun4u sparc sunw,ultra-1 solaris ' config_args='-Dcc=gcc -B/usr/ccs/bin/' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=unde f useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing -I/usr/lo +cal/includ e -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.3.2', gccosandvers='solaris2.7' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize =8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under solaris Compiled at Feb 9 2004 03:12:16 @INC: /usr/local/lib/perl5/5.8.3/sun4-solaris /usr/local/lib/perl5/5.8.3 /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.3 /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl
        Yup, that's a gcc compiled perl alright. Looks like my guess wasn't right.

        -sam

      I thought `perl Makefile.PL` would catch the "different compiler" issue?
        Not in my experience, but perhaps someone added code for that recently. It would be a nice feature.

        -sam

Re: Devel::Dprof Installation Issues
by jesuashok (Curate) on Jun 07, 2006 at 07:57 UTC
    Hi

    I tried in Sun Solaris. also I have cc compiler. But, I am able to install Devel::Dprof. I did not get any issues. also we should not check with the error like, bksize_t is not declared. because, some variables would have been declared in many header files. Depends upon the package you are installing, the corresponding header willl be used.

    more inputs will help.

    "Keep pouring your ideas"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://553950]
Approved by GrandFather
Front-paged by sgifford
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-19 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found