Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git install on older versions of Mac OS X broken (again) #196

Closed
gvwilson opened this issue Apr 3, 2015 · 41 comments
Closed

Git install on older versions of Mac OS X broken (again) #196

gvwilson opened this issue Apr 3, 2015 · 41 comments

Comments

@gvwilson
Copy link
Contributor

gvwilson commented Apr 3, 2015

As reported in our troubleshooting wiki [1], for Mac OS X 10.8, git throws an "Lazy symbol" error, even if the installation went smoothly. The diagnosis for this is to try to do a git init (it'll fail).
The only solution seems to be to download Xcode (apparently, the error is because some libraries are missing and only get installed with Xcode). But today, we found that Apple removed the proper Xcode version from the Apple Store. Now the only fix is to go to the Apple Developer website and search for the the right Xcode there. This requires an Apple Developer account that the students probably won't have.

[1] https://github.com/swcarpentry/workshop-template/wiki/Configuration-Problems-and-Solutions#git

@chendaniely
Copy link

@eddelbuettel suggests to use Docker:

... this is a problems solved, and solved well, by Docker.

@gvwilson
Copy link
Contributor Author

gvwilson commented Apr 3, 2015 via email

@chendaniely
Copy link

@willingc used the installers from sourceforge [1]. I was teaching while @iglpdc and @mckays630 were dealing with the git installation problems but I believe the installer from sourceforge no longer work?

[1] http://sourceforge.net/projects/git-osx-installer/files/?source=navbar0

@jduckles
Copy link
Contributor

jduckles commented Apr 3, 2015

If you download the appropriate installer, "Snow Leopard" for 10.7 and 10.8 (even though Snow Leopard is 10.6) it has worked for me in the past.

@jduckles jduckles closed this as completed Apr 3, 2015
@jduckles jduckles reopened this Apr 3, 2015
@willingc
Copy link
Contributor

willingc commented Apr 3, 2015

@iglpdc @mckays630 @chendaniely Here's also a github repo for the git-osx-installer files: https://github.com/timcharper/git_osx_installer

Out of curiosity, were you trying to use the installers for the most recent version of git when using the git-osx-installers? I found at the SWC event at UCSD that we needed to use an older version of git (1.8) versus 2.x to get git working without huge headaches. Here's what I documented at OpenHatch after another event re: git on osx: https://openhatch.org/wiki/Open_Source_Comes_to_Campus/Curriculum/Laptop_setup/OSX_git
screen shot 2015-04-03 at 09 35 12

I will ask around at PyCon if we can set up easily test envs for the different OSX versions and installs. I've been looking at doing this for OpenHatch anyway.

@jiffyclub
Copy link
Contributor

I opened timcharper/git_osx_installer#43 just now to point the maintainer at this discussion. If anyone has additional details to add, especially which version of Git was giving the "Lazy symbol" error, that would probably be helpful to add either here or there.

@willingc
Copy link
Contributor

willingc commented Apr 3, 2015

Thanks @jiffyclub.

@wking
Copy link
Contributor

wking commented Apr 3, 2015

On Fri, Apr 03, 2015 at 10:00:21AM -0700, Matt Davis wrote:

If anyone has additional details to add, especially which version of
Git was giving the "Lazy symbol" error, that would probably be
helpful to add either here or there.

There's earlier “Lazy symbol” discussion in swcarpentry/DEPRECATED-bc#595,
swcarpentry/DEPRECATED-bc#647 (after 1), and the “Mac” section of 2.

@wking
Copy link
Contributor

wking commented Apr 3, 2015

On Fri, Apr 03, 2015 at 10:22:06AM -0700, W. Trevor King wrote:

There's earlier “Lazy symbol” discussion in swcarpentry/DEPRECATED-bc#595,
swcarpentry/DEPRECATED-bc#647 (after 1), and the “Mac” section of [2].

1: swcarpentry/DEPRECATED-bc#647 (comment)
[2]: https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions#git

The wiki has been migrated to 1, but it still lists the “Lazy
symbol” problem for Mac OS X 10.8.5 that's fixed by an XCode install.

@iglpdc
Copy link
Contributor

iglpdc commented Apr 4, 2015

@jduckles, @willingc I think that the installer working or not still depends on whether you have Xcode installed. Our setup instructions [1] already link to the correct installer for each version. Also, I found the problem pretty much in any workshop I taught in the last 6 months (I'm almost sure to say that is 10.8.5 every time).

Having said that, I didn't actually check that the students were using the correct installer, so it maybe the problem gets fixed now if you use the correct installer, and we were just fixing it in the wrong way (by installing Xcode).

Actually, this particular student in the last workshop didn't seem much aware of which version she was using. To fix this, I'm making two changes:

This brings me to @eddelbuettel 's point. There are many reasons for having an outdated OS at our workshops: some students borrow one; some others get one at work, but they don't have admin rights; some have very old laptops that cannot be updated, and most don't think it is necessary. This girl had a very strong point: she bought her laptop a little over a year ago so "it was brand new" so "why update something new".

As far as for Docker, I think it cannot beat our current setup, at least in simplicity for a novice learner. You just need 3 one-click installers (git-bash, swc-win-installer, and Anaconda for Win, or the git-osx-installer and/or Xcode, and Anaconda for Mac) to install all the software needed for a workshop.

@eddelbuettel
Copy link

@iglpdc I beg to differ but I won'd be belabour it.

This is a somewhat complicated issue:

  • Clearly, Docker is winning for development, deployment, devops simply because of it is standard containers which are easy to produce and trivial to install. On those OSs which need it, boot2docker is one click.
  • But on the other hand @gvwilson has a near-religious zeal for native environments (and, "in theory" and absent these headaches) it would be a good idea if it worked uniformly. To me it doesn't, to you guys it does, so 'chacun a son gout' (ie to 'each his own").

@willingc
Copy link
Contributor

willingc commented Apr 4, 2015

@iglpdc Yes, the student would need to have xcode or the xcode command line tools (a much smaller download) installed. I agree with the suggestion on how to check OS version, which installer to choose, how to install xcode command line tools (if needed) to the setup instructions for OS X. cc/@jdunckles

Instructions for setting up xcode command line tools (I think it can also be brew installed):
http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/

My overall view is that checking the OS X version pre setup would minimize the setup frustration for users. The burden shouldn't be on the student or workshop helpers to guess what might work. Honestly, I dread the set up portion of any workshop (SWC or otherwise).

@willingc
Copy link
Contributor

willingc commented Apr 4, 2015

@eddelbuettel I like Docker. I think that it may be helpful for testing the setup instructions.

FWIW I have been at several workshops where boot2docker installation/configuration was equally problematic on Mac OS X and Windows. Most of the issues had to do with getting the IPs set correctly since boot2docker runs a VM, getting ssh to work properly, and permissions.
Docker install on Mac: https://docs.docker.com/installation/mac/

@eddelbuettel
Copy link

@willingc Agreed re the current IP address issue. Had that too when I once ran, just as a test, boot2docker on my work pc to serve the RStudio Server container: that worked like a charm and stayed up for several months once I knew what the address was. Could do the same for IPython and RStudio Server in one container as I suggested several months back. But all suggestions have issues and nothing dominates so we're back to individual preferences.

@iglpdc
Copy link
Contributor

iglpdc commented Apr 4, 2015

@eddelbuettel , @willingc I like Docker too. I think it is a great solution for many development and deployment problems. I just think that some people in our workshops (say, those that cannot/don't update Mac OS X using the App Store) won't be able to complete the setup by themselves. This would put the burden of finishing the setup on our instructors and many of us are also fairly new to the VM world.

It maybe be good though, to have Docker containers set up for situations when all is going south, like with this girl in my last workshop. In this case, we could provide instructions for instructors only, saying "ok, all is going wrong, before giving up, you could try to install Docker". Apart from being a nice save, it could be a good way to make our instructors more comfortable with Docker and smooth a possible transition in the future.

@willingc
Copy link
Contributor

willingc commented Apr 4, 2015

@eddelbuettel Yeah, individual preferences. I would do it all in JupyterHub ;) Sometimes, the best path is simply do one's best to make whatever path most pleasant for the end user. As a helper in the moment, I have had folks use wakari.io, tmpnb, or my own laptop (not my preferred option) to get them productive.

Which begs the question has anyone tried running this on a Chromebook with or without crouton? The newest version of crouton is quite good (http://www.itworld.com/article/2891142/how-to-run-linux-and-chrome-os-on-your-chromebook.html). I've considered taking one of my Chromebooks to workshops as a backup.

@willingc
Copy link
Contributor

willingc commented Apr 4, 2015

@iglpdc +1 to prior comment 🍰 😎

@willingc
Copy link
Contributor

willingc commented Apr 4, 2015

FYI @jhamrick wrote a detailed and excellent post on using JupyterHub for teaching (https://developer.rackspace.com/blog/deploying-jupyterhub-for-education/). Not suggesting as a solution for this issue now. Just passing along as an excellent article to those that may be interested.

@fgeorgatos
Copy link

IMHO, docker solves a different problem than this, which is that of..., eh, a container!

In many cases, just providing a common namespace via environment-modules
is often what is needed for reproducible setups across multiple platforms (common in HPC):
(ref. http://hpcbios.readthedocs.org/en/latest/HPCBIOS_06-17.html)
meanwhile, a tool like EasyBuild may help with the accurate rebuilds of software (git is there!):
http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-92.html
(most people would like to try eb git/1.8.2-goolf-1.4.10 -r after a successful bootstrap).

enjoy, F.

@wking
Copy link
Contributor

wking commented Apr 10, 2015

On Fri, Apr 03, 2015 at 10:26:48AM -0700, W. Trevor King wrote:

The wiki has been migrated to 1, but it still lists the “Lazy
symbol” problem for Mac OS X 10.8.5 that's fixed by an XCode install.

1: https://github.com/swcarpentry/workshop-template/wiki/Configuration-Problems-and-Solutions#git

Today at UW we had success following @willingc's suggestion to use
git-osx-installer and skip the XCode download 1, so I've mentioned
that approach on the wiki too. It was also mentioned earlier in this
thread [2,3]. I think that's a solid enough solution to be sufficient
for closing this issue.

@jiffyclub
Copy link
Contributor

@wking, which version of Git did you install?

@wking
Copy link
Contributor

wking commented Apr 10, 2015

On Fri, Apr 10, 2015 at 09:59:30AM -0700, Matt Davis wrote:

@wking, which version of Git did you install?

git-2.2.1-intel-universal-snow-leopard.dmg. I expect any of the
snow-leopard series would work though, since the directions under “If
you are running” say to use those for OS X 10.8 1. It's hard to
link to wiki commits, but my full commit message is currently the most
recent here 1.

@jiffyclub
Copy link
Contributor

Okay, that's at odds with @willingc's comment above, but good to have a data point.

It's definitely the stated goal of the git-osx-installer that it should work without XCode.

@jiffyclub
Copy link
Contributor

One confounding factor to watch out for is that sometimes people may have installed the OS X command line tools without having installed Xcode. That usually fixes all these problems, so something to watch out for. Not having Xcode isn't always the whole story.

@wking
Copy link
Contributor

wking commented Apr 10, 2015

On Fri, Apr 10, 2015 at 10:18:06AM -0700, Matt Davis wrote:

One confounding factor to watch out for is that sometimes people may
have installed the OS X command line tools without having installed
Xcode.

I'll try to check this over the break. I don't use OS X; is there a
one-liner that I can use to find out?

@jiffyclub
Copy link
Contributor

Check for /usr/bin/git and/or /usr/bin/gcc and try to get their versions. I think those will only be present and operational if Xcode or the command line tools have been installed.

@wking
Copy link
Contributor

wking commented Apr 10, 2015

On Fri, Apr 10, 2015 at 10:26:49AM -0700, Matt Davis wrote:

Check for /usr/bin/git and/or /usr/bin/gcc and try to get their
versions. I think those will only be present and operational if
Xcode or the command line tools have been installed.

He has nothing at either path, and doesn't remember installing
anything XCode-related.

@jiffyclub
Copy link
Contributor

Cool, seems like good news for it working without Xcode, then.

@willingc
Copy link
Contributor

Great job. Excellent point by Matt on check to see if the command line
utilities are installed even if xcode is not.
There may be some double checking at the PyCon sprints on this issue
since many outreach groups face the same thing. I'll keep you posted.

On 4/10/15 4:05 PM, Matt Davis wrote:

Cool, seems like good news for it working without Xcode, then.


Reply to this email directly or view it on GitHub
#196 (comment).

Carol Willing
Developer | Willing Consulting
+1 760 456 9366 | https://willingconsulting.com

@timcharper
Copy link

Is it just that the operating system is installing a stub now? Maybe the fix is to update the instructions to get that stub moved out of the way?

@jiffyclub
Copy link
Contributor

@timcharper, this is Mac OS 10.8, in which I don't think Apple had stubs for command line tools.

@timcharper
Copy link

timcharper commented Apr 13, 2015 via email

@jiffyclub
Copy link
Contributor

Good point, our instructions currently are giving bad advice about what to download for which Mac OS version.

@jiffyclub
Copy link
Contributor

I've opened swcarpentry/DEPRECATED-site#931 to fix our instructions. It's possible that's what's been causing this problem, though I'm not sure we have enough information from our workshops to say one way or the other.

@chendaniely
Copy link

Will be checking this later tonight, but the issue seems to be documented here [1].

Essentially there is a git wrapper built in OSX that needs xcode installed in /usr/bin/git.
When we install git using the installers, it goes into /usr/local/git/bin/git

You need to run /usr/local/git/bin/git explicitly or change the PATH such that /usr/local/git/bin is before /usr/bin

PATH=/usr/local/git/bin:$PATH
export PATH

[1] http://superuser.com/questions/666086/issues-installing-git-under-mac-os-x-10-9-mavericks

@chendaniely
Copy link

not sure if this was stated anywhere, but the snowleopard installer is needed on mountain lion.
This is mostly a note to myself while at the BUSM workshop

@wking
Copy link
Contributor

wking commented May 13, 2015

On Wed, May 13, 2015 at 10:16:51AM -0700, Daniel Chen wrote:

not sure if this was stated anywhere, but the snowleopard installer
is needed on mountain lion.

It's stated on the git-osx-installer download page 1, under “Which
version should I download?”.

@timcharper
Copy link

I test the git os x installer in a fresh VM; it works. Thanks, @chendaniely, for pointing out the need to use a installer for a version of the operating system that is or predates your present OS.

You'd think people could use common sense here, or read the instructions, but.... there are always those...

@chendaniely
Copy link

from the BU workshop with @mkcor, the calling git from /usr/local/git/bin/git did not seem to work.

@jiffyclub
Copy link
Contributor

See #204 where I fix our installation instructions to make clear which version of the installer is needed depending on your version of OS X.

@rgaiacs
Copy link
Contributor

rgaiacs commented May 23, 2015

I'm closing this issue based on #204. Please reopen it if needed.

@rgaiacs rgaiacs closed this as completed May 23, 2015
fmichonneau pushed a commit that referenced this issue Jun 20, 2018
secure hyperlinks to pre-empt server-side HTTPS redirects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests