Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Error when running "make"

  1. #1
    Join Date
    Mar 2010
    Beans
    18

    Error when running "make"

    Today, I was trying to compile and install a minecraft mapper with the program "make". I navigated to the directory in terminal and ran make. It found the make file and begins to work, then spits an error and stops. To be specific, this was the error:

    Code:
    cats4gold@computer:~/Downloads/cartograph-linux$ make
    make -C src/
    make[1]: Entering directory `/home/cats4gold/Downloads/cartograph-linux/src'
    g++ -c -pipe -O2 -Wall main.cpp -o main.o
    In file included from main.cpp:16:
    Level.h:8: fatal error: zlib.h: No such file or directory
    compilation terminated.
    make[1]: *** [main.o] Error 1
    make[1]: Leaving directory `/home/cats4gold/Downloads/cartograph-linux/src'
    make: *** [default] Error 2
    cats4gold@computer:~/Downloads/cartograph-linux$
    It just looks like a missing directory, but I was just making sure this was all. Thanks in advance.

  2. #2
    Join Date
    Sep 2010
    Beans
    198
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: Error when running "make"

    Have you got the 'build-essential' package?

    Code:
     sudo apt-get install build-essential
    You should have this before compiling.

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Error when running "make"

    No, it can't find the zlib.h header file; zlib provides support for the gzip compression algorithm.

    I'm going to guess that you don't have the kernel-headers installed; that's where zlib.h lives in my installation. The package name depends on your version of Ubuntu. Try running "dpkg -s linux-headers-$(uname -r)" to see if you have the headers installed. If not, then use "sudo apt-get install linux-headers-$(uname -r)" to get them.

  4. #4
    Join Date
    Mar 2010
    Beans
    18

    Re: Error when running "make"

    Quote Originally Posted by SeijiSensei View Post
    No, it can't find the zlib.h header file; zlib provides support for the gzip compression algorithm.

    I'm going to guess that you don't have the kernel-headers installed; that's where zlib.h lives in my installation. The package name depends on your version of Ubuntu. Try running "dpkg -s linux-headers-$(uname -r)" to see if you have the headers installed. If not, then use "sudo apt-get install linux-headers-$(uname -r)" to get them.
    Status: install ok installed

    Quote Originally Posted by mr_luksom View Post
    Have you got the 'build-essential' package?

    Code:
     sudo apt-get install build-essential
    You should have this before compiling.
    build-essential is already the newest version.

  5. #5
    Join Date
    Mar 2010
    Beans
    18

    Re: Error when running "make"

    Quote Originally Posted by SeijiSensei View Post
    No, it can't find the zlib.h header file; zlib provides support for the gzip compression algorithm.

    I'm going to guess that you don't have the kernel-headers installed; that's where zlib.h lives in my installation. The package name depends on your version of Ubuntu. Try running "dpkg -s linux-headers-$(uname -r)" to see if you have the headers installed. If not, then use "sudo apt-get install linux-headers-$(uname -r)" to get them.
    Actually, it appears they weren't installed, or at least needed to be updated. No effect, though.

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,981
    Distro
    Kubuntu 14.04 Trusty Tahr

  7. #7
    Join Date
    Jun 2007
    Beans
    16,493

    Re: Error when running "make"

    Do you have zlib1g-dev installed?

    Edit: if not then install the ubuntu package, (sudo apt-get install zlib1g-dev ), do not do as this fellow (built and installed zlib source
    http://ubuntuforums.org/showthread.p...8#post10121928
    Last edited by mc4man; November 20th, 2010 at 05:53 AM.

  8. #8
    Join Date
    Mar 2010
    Beans
    18

    Re: Error when running "make"

    Quote Originally Posted by mc4man View Post
    Do you have zlib1g-dev installed?

    Edit: if not then install the ubuntu package, (sudo apt-get install zlib1g-dev ), do not do as this fellow (built and installed zlib source
    http://ubuntuforums.org/showthread.p...8#post10121928
    Thanks! That solves one problem, but leads to another error:
    Code:
    cats4gold@computer:~/Downloads/cartograph-linux$ make
    make -C src/
    make[1]: Entering directory `/home/cats4gold/Downloads/cartograph-linux/src'
    g++ -c -pipe -O2 -Wall main.cpp -o main.o
    g++ -c -pipe -O2 -Wall Level.cpp -o Level.o
    Level.cpp:2: fatal error: png.h: No such file or directory
    compilation terminated.
    make[1]: *** [Level.o] Error 1
    make[1]: Leaving directory `/home/cats4gold/Downloads/cartograph-linux/src'
    make: *** [default] Error 2
    cats4gold@computer:~/Downloads/cartograph-linux$
    Same thing, different missing file.

  9. #9
    Join Date
    Jun 2007
    Beans
    16,493

    Re: Error when running "make"

    What you can do is search here for the file and ck. the results (scroll down to "Search the contents of packages"
    Make sure you set to search the ubuntu release you're using,
    http://packages.ubuntu.com/
    Ex.
    these are the results on maverick for png.h
    http://packages.ubuntu.com/search?se...erick&arch=any

    So I'd take a guess and install 'libpng12-dev'

    Edit: which mapper are you trying to build?
    Last edited by mc4man; November 20th, 2010 at 06:37 AM. Reason: which source

  10. #10
    Join Date
    Mar 2010
    Beans
    18

    Re: Error when running "make"

    Quote Originally Posted by mc4man View Post
    What you can do is search here for the file and ck. the results (scroll down to "Search the contents of packages"
    Make sure you set to search the ubuntu release you're using,
    http://packages.ubuntu.com/
    Ex.
    these are the results on maverick for png.h
    http://packages.ubuntu.com/search?se...erick&arch=any

    So I'd take a guess and install 'libpng12-dev'

    Edit: which mapper are you trying to build?
    I'll take a look at these, thanks!

    Also, I'm working on cartograph.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •