in reply to Re: Problem installing GD.pm under Solaris
in thread Problem installing GD.pm under Solaris

Thanks for the reply,
I tried to build and make as SU. Yet still give the same problem
root@myhost:/home/sadm/.cpan/build/GD-2.35# perl Makefile.PL NOTICE: This module requires libgd 2.0.28 or higher. If you are using Math::Trig 1.01 or lower, it has a bug that causes a "prerequisite not found" warning to be issued. You m +ay safely ignore this warning. Type perl Makefile.PL -h for command-line option summary Configuring for libgd version 2.0.34. Checking for stray libgd header files...none found. Included Features: GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE G +D_PNG GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_UNCLOSEDPOLY GD_ANIMGIF GD_ +FTCIRCLE VERSION_33 GD library used from: /usr/local Note (probably harmless): No library found for -liconv Writing Makefile for GD root@myhost:/home/sadm/.cpan/build/GD-2.35# make cc -c -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6 +4 -xarch=v8 -D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"2.35\" +-DXS_VERSION=\"2.35\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64in +t/CORE" -DHAVE_JPEG -DHAVE_FT -DHAVE_XPM -DHAVE_GIF -DHAVE_PNG -DHAV +E_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FONTCONFIG -DHAVE_F +TCIRCLE GD.c /usr/ucb/cc: language optional software package not installed *** Error code 1 make: Fatal error: Command failed for target `GD.o'


---
neversaint and everlastingly indebted.......

Replies are listed 'Best First'.
Re^3: Problem installing GD.pm under Solaris
by almut (Canon) on Apr 18, 2007 at 13:56 UTC
    I tried to build and make as SU.

    Actually, I meant to not run it as root (except for the install step), because from your initial info it looked like you might not have root access to gd.h and friends...

    Anyhow, now that you're getting

    /usr/ucb/cc:  language optional software package not installed

    it looks as though you might not have a compiler installed, or rather, your setup is somewhat messy, so the right one isn't being found ;)   (/usr/ucb/cc typically is just a wrapper script...).

    Just in case you do have a real compiler under /opt/SUNWspro/bin/cc, you might try adding /opt/SUNWspro/bin/ to your search path (at the beginning, i.e. export PATH=/opt/SUNWspro/bin:$PATH) before you start the build.

    BTW, what is the output of perl -V? Do you have several versions of Perl installed?

      Just in case you do have a real compiler under /opt/SUNWspro/bin/cc, you might try adding /opt/SUNWspro/bin/ to your search path (at the beginning, i.e. export PATH=/opt/SUNWspro/bin:$PATH) before you start the build.
      As root or normal user? I have this for both cases

      root (before exporting as you suggested):
      sadm@bioinfo-z:~$ su - Password: root@bioinfo-z:~# printenv SHELL=/bin/bash TERM=vt100 USER=root PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/sfw/bin:/opt/sfw/ +bin:/opt/SUNWspro/bin:/usr/ccs/bin:/opt/sfw/bin:/opt/SUNWicg/SunScree +n/bin PWD=/home/root SHLVL=1 HOME=/home/root LOGNAME=root _=/usr/local/bin/printenv
      normal user:
      sadm@bioinfo-z:~$ printenv LC_MONETARY=en_US.ISO8859-1 TERM=vt100 SHELL=/bin/bash SSH_CLIENT=172.18.177.29 1681 22 PERL5LIB=/home/sadm/lib/site_perl/sun4-solaris-64int:/home/sadm/lib/si +te_perl/ LC_NUMERIC=en_US.ISO8859-1 SSH_TTY=/dev/pts/21 USER=sadm MAIL=/var/mail//sadm PATH=/home/sadm/.perl/bin:/home/sadm/bin:/usr/local/bin:/usr/bin:/usr/ +sfw/bin:/opt/sfw/bin:/opt/SUNWspro/bin:/usr/ccs/bin LC_MESSAGES=C LC_COLLATE=en_US.ISO8859-1 PWD=/home/sadm EDITOR=vim TZ=Singapore SHLVL=1 HOME=/home/sadm LOGNAME=sadm SSH_CONNECTION=172.18.177.29 1681 192.168.24.136 22 LC_CTYPE=en_US.ISO8859-1 _=/usr/local/bin/printenv
      And also I have:
      sadm@bioinfo-z:~$ perl -ve This is perl, v5.8.7 built for sun4-solaris-thread-multi sadm@bioinfo-z:~$ which perl /home/sadm/.perl/bin/perl
      and as root I have:
      root@bioinfo-z:~# perl -ve This is perl, v5.8.4 built for sun4-solaris-64int (with 28 registered patches, see perl -V for more detail) root@bioinfo-z:~# which perl /bin/perl
      and after exporting export PATH=/opt/SUNWspro/bin:$PATH as root. Doing make give me exactly the same error message as my OP.

      ---
      neversaint and everlastingly indebted.......

        so, apparently, you have two Perl installations, which you should take care to not mix up. (BTW, I said perl -V (capital V) - this would've shown the compiler and other settings that the particular version of Perl has been built with. The same compiler should be used to build extensions...).

        Just to recap (for me, I'm slowly beginning to get confused :), presuming you want to install the GD binding for the Perl 5.8.7 (in your home(?)), are you still getting the same error cannot find include file: <gd.h>, if you run /home/sadm/.perl/bin/perl Makefile.PL && make as your regular user, and if so, is the header file gd.h in fact accessible under the include path that is specified on the cc command line (i.e. -I/usr/local/include)?