LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Where is ./configure ?? Having problem building from source! (http://www.linuxquestions.org/questions/linux-software-2/where-is-configure-having-problem-building-from-source-4175420416/)

barnac1e 08-04-2012 11:56 PM

Where is ./configure ?? Having problem building from source!
 
Hi,

Can someone tell me what is wrong here okay, but I have checked a couple different sources regarding building an application from source, and I always get to the part where they tell me run the
Code:

./configure
command. And every time I always get the bash prompt error:

Code:

bash: ./configure: No such file or directory
And this is happening in not just one distribution but now in a couple of different ones. Specifically, for an example, okay I am trying to follow this to make myself an .rpm of linuxmint-cinnamon. So first I downloaded the source tar.gz, then changed to the linuxmint-cinnamon directory
Code:

kevin@linux-wrkq:~> cd linuxmint-Cinnamon-9e88200
kevin@linux-wrkq:~/linuxmint-Cinnamon-9e88200> ./configure
bash: ./configure: No such file or directory
kevin@linux-wrkq:~/linuxmint-Cinnamon-9e88200>

and so I cannot go further without configuring it, I am assuming? This is my first time trying to build from source, and not just this package but there are others I would like to build but there is never this ./configure anywhere.

Can someone help guide me?

Thanks.

Nylex 08-05-2012 12:31 AM

You need to read the instructions specific to the software you're building. While many pieces of software use a configure script, this isn't always the case. Check what has been extracted from the tarball. If there are README or INSTALL files, start by reading those.

barnac1e 08-05-2012 01:45 AM

Yes, I know that. But why isn't there a program or whatever that is this ./configure? I know about the README or INSTALL, but because the BASH is giving a not found error, it means this ./configure isn't installed. So if a source file needed the ./configure based on the README, I still wouldn't have it, right?

Nylex 08-05-2012 02:40 AM

The configure script is not "installed" on your system; it's present in the source tarball (or if needed, there's usually a script to generate it). That's why you use "./" - to run the script called "configure" in the current directory. If there's no configure script or a script that generates it (I've forgotten what this is usually called), it's because the developers of the software chose not to do things that way (i.e. using Autotools).

fotoguy 08-05-2012 02:46 AM

Not all source packages use configure, some will use 'make' files instead

414N 08-05-2012 03:40 AM

I gave a try at it (downloaded file "linuxmint-Cinnamon-1.5.2-0-g24a55b1.tar.gz") and looked at the archive's root directory contents. Indeed, there's no configure script, but there'e an "autogen.sh" one. You have to run it first to generate a configure script, then you can proceed with the usual ./configure && make && make install. Beware that gnome-common is required.
If you want to know a little more about this source configuration system, read on.
GNU autotools
The configure script is a script automatically generated by GNU-autotools programs. Basically, you write a specification file (namely, configure.ac -- auto conf --) and then the autoconf program generates a configure script based on it.
Given that the configure script is only an auto-generated script if you're using GNU-autotools (some projects write their configure script by hand, such as the ffmpeg project) and, if changes are made to the configuration of the source files, those are to be made inside the specification file for configure (configure.ac), the configure script is generally not added to source versioning systems such as the one used by the cinnamon project (which is git, by the way), so you have to manually generate it when checking out the source files from the git repository (and that's why there's an autogen.sh script).
Generally speaking, however, source tarballs using GNU-autotools usually contain an already generated and ready to use configure script, but that's because they've been preprocessed for release as a source tarball. The source tarballs available for Cinnamon are just GitHub-autogenerated archives, so they lack the preprocessing which would've produced the configure script.
Long story short, always look at what the tarball contains and read the README and INSTALL files usually found inside of it, to understand what build system the project is using and how to successfully invoke it.


All times are GMT -5. The time now is 02:40 PM.