LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2014, 05:00 PM   #1
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware, Ubuntu
Posts: 249

Rep: Reputation: 130Reputation: 130
Questions about building git to install in non-standard directory


I'm new to doing this sort of thing.

I am working on a project where I will need to have multiple versions of git installed. I'm on Slackware 14.1 with the defacto git 1.8.4 installed by the slackware install dvd.

I have downloaded git 1.9.0 and have built the config file and compiled with a prefix:

make configure
./configure --prefix=/opt/git1_9_0
make all
sudo make install

Then I changed my $PATH in .bashrc to:

PATH=/opt/git1_9_0/bin:$PATH

Git seems to work but how do I know /opt/git1_9_0/bin/git is using the directories in the /opt/git1_9_0 directories and not the ones from the standard install?

/opt/git1_9_0/
|-- bin
| |-- git
| |-- git-cvsserver
| |-- git-receive-pack
| |-- git-shell
| |-- git-upload-archive
| |-- git-upload-pack
| `-- gitk
|-- lib64
| `-- perl5
|-- libexec
| `-- git-core
`-- share
|-- git-core
|-- git-gui
|-- gitk
|-- gitweb
|-- locale
|-- man
`-- perl5

Should I be including the /opt/git1_9_0/libexec & share in the path or does git know where these are from relative paths set by the configuration? Is there a way to be certain?

Thanks.
 
Old 03-15-2014, 03:45 AM   #2
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by coldbeer View Post
I am working on a project where I will need to have multiple versions of git installed.
This is almost always a bad strategy; I hope you know that already. The proprietary software world is full of Java products that demand a very specific JRE with very specific bugs that the vendor can't get their poor heads around fixing, so they just dump complexity on their customers instead. Don't be like that if you can avoid it. If an incompatible change in git-1.9 is holding you back, it will have to be tackled sooner or later, and sooner is better, because it will save you work implementing workrounds like this.

Having said that, the setup that you describe should just about work. The biggest issue I see with your current setup is that, unless you set MANPATH, you are getting the wrong versions of the manpages. If the exact version of git is so important to you, then getting the right documentation is a big deal.

Other stuff is also worryingly shared or sidelined, like the hooks and perl stuff. See below for a suggestion of how to deal with this.

Quote:
Originally Posted by coldbeer View Post
Should I be including the /opt/git1_9_0/libexec & share in the path or does git know where these are from relative paths set by the configuration? Is there a way to be certain?
You have plenty of options.
  • Delete /opt/git1_9_0/libexec, observe whether git-1.9 stops working, and then reinstall git 1.9.0. (This is why you should be making a proper package, not just doing 'make install')
  • Uninstall git-1.8.4 and observe whether git-1.9 continues to work, then reinstall git-1.8.4
  • Inspect the binaries with 'strings'. If you look carefully, you will see that the only occurrence of 'libexec' is in a single string, 'libexec/git-core'. This path fragment has no hardcoded prefix, or suffix, which suggests strongly that it works out the right prefix as required.
  • The string 'libexec/git-core' also suggests a good way of grepping the place in the source code where you will be able to see exactly what it does and how it does it

*But* it would probably be much better to uninstall Slackware's git-1.8.4, and build your own 1.8.4 to install under /opt/git1_8_4, so that you have both /opt/git1_9_0 and /opt/git1_8_4. Then only the nondefault paths exist in each version. Thus there would be nothing shared and no possibility of cross-contamination.

[Why the mangled name, anyway? Call it /opt/git-1.9.0 ]
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with building the GNOME gftp from GIT repository :( chansanle Linux - Software 7 02-23-2014 08:12 AM
Building Gnome 3.x from git Electromaniac Slackware 2 11-10-2011 04:35 AM
Building linux kernel from git dolphin77 Slackware 28 11-02-2011 06:05 AM
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 02:09 PM
[SOLVED] Building Cinelerra-CV from git repository - syntax error falmdavis Linux - Software 3 07-19-2010 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration