Find the answer to your Linux question:
Results 1 to 5 of 5
I am currently using Kubuntu 8.04.1, but I have had this problem with an assortment of distros. I occasionally compile programs from scratch, and sometimes it works perfectly, just the ...
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97

    How to ./configure without hassles

    I am currently using Kubuntu 8.04.1, but I have had this problem with an assortment of distros.
    I occasionally compile programs from scratch, and sometimes it works perfectly, just the standard:
    Code:
    ./configure
    make
    sudo make install
    But sometimes ./configure throws up error after error stating that this library or that library has not been found. I have to manually hunt the libraries down one at a time and run ./configure again. I have occasionally given up on it after spending more than an hour doing this. Sometimes it works after several attempts.

    There has got to be a better way. Am I missing something obvious here?

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    10
    As far as I know, there isn't a way around this if you compiling from source, outside of a package. The configure script is there (among other reasons) to make sure that you don't install the package until you have all the libraries needed to compile. The programmers don't typically include these libraries with the source code, because it would make the packages a lot bigger, and the libraries wouldn't be the most up-to-date version available.

    This is why we have distribution repositories and package management systems, so that end-users don't have to deal with that headache. So, in short: if you don't want to have to hunt down all the prequisites yourself, try to install programs through the Ubuntu package manager whenever you can. Or if you can't, see if there is a .deb package available somewhere on the Internet for that program.

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    Hmm I was hoping that wouldn't be the case. Are you absolutely sure? There are obviously huge numbers of people, mostly developers I guess, who have to compile from source regularly. It doesn't seem in the nature of linux users/developers to put up with such a pointless, painstaking process on a regular basis. By now there must be tricks of the trade to speed it up.

    One thing I can think of is, can't we get configure to dump a list of its dependencies? I've often hunted through the script tracking down dependencies because the error message wasn't clear enough. The script must want some particular file in some particular place, why can't it just tell me that explicitly, and all at once, instead of making me hunt and ./configure, hunt and ./configure, hunt and ./configure, etc?!

    Let's suppose I'm a KDE developer, and I have a fresh machine I want to develop on. What would the process be? Would I just get the source of whatever KDE project I'm working on, run configure and get dependencies as they crop up, or would I install a bunch of stuff beforehand?

    EDIT: I should probably add, installing from a repository or .deb may not be an option, since I am often compiling nightlies.

  4. #4
    Just Joined!
    Join Date
    Jan 2009
    Posts
    10
    I'm sorry, I don't think I understood what you were asking earlier. I believe that the information you are looking for might be in the Makefile.am file. You see, the 'configure' script is generated as part of the Autotools system, a set of programs which developers use to make their code more portable. Makefile.am is one of the configuration files they must write, as well as configure.ac, I believe.

    I do not personally use the Autotools system (it is rather complex), but documentation is available here: Autoconf - GNU Project - Free Software Foundation (FSF).

    Or you could look through the source code an see what header files are included, but that can get rather tiresome when there are a lot of source files. And I don't think that would always tell you what version of the library you needed, either.

    As far as your example of a KDE developer: I don't think a KDE developer would typically just download a KDE application, attempt to install it, and then look for the files he doesn't have. Whenever you want to create any program of a particular feather (KDE, Gnome, curses) there is usually a development package available in your repositories which provides all the necessary dependencies you need for development. For example, when I started coding ncurses applications, I just needed to install the ncurses5-dev package from the Debian repositories, which provides me with the library I needed.

    Plus, the big guys like KDE and Gnome have entire manuals written for prospective developers, listing every library they are going to need:

    http://techbase.kde.org/Welcome_to_KDE_TechBase
    The GNOME Development Site

  5. #5
    Just Joined!
    Join Date
    Apr 2006
    Posts
    97
    Thanks, those links seem like what I need, I'll give it a shot.

Posting Permissions

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