Re: Reduced privileges install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 20, 2010, at 3:12 PM, Brandon Casey wrote:
> 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? :)

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.

>> # 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.

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]