Reduced privileges install

10 messages, 3 authors, 2016-06-15 · open the first message on its own page

Reduced privileges install

From: Andrew Keller <hidden>
Date: 2016-06-15 22:49:34

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

Re: Reduced privileges install

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:34

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

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

-Brandon

Re: Reduced privileges install

From: Andrew Keller <hidden>
Date: 2016-06-15 22:49:35

On Sep 20, 2010, at 10:53 AM, Brandon Casey wrote:
On 09/19/2010 06:50 PM, Andrew Keller wrote:
quoted
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.

Thanks,
~ Andrew Keller

Re: Reduced privileges install

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:35

On Mon, Sep 20, 2010 at 16:56, Andrew Keller [off-list ref] wrote:
On Sep 20, 2010, at 10:53 AM, Brandon Casey wrote:
quoted
On 09/19/2010 06:50 PM, Andrew Keller wrote:
quoted
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.
quoted
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'

Re: Reduced privileges install

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:35

[We prefer if you hit 'Reply-All' when replying so that all
 commenters are retained on the cc list]

On 09/20/2010 11:56 AM, Andrew Keller wrote:
This is what it took to compile Git on this server without root privileges (Solaris 8 / Sparc):
I thought it was Solaris 9? :)
# 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
Setting MANPATH is only necessary if you want to be able to type
'man git-add' or something.  Instead, you can use the 'help' subcommand
of git, or the --help option of each command, and it will display
the man page for you.

   $ git help add
# compile and install git
$ ln -s /usr/local/bin/tclsh8.4 /usr/users/students/ak4390/.local/bin/tclsh
You can set TCL_PATH instead of creating this symbolic link.
$ 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.
Maybe the configure script is broken with respect to detecting threads on
Solaris 8 (or 9)?  You probably don't really need to run the configure
script on your platform.  I don't.  Since you're using gcc to compile, the
default pthread switch '-lpthread' should be appropriate.  You could try
deleting the config.mak.autogen file that configure creates, and just run
make by itself.  Based on what you've describe, it would look something
like this:

   cd <path-to-git-src>
   rm config.mak.autogen
   cat >config.mak <<EOF
CC=/usr/local/bin/gcc
PREFIX=/usr/users/students/ak4390/.local
PYTHON_PATH=/usr/local/bin/python
TCL_PATH=/usr/local/bin/tclsh8.4
NO_PERL_MAKEMAKER=1
EOF
   make

Then add 'install' to the make command line when you are ready.

Notice, I placed all of the make settings in a file named config.mak.  This
file is imported by the main Makefile automatically and is intended to be
used like this for user settings.  If you really need to disable pthreads,
then you can add NO_PTHREADS=1.  Check out the comments at the top of the
Makefile for a list of all variables that can be set.
The quick-install-man target still failed,
Strange.  You tried _after_ you installed git right?

-Brandon

Re: Reduced privileges install

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:35

On 09/20/2010 02:12 PM, Brandon Casey wrote:
On 09/20/2010 11:56 AM, Andrew Keller wrote:
quoted
The quick-install-man target still failed,
Strange.  You tried _after_ you installed git right?
Oh, _and_ you're building within a checkout of the git
repository right?  Not, within the extraction of a tar archive?

i.e.

   git clone git://git.kernel.org/pub/scm/git/git.git
   cd git
   make

not

   wget http://kernel.org/pub/software/scm/git/git-1.7.2.3.tar.gz
   tar zxf git-1.7.2.3.tar.gz
   cd git
   make

-Brandon

Re: Reduced privileges install

From: Andrew Keller <hidden>
Date: 2016-06-15 22:49:35

On Sep 20, 2010, at 1:01 PM, Ævar Arnfjörð Bjarmason wrote:
What does this return for you:

   perl -MExtUtils::MakeMaker -le 'print $ExtUtils::MakeMaker::VERSION'
5.45

~ Andrew Keller

Re: Reduced privileges install

From: Andrew Keller <hidden>
Date: 2016-06-15 22:49:35

