1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

best "make" to use..and one CPAN issue.

Discussion in 'Mac Programming' started by Bentov, Oct 18, 2009.

  1. macrumors regular

    I love OS X, but today was one of those days where I actually think that windows would have been easier; but anyway I digress.

    I'm trying to install some perl modules from CPAN, but it seems that I don't have make installed...or I just can't find it. Which is the best one to use, I know there are multiple ports of it.

    Also, I'm getting the following error as well when trying to DBD::pg

    Could not read '/Users/eal/.cpan/build/DBD-Pg-2.15.1-hCJYAh/META.yml'. Falling back to other methods to determine prerequisites

    I can see the directory and file fine through the shell and finder, so why can't CPAN?

    Thanks for any assistance.

  2. macrumors 603


    Install Xcode for all the development tools such as "make".
  3. macrumors regular

    Thanks for the help, I now have make. One step closer to getting this to work. I'm getting an error

    Could not make: Unknown Error

    I'm glad it is so helpful :)
  4. macrumors 603


    What is the text you see before the error? Often problems with make are actually shown a number of lines before it displays an error message.
  5. macrumors regular

    Well...I think I might be getting closer...sort of.

    **There are line above this, but it seems to compile ok with just two warnings and no errors*
    Running Mkbootstrap for DBD::Pg ()
    chmod 644 Pg.bs
    rm -f blib/arch/auto/DBD/Pg/Pg.bundle
    LD_RUN_PATH="/library/postgresql/8.3/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc  -bundle -undefined dynamic_lookup -Wl,-search_paths_first -arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 Pg.o dbdimp.o quote.o types.o  -o blib/arch/auto/DBD/Pg/Pg.bundle 	\
    	   -L/library/postgresql/8.3/lib -lpq -lm  	\
    env: cc: No such file or directory
    make: *** [blib/arch/auto/DBD/Pg/Pg.bundle] Error 127
      /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
    Failed during this command:
     TURNSTEP/DBD-Pg-2.15.1.tar.gz                : make NO

    It looks like it is deleting what it needs(look at the 3rd line above). I wasn't getting that error before. So Error 127 it is. If I run it again, then I get the unknown error

    cpan[2]> install DBD:Pg                                                                                                                                                                                                                                                        
    Running install for module 'DBD::Pg'
    Running make for T/TU/TURNSTEP/DBD-Pg-2.15.1.tar.gz
      Has already been unwrapped into directory /Users/eal/.cpan/build/DBD-Pg-2.15.1-jI8tar
    Could not make: Unknown error
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    I did notice that DBD::pg is not in the repository in ActiveState for 5.10, so I have been trying to use CPAN instead. I'm thinking that is my problem. Also, I have not modified anything in this package.

  6. macrumors 6502

    this is your problem-

    env: cc: No such file or directory

    probably your path is not set correctly so make cannot find cc (c compiler, usually called gcc). Open a terminal and try the following:

    And from there google will have the answer, now that you know the question.
  7. macrumors regular

    I saw that, but didn't make the connection since earlier it called for gcc and I found that in the same place that 'make' was. I guess I didn't think that something would need both gcc and cc. I'm guessing from your output that your cc is a link to gcc that sits in /developer/usr/bin?
  8. macrumors 6502a

    Have you downloaded and installed the latest Developer Tools DVD? If you have and things link 'gcc' aren't properly linked into your /usr/bin directory you should probably uninstall it, download a fresh copy and reinstall it.

Share This Page