in reply to Problem installing GD.pm under Solaris

Are you saying that, on the one hand, you have gd.h in /usr/local/include (as shown by ls /usr/local/include), but on the other hand find / -name gd.h can't find it?? If so, I'd first try to figure out why this is :)

If you hadn't run both commands as root, I would've asked whether maybe /usr/local/include (or one of its parent dirs) is an NFS share, which is configured to not allow root access (as is typically done for security reasons)...   Anyhow, you could try to run the build steps as non-root, and only do the final make install as root.

BTW, the issue with illegal option -nt-search-dirs can probably be ignored: Makefile.PL contains some auto configuration stuff, among which it tries to look for stray include files. For this, it uses the compiler option -print-search-dirs. Unfortuantely, this option is gcc specific - the Solaris system cc doesn't support it, nor anything similar, AFAICT. (It does know the single letter options -p -r -i, though, that's why -pri is being cut off...). OTOH, the default -I/usr/local/include does end up on the command line, so things should work fine, if you have gd.h etc. in that directory, and have permission to read it...

Replies are listed 'Best First'.
Re^2: Problem installing GD.pm under Solaris
by neversaint (Deacon) on Apr 18, 2007 at 13:14 UTC
    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.......
      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.......