On Sep 20, 2010, at 3:18 PM, Brandon Casey wrote:
On 09/20/2010 02:12 PM, Brandon Casey wrote:
quoted
On 09/20/2010 11:56 AM, Andrew Keller wrote:
quoted
The quick-install-man target still failed,
Strange.  You tried _after_ you installed git right?
Oh, _and_ you're building within a checkout of the git repository right?  Not, within the extraction of a tar archive?
Oh, yea...  Forgot about that.  Yea, the quick-install-man target works just fine.

Thanks,
~ Andrew Keller

Re: Reduced privileges install

From: Andrew Keller <hidden>
Date: 2016-06-15 22:49:35

On Sep 20, 2010, at 3:12 PM, Brandon Casey wrote:
On 09/20/2010 11:56 AM, Andrew Keller wrote:
quoted
This is what it took to compile Git on this server without root privileges (Solaris 8 / Sparc):
I thought it was Solaris 9? :)
Ah, you're right; I didn't catch that.  The documentation for the server says Solaris 8, but uname -a says "SunOS hpl 5.9 Generic_122300-54 sun4u sparc SUNW,UltraAX-i2".  I'd trust uname, so that makes this Solaris 9.
quoted
# compile and install git
$ ln -s /usr/local/bin/tclsh8.4 /usr/users/students/ak4390/.local/bin/tclsh
You can set TCL_PATH instead of creating this symbolic link.
quoted
$ 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.
Maybe the configure script is broken with respect to detecting threads on
Solaris 8 (or 9)?  You probably don't really need to run the configure
script on your platform.  I don't.  Since you're using gcc to compile, the
default pthread switch '-lpthread' should be appropriate.  You could try
deleting the config.mak.autogen file that configure creates, and just run
make by itself.  Based on what you've describe, it would look something
like this:

  cd <path-to-git-src>
  rm config.mak.autogen
  cat >config.mak <<EOF
CC=/usr/local/bin/gcc
PREFIX=/usr/users/students/ak4390/.local
PYTHON_PATH=/usr/local/bin/python
TCL_PATH=/usr/local/bin/tclsh8.4
NO_PERL_MAKEMAKER=1
EOF
  make

Then add 'install' to the make command line when you are ready.

Notice, I placed all of the make settings in a file named config.mak.  This
file is imported by the main Makefile automatically and is intended to be
used like this for user settings.  If you really need to disable pthreads,
then you can add NO_PTHREADS=1.  Check out the comments at the top of the
Makefile for a list of all variables that can be set.
Compiling as described above appears to go down in flames:

$ make
/bin/sh: curl-config: not found
    CC fast-import.o
In file included from builtin.h:4,
                 from fast-import.c:147:
git-compat-util.h:140:25: openssl/ssl.h: No such file or directory
git-compat-util.h:141:25: openssl/err.h: No such file or directory
In file included from builtin.h:6,
                 from fast-import.c:147:
