git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Reduced privileges install

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 20, 2010, 17:01 UTC
Message-ID
<AANLkTimbTUp4r8HPiYv2HxD-pLrrxW1qHiNhBHiknvkB@mail.gmail.com>
In-Reply-To
<23ECDEF1-BDEC-45CC-B0CC-7E1A7BFE00BB@kellerfarm.com>
On Mon, Sep 20, 2010 at 16:56, Andrew Keller <andrew@kellerfarm.com> wrote:
Show 84 quoted lines
> On Sep 20, 2010, at 10:53 AM, Brandon Casey wrote:
>> On 09/19/2010 06:50 PM, Andrew Keller wrote:
>>
>>> Hello, all.  Quick question:
>>>
>>> I'm trying to build and install git 1.7.2.3 from source on a server at school used for my class.
>>> 'uname -a' is 'SunOS bloch 5.9 Generic_122300-54 sun4u sparc SUNW,UltraAX-i2'.
>>>
>>> There were a few hiccups at first – things like CC not being defined, tclsh not existing, the path to python being wrong, etc, but they were all relatively easy to work around.  This last error, however, not so much luck.
>>>
>>> Because I do not own the server and my account has restricted privileges, I attempted to augment my PATH to include a directory in my home folder, and then install git in there by specifying a prefix at the configure stage.  The configure and the make work, but the make install fails.  Here's the last section of the log:
>>>
>>>
>>> $ make install
>>>
>>> ...
>>>
>>> make -C templates DESTDIR='' install
>>> make[1]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/templates'
>>> /usr/ucb/install -d -m 755 '/usr/users/students/ak4390/.local/share/git-core/templates'
>>> (cd blt && gtar cf - .) | \
>>>        (cd '/usr/users/students/ak4390/.local/share/git-core/templates' && umask 022 && gtar xof -)
>>> make[1]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/templates'
>>> make -C perl prefix='/usr/users/students/ak4390/.local' DESTDIR='' install
>>> make[1]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>>> make[2]: Entering directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>>> Warning: You do not have permissions to install into /usr/perl5/site_perl/5.6.1/sun4-solaris-64int at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 85.
>>> Installing /usr/perl5/site_perl/5.6.1/Error.pm
>>> Installing /usr/perl5/site_perl/5.6.1/Git.pm
>>> mkdir /usr/perl5/site_perl/5.6.1/sun4-solaris-64int/auto: Permission denied at /usr/perl5/5.6.1/lib/ExtUtils/Install.pm line 165
>>> make[2]: *** [pure_site_install] Error 255
>>> make[2]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>>> make[1]: *** [install] Error 2
>>> make[1]: Leaving directory `/usr/users/students/ak4390/Downloads/git-1.7.2.3/perl'
>>> make: *** [install] Error 2
>>>
>>>
>>> So anyways, it appears that it is trying to install into a directory in which I do not have write permissions.  But why?  I thought that setting the prefix to a folder in my home directory would change that.  Is there another parameter I'm forgetting about at the configure stage?
>>>
>>> Thanks,
>>> Andrew Keller
>>>
>>> PS: not sure if it matters, but just in case...
>>> path to perl: /bin/perl
>>> version of perl: 5.6.1
>>
>> By chance could INSTALL_BASE be set in your environment?
>>
>>   $ echo $INSTALL_BASE
>
> env says that INSTALL_BASE is not currently set.
>
>> A patch was recently made to unset that variable so that it
>> could not influence perl's makemaker.  Though the commit message
>> indicates that makemaker complains loudly when both INSTALL_BASE
>> and PREFIX are set, so perhaps this is not the problem.
>>
>> If INSTALL_BASE is set, then unset it, and try again.
>>
>> Alternatively, you could avoid makemaker altogether by setting
>> NO_PERL_MAKEMAKER on the make command line and git will build
>> its own make file:
>>
>>   make NO_PERL_MAKEMAKER=1 install
>
> Setting NO_PERL_MAKEMAKER at the build stage seems to make the install stage work.  Yay!
>
> This is what it took to compile Git on this server without root privileges (Solaris 8 / Sparc):
>
> # create a location for apps in my home folder:
> mkdir ~/.local
> export PATH=$PATH:/usr/users/students/ak4390/.local/bin
> export MANPATH=$MANPATH:/usr/users/students/ak4390/.local/share/man
>
> # compile and install git
> $ ln -s /usr/local/bin/tclsh8.4 /usr/users/students/ak4390/.local/bin/tclsh
> $ export CC=/usr/local/bin/gcc
> $ cd <path-to-git-src>
> $ ./configure --prefix=/usr/users/students/ak4390/.local --with-python=/usr/local/bin/python --enable-pthreads=no
> $ make NO_PERL_MAKEMAKER=1 all install
>
> Letting the configure figure out the threading did not seem to work.  The compile and install worked, with lots of warnings from gcc about not recognizing -pthreads, but when you try to do a clone, git complained about not being able to fork off the demultiplexer.  So I just turned off threading and it works.
>
> The quick-install-man target still failed, but it's not really a big deal since I can just install it myself.
What does this return for you:
    perl -MExtUtils::MakeMaker -le 'print $ExtUtils::MakeMaker::VERSION'
Previous: Andrew KellerNext: Andrew Keller
Message 11 of 17 in “Reduced privileges install”
  1. Andrew KellerSep 19, 2010
  2. Randal L. SchwartzSep 20, 2010
  3. Andrew KellerSep 20, 2010
  4. Kevin BallardSep 20, 2010
  5. Andrew KellerSep 20, 2010
  6. Matthieu MoySep 20, 2010
  7. Randal L. SchwartzSep 20, 2010
  8. Andrew KellerSep 20, 2010
  9. Brandon CaseySep 20, 2010
  10. Andrew KellerSep 20, 2010
  11. Ævar Arnfjörð BjarmasonSep 20, 2010
  12. Andrew KellerSep 20, 2010
  13. Brandon CaseySep 20, 2010
  14. Brandon CaseySep 20, 2010
  15. Andrew KellerSep 20, 2010
  16. Andrew KellerSep 20, 2010
  17. Brandon CaseySep 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.