[asterisk-bugs] [JIRA] (ASTERISK-28623) pjsip: PJPROJECT_CONFIGURE_OPTS install location not honored

Sean Bright (JIRA) noreply at issues.asterisk.org
Fri May 15 12:58:25 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250788#comment-250788 ] 

Sean Bright commented on ASTERISK-28623:
----------------------------------------

I was able to reproduce more simply:

{noformat}
$ ./configure --prefix=/home/sean/Install/ThirdParty --with-jansson-bundled --with-pjproject-bundled 
$ make
$ make install # Note that I am not root here
{noformat}

I get the following error:

{noformat}
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory '/home/sean/gerrit/asterisk/menuselect'
make[1]: 'makeopts' is up to date.
make[1]: Leaving directory '/home/sean/gerrit/asterisk/menuselect'
/usr/bin/install: cannot create directory ‘/opt/pjproject’: Permission denied
make[2]: *** [Makefile:198: _install] Error 1
make[1]: *** [Makefile:20: pjproject] Error 2
make: *** [Makefile:607: third-party-install] Error 2
{noformat}

And after some tweaking of the Makefile so that we can see what command is bombing:

{noformat}
...
for x in ; do /usr/bin/install -c -m 755 $x "/home/sean/Install/ThirdParty/var/lib/asterisk/agi-bin" ; done
make[1]: Leaving directory '/home/sean/gerrit/asterisk/agi'
make[1]: Entering directory '/home/sean/gerrit/asterisk/contrib'
/usr/bin/install -c -d "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts"
/usr/bin/install -c -m 755 scripts/ast_logescalator "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/ast_logescalator"
/usr/bin/install -c -m 755 scripts/ast_loggrabber "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/ast_loggrabber"
/usr/bin/install -c -m 755 scripts/ast_coredumper "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/ast_coredumper"
/usr/bin/install -c -m 755 scripts/refcounter.py "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/refcounter.py"
/usr/bin/install -c -m 755 scripts/refstats.py "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/refstats.py"
/usr/bin/install -c -m 755 scripts/reflocks.py "/home/sean/Install/ThirdParty/var/lib/asterisk/scripts/reflocks.py"
make[1]: Leaving directory '/home/sean/gerrit/asterisk/contrib'
make[1]: Entering directory '/home/sean/gerrit/asterisk/third-party'
make -C pjproject install
make[2]: Entering directory '/home/sean/gerrit/asterisk/third-party/pjproject'
if [ ! -d "/opt/pjproject/var/lib/asterisk/third-party/pjproject" ]; then \
        /usr/bin/install -c -d "/opt/pjproject/var/lib/asterisk/third-party/pjproject"; \
fi;
/usr/bin/install: cannot create directory ‘/opt/pjproject’: Permission denied
make[2]: *** [Makefile:198: _install] Error 1
make[2]: Leaving directory '/home/sean/gerrit/asterisk/third-party/pjproject'
make[1]: *** [Makefile:20: pjproject] Error 2
make[1]: Leaving directory '/home/sean/gerrit/asterisk/third-party'
make: *** [Makefile:607: third-party-install] Error 2
{noformat}

> pjsip: PJPROJECT_CONFIGURE_OPTS install location not honored
> ------------------------------------------------------------
>
>                 Key: ASTERISK-28623
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28623
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Third-Party/pjproject
>    Affects Versions: 17.0.0
>            Reporter: Richard Frith-Macdonald
>            Assignee: Unassigned
>            Severity: Minor
>
> This appears to be deliberate (judging by the comment in third-party/pjproject/Makefile.rules), but its not clear to me why this was done.
> The --prefix= option is explicitly overridden in Makefile.rules to set the install location to be /opt/pjproject 
> Doing this prevents building and installing asterisk into a sandbox area (and means you need to build as root, which is generally a bad idea).
> The simple fix is to remove that override in Makefile.rules
> If there's a good reason to have that override, I suggest adding a top-level configure option to be used to override the override :-)



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list