Reputation: 249
I am unable to run the configure file for a manual tar.gz package install. For example, after unzipping my file, I run
$ sudo ./vim81/configure
[sudo] password for cli2:
./vim81/configure: line 6: cd: src: No such file or directory
However, if I am inside the directory where the configure file exists, I am able to run the configure file.
$ ./configure
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
...
My question is how do I execute the configure file if I am not at the same directory as the source file?
I know I can use yum
or apt-get
to install vim, but is just an example package and I want to do this manually for any package. Thanks.
Upvotes: 0
Views: 7027
Reputation: 181849
I know I can use
yum
orapt-get
to install vim, but is just an example package and I want to do this manually for any package.
There is no sure-fire universal recipe for building from source, even if you limit the scope to just Autotools-based packages (which evidently Vim is not, exactly). This is among the reasons why software packaging, package repositories, and package managers have become so widespread.
As someone who has performed a lot of package building, I assure you that it is a rare joy when I run into a project that I can package up via the equivalent of a straight-up configure; make; make install
. When I meet one, it makes my day. The rest of the time, I have to figure out any number of build details on a per-package basis, such as
configure
script, arguments to make
, manual tweaks to a Makefile
, answers to an interactive questionaire, ...All of that applies at least as much to manual builds, too. If you do not rely on someone else to do that (i.e. by using packages built by someone else) then you need to be prepared to do yourself as many of those things as are required for each project you build. There is no way to automate it from that starting point.
Upvotes: 1