[Home]

Summary:ASTERISK-08368: ./configure --prefix... ignored.
Reporter:Dmytro Mishchenko (arkadia)Labels:
Date Opened:2006-12-18 10:32:55.000-0600Date Closed:2007-03-07 12:00:14.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I'm trying to install Asterisk without root access to specified dir.
On fresh checkout of v1.4 I'm running ./configure --prefix=$HOME/asterisk14
After successfull build 'make install' stops with error:

mkdir -p /var/lib/asterisk/static-http
mkdir: cannot create directory `/var/lib/asterisk': Permission denied
make: *** [datafiles] Error 1

Specified prefix being ignored.
Comments:By: Jason Parker (jparker) 2006-12-18 11:01:12.000-0600

--prefix doesn't do exactly what you think it does.  If you need this, you'll need to use some of the other ones.  Try ./configure --help (hint: localstatedir and sysconfdir)

Closing

By: Dmytro Mishchenko (arkadia) 2006-12-18 11:15:04.000-0600

./configure --help
...
Installation directories:
 --prefix=PREFIX         install architecture-independent files in PREFIX
                         [/usr/local]
....
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

Thats exactly what I want! It works in such way for all projects: Apache, Mysql, etc...

On your suggestion you advise to change:
--localstatedir=DIR    modifiable single-machine data [PREFIX/var]
--sysconfdir=DIR       read-only single-machine data [PREFIX/etc]

But I don't want to change second level of directories. I need to change PREFIX.

By: Jason Parker (jparker) 2007-01-18 12:14:26.000-0600

--localstatedir and --sysconfdir are what you need to use, in addition to --prefix.

By: Dmytro Mishchenko (arkadia) 2007-01-19 03:00:58.000-0600

I should not specify --localstatedir and --sysconfdir beacause I'm satisfied with their default values.
According: "./configure --help" they are: PREFIX/var and PREFIX/etc.

...
--localstatedir=DIR    modifiable single-machine data [PREFIX/var]
--sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
...


Specifying --prefix=/foo I specify PREFIX.
So why if localstatedir default value is [PREFIX/var] I need to repeat --localstatedir=/foo/var ???

By: Erick Turnquist (jhujhiti) 2007-01-27 22:35:09.000-0600

Is this on Solaris, perchance? I'm running Solaris 10 and had this same problem - the install completely ignored my --prefix (as well as other explicit path settings). Then I found this little doozy in the Makefile in the source root:

ifeq ($(OSARCH),SunOS)
 ASTETCDIR=/var/etc/asterisk
 ASTLIBDIR=/opt/asterisk/lib
 ASTVARLIBDIR=/var/opt/asterisk
 ASTSPOOLDIR=/var/spool/asterisk
 ASTLOGDIR=/var/log/asterisk
 ASTHEADERDIR=/opt/asterisk/include
 ASTBINDIR=/opt/asterisk/bin
 ASTSBINDIR=/opt/asterisk/sbin
 ASTVARRUNDIR=/var/run/asterisk
 ASTMANDIR=/opt/asterisk/man
else
# correct stuff
endif

So someone decided that things on Solaris should only go in those places, period. Sure enough, I commented out the offending lines, leaving only the condition of the else and my --prefix worked correctly.

By: Dmytro Mishchenko (arkadia) 2007-01-29 02:17:10.000-0600

I have this issue on Linux. SuSE 9.2

By: Tim Ferguson (crashhd) 2007-02-12 12:33:16.000-0600

I found a related open bug: 0009034

By: Serge Vecher (serge-v) 2007-03-07 12:00:13.000-0600

since this is a duplicate, please keep looking for a solution in the other bugs.