cache.h:9:21: openssl/sha.h: No such file or directory
In file included from fast-import.c:156:
csum-file.h:10: error: syntax error before "SHA_CTX"
csum-file.h:10: warning: no semicolon at end of struct or union
csum-file.h:15: error: 'crc32' redeclared as different kind of symbol
/usr/local/include/zlib.h:1285: error: previous declaration of 'crc32' was here
csum-file.h:15: error: 'crc32' redeclared as different kind of symbol
/usr/local/include/zlib.h:1285: error: previous declaration of 'crc32' was here
csum-file.h:17: error: syntax error before '}' token
fast-import.c: In function `store_object':
fast-import.c:995: error: `SHA_CTX' undeclared (first use in this function)
fast-import.c:995: error: (Each undeclared identifier is reported only once
fast-import.c:995: error: for each function it appears in.)
fast-import.c:995: error: syntax error before "c"
fast-import.c:1000: warning: implicit declaration of function `SHA1_Init'
fast-import.c:1000: error: `c' undeclared (first use in this function)
fast-import.c:1001: warning: implicit declaration of function `SHA1_Update'
fast-import.c:1003: warning: implicit declaration of function `SHA1_Final'
fast-import.c: At top level:
fast-import.c:1118: error: syntax error before "SHA_CTX"
fast-import.c: In function `truncate_pack':
fast-import.c:1120: error: `to' undeclared (first use in this function)
fast-import.c:1126: error: dereferencing pointer to incomplete type
fast-import.c:1127: error: dereferencing pointer to incomplete type
fast-import.c:1128: error: dereferencing pointer to incomplete type
fast-import.c:1128: error: `ctx' undeclared (first use in this function)
fast-import.c: In function `stream_blob':
fast-import.c:1140: error: `SHA_CTX' undeclared (first use in this function)
fast-import.c:1140: error: syntax error before "c"
fast-import.c:1154: error: `pack_file_ctx' undeclared (first use in this function)
fast-import.c:1154: error: dereferencing pointer to incomplete type
fast-import.c:1160: error: `c' undeclared (first use in this function)
make: *** [fast-import.o] Error 1

And, this is the same source tree that just worked a minute ago, when I used configure/make/make install.  I then copied the entire source folder, with the modified config.mak file, to my laptop running Snow Leopard, modified the variables in the config.mak file to match the system, and it compiled and installed just fine.  So, this server seems to have a problem with not running the configure script first.

~ Andrew Keller

Re: Reduced privileges install

From: Brandon Casey <hidden>
Date: 2016-06-15 22:49:35

On 09/20/2010 05:53 PM, Andrew Keller wrote:
On Sep 20, 2010, at 3:12 PM, Brandon Casey wrote:
quoted
 You could try
deleting the config.mak.autogen file that configure creates, and just run
make by itself.  Based on what you've describe, it would look something
like this:

  cd <path-to-git-src>
  rm config.mak.autogen
  cat >config.mak <<EOF
CC=/usr/local/bin/gcc
PREFIX=/usr/users/students/ak4390/.local
PYTHON_PATH=/usr/local/bin/python
TCL_PATH=/usr/local/bin/tclsh8.4
NO_PERL_MAKEMAKER=1
EOF
  make

Then add 'install' to the make command line when you are ready.

Notice, I placed all of the make settings in a file named config.mak.  This
file is imported by the main Makefile automatically and is intended to be
used like this for user settings.  If you really need to disable pthreads,
then you can add NO_PTHREADS=1.  Check out the comments at the top of the
Makefile for a list of all variables that can be set.
Compiling as described above appears to go down in flames:

$ make
/bin/sh: curl-config: not found
At this point, the above is just a warning that curl-config is not
in your path.  If curl is not installed on your system, you need
to set NO_CURL=1.
    CC fast-import.o
In file included from builtin.h:4,
                 from fast-import.c:147:
git-compat-util.h:140:25: openssl/ssl.h: No such file or directory
git-compat-util.h:141:25: openssl/err.h: No such file or directory
<snip other related warnings>

Fixed by setting NO_OPENSSL=1.
And, this is the same source tree that just worked a minute ago, when
I used configure/make/make install.  I then copied the entire source
folder, with the modified config.mak file, to my laptop running Snow Leopard,
modified the variables in the config.mak file to match the system, and it
compiled and installed just fine.  So, this server seems to have a problem
with not running the configure script first.
git's configure script is a little different from the configure
scripts in other projects.  All configure does in git is set variables
that are used by the Makefile.  Using its rules, it tries to figure out
what the best setting is for each variable.  Any of these variables can
be set manually in the user's config.mak file.  Apparently, additional
variables need to be modified from their default to handle your system.
Once you determine the set of variables that need to be set, they most
likely will not need to be changed when compiling future versions of
git.

The above two variables (NO_CURL, NO_OPENSSL) will likely fix the errors
that you reported, but I don't guarantee that more errors will not be
produced and will require additional settings.  All of the variables
are described in the comments at the top of the Makefile.  It's an
iterative process.  You could also use the config.mak.autogen as the
baseline for you config.mak file.

-Brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help