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

look! my 100th post, anyway....

So I've *finally* switched over to linux and I'm here to stay! With that I'm loosing my old friend, PPM. I must say, so far CPAN.pm is *almost* as simple as PPM. For some reason when I configured the CPAN.pm module it didn't find make and now when I install modules that require make I get errors like such:

GD.c: In function `XS_GD__Font_offset': GD.c:3138: parse error before "font" GD.c:3144: `font' undeclared (first use in this function) GD.c:3144: called object is not a function GD.c: In function `XS_GD__Font_width': GD.c:3165: parse error before "font" GD.c:3171: `font' undeclared (first use in this function) GD.c:3171: called object is not a function GD.c: In function `XS_GD__Font_height': GD.c:3192: parse error before "font" GD.c:3198: `font' undeclared (first use in this function) GD.c:3198: called object is not a function make: *** [GD.o] Error 1 /usr/bin/make -- NOT OK
I've got no clue as to what those other errors are, but the last one about make is the one I'm concerned with. make *is* located at /usr/bin/make so why is CPAN.pm dying on me? I tried the config as both a normal user and as root and got similar results.

system:
linux RH9
v 5.8


-silent11

Replies are listed 'Best First'.
Re: CPAN.pm and make (trees)
by tye (Sage) on Apr 15, 2003 at 06:18 UTC

    CPAN.pm is dying because:

    1. CPAN.pm called make
    2. make called your C compiler
    3. your C compiler tried to compile GD.c
    4. GD.c didn't manage to declare 'font'
    5. your C compiler exited with a non-zero value to indicate that it failed to do what was asked (compile GD.c)
    6. make noticed that the C compiler failed
    7. make reported to stderr that it failed to do what was asked (build GD.o as part of building something else): "make: *** [GD.o] Error 1"
    8. make exited with a non-zero value to indicate this failure to the program that ran it
    9. CPAN.pm noticed that make failed
    10. CPAN.pm notified you that make failed (just in case make didn't manage to make that fact clear already): "/usr/bin/make  -- NOT OK"
    So the error had nothing to do with the fact that make is located in /usr/bin.

    I left out a few steps, but I hope the explanation was still clear. ;)

                    - tye
      Tye, thanks for the explination, I tried to install CPANPLUS and I guess that module has problems too.

      ~sigh~ Is there an easy way to manage modules on linux?

      ... ... Writing Makefile for CPANPLUS Now, please type 'ile test' to test, and 'ile install' to install. Makefile:88: *** missing separator. Stop. /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 [root@localhost silent11]#


      -silent11

        Gah! Browsing CPANPLUS's Makefile.PL (if you are using IE, then you'll have to download that file in order to view it despite the "Content-Type: text/plain", *sigh*), I can see why problems getting the thing installed might be more common than for some modules. 14kB of script just to build the Makefile?

        Well, I almost never use CPAN, CPANPLUS, PPM, nor the others. I download modules and do the rather simple "perl Makefile.PL; make test; make install". Actually, I do use PPM from time-to-time, but I almost always download the *.ppm file myself and run "ppm *.ppm" (in part because PPM will almost never find/download anything for me).

        I don't see much advantage to avoiding these rather simple steps, especially when I've had and seen so many problems trying to get these short-cuts to work or even seen them blow things away (by downloading and installing new versions of Perl, for example).

        *shrug*

                        - tye
        FWIW, I've never had any problem using CPAN.pm on any Unix box. I don't think you will either, if you install a Perl other than the ActiveState distro. (Don't know how I got the impression you were.)

        Makeshifts last the longest.

Re: CPAN.pm and make
by dws (Chancellor) on Apr 15, 2003 at 01:29 UTC
    A hard-won suggestion: Aquaint yourself with which RPMs are available on the RedHat 3 install CDs. There are several Perl packages that will install cleanly via RPM, but which are hell to install via CPAN (you are in a maze of twisty little dependencies). I don't recall offhand if GD is one of them, but it's worth checking for.

    It is safe to install the latest CPAN via CPAN.

Re: CPAN.pm and make
by Dr. Mu (Hermit) on Apr 15, 2003 at 03:10 UTC
    Just to set the record straight: You don't have to give up PPM just because you're using Linux. ActiveState makes a distro for Linux, too, and PPM works fine -- for the modules available to it anyway. As a bonus, you get your HTML docs updated automatically whenever PPM installs a new module, just as in Windows.

    Now, having said that, I have to confess that I will probably abandon ActiveState next time I redo my Linux box, just to have the entire range of modules available via a single interface (CPAN). I have done mix-and-match installations under ASPerl, but it's not as tidy a solution as I'd like.

Re: CPAN.pm and make
by crenz (Priest) on Apr 15, 2003 at 20:13 UTC

    Just a thought: Are you sure you have libgd installed? Most of the time, Perl modules don't contain the C/C++ libraries they use; they rely on you to install the library (something like tar xzf gd-xxx.tar.gz; cd gd-xxx; ./configure ; make ; sudo make install), then install the Perl module on top of it.