The Joyent Community

A place where the Joyent community can gather, help each other out, and stay informed.

You are not logged in.

#1 2008-04-03 15:12:41

jordanbrock
Member
From: Perth, Australia
Registered: 2005-01-31
Posts: 344
Website  Expertise

Installing git

Howdy,

There are a couple of threads on installing git here and here, both of which I've tried to get git installed on my accelerator. I've added all the flags to my Makefile, and it just doesn't seem to work.

Has anyone got a step by step to follow? Or is there a wiki entry I can't seem to find?

Cheers,
Jordan

Offline

 

#2 2008-04-03 15:54:23

madams
 
From: Edinburgh
Registered: 2005-05-11
Posts: 2067
Website  Expertise

Re: Installing git

Where are you getting stuck?


Mark
Live in the city, work in the country. | OpenSolaris Immigrant

Offline

 

#3 2008-04-03 17:21:55

ary
New member
Registered: 2007-08-10
Posts: 7
Expertise

Re: Installing git

I'm also having trouble installing git from source...

when I make i get:

Code:

    CC git.o
In file included from git.c:3:
cache.h:7:21: openssl/sha.h: No such file or directory
gmake: *** [git.o] Error 1


sha.h exists and I took care of the flags...

Please help!

Offline

 

#4 2008-04-04 00:41:38

jordanbrock
Member
From: Perth, Australia
Registered: 2005-01-31
Posts: 344
Website  Expertise

Re: Installing git

I'll post more about what I've been trying, but first a bit of a n00b question.

/opt/local/src doesn't exist on my accelerator. Do I create that as root? or as admin? And then do I do all of the instructions in the other post as root? or as admin? or as another user?

Offline

 

#5 2008-04-04 01:25:39

jordanbrock
Member
From: Perth, Australia
Registered: 2005-01-31
Posts: 344
Website  Expertise

Re: Installing git

ok. I've managed to get it compiled, but it's all in ~/downloads/git-1.5.4.4

the make hasn't installed it anywhere. Where should I copy all the git* files to? I tried 'gmake install' but that didn't work. I can run git from my downloads directory, but that's obviously sub-optimal. Where's the best location? /opt/csw/bin?

Offline

 

#6 2008-04-04 01:57:39

ary
New member
Registered: 2007-08-10
Posts: 7
Expertise

Re: Installing git

jordanbrock wrote:

ok. I've managed to get it compiled


What did u do?

Offline

 

#7 2008-04-04 02:05:52

jordanbrock
Member
From: Perth, Australia
Registered: 2005-01-31
Posts: 344
Website  Expertise

Re: Installing git

untarred git
cd git-1.5.4.4
make the following changes to Makefile

Code:

CFLAGS = -g -O2 -Wall -I/opt/csw/include                                                                                                    
LDFLAGS = -L/opt/csw/include

...

CURLDIR=/opt/csw
NO_TCLTK=1

...

AR = gar

...

NO_ICONV=0
ifdef NO_ICONV

BASIC_CFLAGS += -DNO_ICONV
endif


Then I ran gmake, and it all compiled.

Then I could run

Code:

./git


and it all ran, but it's not installed in any of the system directories. I manually copied git to /opt/csw/bin/git and it worked, but I'm just not sure if I should copy all the scripts over myself, or if there's a better way to do it.

Offline

 

#8 2008-04-04 03:28:50

ary
New member
Registered: 2007-08-10
Posts: 7
Expertise

Re: Installing git

Thanks but it didn't work for me...

Anyways I tried an old git version following dj2 example http://discuss.joyent.com/viewtopic.php … 68#p145368

The make went through, but git is not found

Code:

admin$ git
-bash: git: command not found


and ldd git gives me:

Code:

admin$ ldd git

libz.so => /usr/lib/libz.so libsocket.so.1 => /lib/libsocket.so.1 libnsl.so.1 => /lib/libnsl.so.1 libcrypto.so.0.9.8 => /usr/sfw/lib/libcrypto.so.0.9.8 libc.so.1 => /lib/libc.so.1 libmp.so.2 => /lib/libmp.so.2 libmd.so.1 => /lib/libmd.so.1 libscf.so.1 => /lib/libscf.so.1 libuutil.so.1 => /lib/libuutil.so.1 libgen.so.1 => /lib/libgen.so.1 libcrypto_extra.so.0.9.8 => (file not found) libm.so.2 => /lib/libm.so.2


any tip???

Offline

 

#9 2008-04-04 13:39:37

madams
 
From: Edinburgh
Registered: 2005-05-11
Posts: 2067
Website  Expertise

Re: Installing git

For some reason I had to do the make install command as root, not just using sudo from the admin account.


Mark
Live in the city, work in the country. | OpenSolaris Immigrant

Offline

 

#10 2008-04-08 02:12:45

jordanbrock
Member
From: Perth, Australia
Registered: 2005-01-31
Posts: 344
Website  Expertise

Re: Installing git

Just to follow up, I manually copied all of the git scripts from my downloads directory into /opt/csw/bin (as root) and everything seems to work a treat. Not sure if that's optimal behaviour or not, but hey, it works :)

Offline

 

#11 2008-04-08 08:46:18

madams
 
From: Edinburgh
Registered: 2005-05-11
Posts: 2067
Website  Expertise

Re: Installing git

GIT v1.5.5 Release Notes wrote:

Bunch of portability improvement patches coming from an effort to port to Solaris has been applied.


(reference)

Hopefully this means git will be easier to build and install in the future. I haven't tried 1.5.5. on the Accels yet, though.


Mark
Live in the city, work in the country. | OpenSolaris Immigrant

Offline

 

#12 2008-04-08 17:06:02

alexbcoles
Member
From: Berlin, Germany
Registered: 2006-11-06
Posts: 122
Website  Expertise

Re: Installing git

(Knock on wood) its now working for me. I posted my own instructions on another thread. I'm using pkgsrc for getting the dependencies, then building from source. Git in pkgsrc was causing too many headaches.


personal | biz: ikonoklastik | twitter: myabc

Offline

 

#13 2008-05-29 15:56:23

myobie
New member
Registered: 2007-07-05
Posts: 30
Expertise

Re: Installing git

I just figured it out.

Apparently su - doesn't take use bash or something (it could be a limited bash by default).

If your prompt is just '#' (mine was), then you can get the full bash stuffs by just typing the bash command. Then you get the appropriate environment for making and make installing.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson