Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help compiling programs.

    I've been having this problem for as long as I've tried to compile programs and its starting to piss me off.
    Whenever I run the usual "configure", "make", "install" instructions, something always goes wrong and I'm sitting here with a bunch of files that are taking up hard drive space.
    I've followed the README's to the letter and I can't figure out how to get the darn computer to compile the program.
    I run the usual "./configure" and it'll work (whenever there's a configure file in the folder, I found that out the hard way), but my biggest problem is that when I do the "make" command, I get errors. (I type it just like they tell me, by writing "make" in the command line. No arguements, just the word.)
    It always turns up as
    "make: *** No targets specified and no makefile found. Stop."
    Then when I try to tell it to look at a file named "Makefile.*"
    It will always turn up something like
    "make: Nothing to be done for Makefile.*"
    I've looked at tutorial after tutorial, I do everything like they say and I can't get a single program to compile. What am I missing?

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Woodshed, CA
    That's not much info to go on.

    Have you installed the development tools and languages you need.

    What source code package have you downloaded?

    Are you sitting in the base directory of the source code, can you see the makefile?

    Also you keep typing Makefile Unix is case sensitive and the typical name is makefile.

    Add more details so others can help you.
    A lion does not lose sleep, over the opinion of sheep.

  3. #3
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    Which distro and which program?

    Not all compiles use the standard cmmi but there will usually be a README or an INSTALL file which will give details. Are you sure the configure phase completed successfully or did it give messages about missing dependencies. Sometimes it's easy to miss as it generates so much output.

    If it does give a message, install the missing dependency (typically the package will end in -dev or -devel depending on the distro) and re-run ./configure which you may have to do several times as it stops at the first problem each time.
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

  4. $spacer_open
  5. #4
    Linux Engineer
    Join Date
    Apr 2012
    Virginia, USA
    You have to read the output of the configure command very carefully. The configure command is what generates your makefile (typically).

    Configure is used to inspect your machine by looking in the normal locations for libraries and compilers that the software needs to actually be built.

    Often times, you are missing a library that is required for the software to be compiled successfully.

    Check out: How to RDP from CentOS 6 using Network Level Auth That's an example I wrote of compiling rdesktop from source. That uses CentOS.

    Let's compile something together on Debian: PyODBC. This is a library that allows python to use ODBC to connect to databases. I use this library to connect from Linux to MS SQL Server 2008. It's not available in a repo that I'm aware of. This is an example of compiling a Python package.

    Download the zip file from here:

    Unzip it, cd into the directory it created.

    On debian (and I believe Ubuntu), an easy way to get a lot of compiling-related packages is to install the package build-essential, so install that. If you're on an RPM based distro, you can use yum groupinstall ‘Development Tools’

    That will install make, gcc, g++, and a handful of other useful packages. Installing build-essential or 'Development Tools' group package is considered a prerequisite for compiling most software.

    Inspect the current directory. Most packaged python source archives have a file called This is the file that is like the configure file for c++ or other source tarballs.
    Anyway, let's go ahead and run python build We should get some output with the following error:
    /root/dd/blks/pyodbc-3.0.6/src/pyodbc.h:48:17: fatal error: sql.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    The last line tells us that gcc failed. gcc is our compiler, so if that fails, we haven't compiled any software, and we need to resolve this issue before moving forward. We saw gcc's fatal error just before that; sql.h: No such file or directory. That tells us that gcc needs a header file somewhere in our buildpath called sql.h. Since it wasn't included in the software we are compiling, we are probably supposed to provide it somehow. This dependency will often be specified by the maintainer/creator of the software, or you might need to ask your pal google.

    Our README.rst file tells us this software requires ODBC 3.0 or greater. The package is named unixODBC in both Debian and CentOS (it may be in the epel repo in CentOS, I cannot remember). To compile the software, we need to have the unixODBC-dev (debian) or unixODBC-devel (CentOS) package installed. That package provides the header files needed (in our case, sql.h) for gcc. To actually use this software, we'll need to install the unixODBC package.

    After that, you can run python build and everything should be compiled fine. If you want to install the software (copy the compiled software into the typical location for your system) run python install
    Last edited by mizzle; 06-27-2014 at 04:00 PM. Reason: line spacing

Posting Permissions

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