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

Add libgit2 dependency to build system #8820

Merged
merged 13 commits into from
Nov 3, 2014
Merged

Add libgit2 dependency to build system #8820

merged 13 commits into from
Nov 3, 2014

Conversation

tkelman
Copy link
Contributor

@tkelman tkelman commented Oct 27, 2014

This is pretty much #7339 with all changes to base removed. And I'm changing the way I'm handling flags and compiler names with cmake in the last commit.

@tkelman tkelman mentioned this pull request Oct 27, 2014
8 tasks
LIBGIT2_OBJ_SOURCE = libgit2-$(LIBGIT2_VER)/build/libgit2.$(SHLIB_EXT)
LIBGIT2_OBJ_TARGET = $(build_shlibdir)/libgit2.$(SHLIB_EXT)

LIBGIT2_OPTS = -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER="$(CC_BASE)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to build the tests by default? Otherwise we should add -DCLAR_BUILD=OFF here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can turn them off to save build time, I think I have them commented out (running them that is)

@jakebolewski
Copy link
Member

This builds fine for me on OS X / Linux. @tkelman can you check if the version check is correct for Windows source builds? If the Makefile changes are acceptable I would say this is good to merge.

@tkelman
Copy link
Contributor Author

tkelman commented Oct 27, 2014

there was a conflict in the gitignore, so I rebased it

@jakebolewski
Copy link
Member

If CMake is now necessary for the default source build then the README should be updated.

@tkelman
Copy link
Contributor Author

tkelman commented Oct 27, 2014

yes good point, will do

@tkelman
Copy link
Contributor Author

tkelman commented Oct 27, 2014

note for @quinnj or @ihnorton or others doing MSYS2 Windows source builds, I've found installing cmake through pacman messes with MSYS2 paths too much (it's in the mingw packages group rather than msys) and it seems to be easier to use the cmake.org installer. Have to either add the folder to your path or set its location in Make.user (guess which one I prefer).

@tkelman
Copy link
Contributor Author

tkelman commented Oct 27, 2014

I'm going to guess this is unrelated, but what's up with

    From worker 2:       * linalg1
    From worker 3:       * linalg2
warning: stack corruption detected
signal (11): Segmentation fault: 11
jl_type_intersect at /Users/travis/build/JuliaLang/julia/src/jltypes.c:788
jl_type_intersection_matching at /Users/travis/build/JuliaLang/julia/src/jltypes.c:1389
jl_type_intersection at /Users/travis/build/JuliaLang/julia/src/jltypes.c:1092
Worker 2 terminated.
ERROR: ProcessExitedException()
 in wait at /private/tmp/julia/lib/julia/sys.dylib (repeats 2 times)
 in wait_full at /private/tmp/julia/lib/julia/sys.dylib
 in remotecall_fetch at multi.jl:676
 in remotecall_fetch at multi.jl:681
 in anonymous at task.jl:1450
while loading /private/tmp/julia/share/julia/test/runtests.jl, in expression starting on line 41

on osx travis?

@quinnj
Copy link
Member

quinnj commented Oct 28, 2014

Thanks for the heads up @tkelman.

@tkelman tkelman force-pushed the tk/libgit2 branch 2 times, most recently from 6f9cea7 to faa35b4 Compare October 30, 2014 06:52
@StefanKarpinski
Copy link
Sponsor Member

So what's the status on this?

@tkelman
Copy link
Contributor Author

tkelman commented Oct 31, 2014

It builds, which I think is the point here. I had to rebase a day or two ago to fix a conflict. If you're happy with my doc additions, I think it's time to merge and get started rewriting Pkg.

@tkelman
Copy link
Contributor Author

tkelman commented Oct 31, 2014

And I'm pretty sure I resolved the cmake compiler name pickiness that @vtjnash was objecting to in #7339 in a way that shouldn't break anything. (6300cbe - @Keno this shouldn't break your libcxx stuff either, but you might want a heads-up)

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 31, 2014

Yes, I like your solution quite a lot

The version test in libgit2.jl seems like it may cause issues for system packagers. I hope we don't have that strict of a requirement on the version.

It might be good to mention that msys cmake will get confused, but it sounds like we may need to switch to a Cygwin cross-compile anyways?

Lgtm to merge

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 31, 2014

Can you enable the code so that 'make libgit2-test' does something? Or why is that commented out?

@jakebolewski
Copy link
Member

We may not need to use one of the bugfix releases, but we definitely need to use the v0.21 release. Much of the library was rewritten during the last release cycle and many api's changed. I think we should use the bugfix release for now as it would be annoying to run into solved problems which have been back-ported. Also we should bump the version to v0.21.2 which was released a couple days ago.

@tkelman
Copy link
Contributor Author

tkelman commented Oct 31, 2014

@vtjnash I don't remember exactly what was going wrong with the libgit2 self-checks, I think they may have been failing on one or more platforms? We can also switch from cmake --build to just recursive make so any parallel -j flags propagate to libgit.

@tkelman
Copy link
Contributor Author

tkelman commented Oct 31, 2014

we may need to switch to a Cygwin cross-compile anyways?

That depends on whether we can figure out what's wrong in LLVM 3.5.0 with the mingw-builds compiler version we've been using with the msys2 build. We can't use the mingw compilers from pacman, at least for 32 bit, since they're using dwarf exceptions. I don't think the msys2 pacman version of cmake is unable to build this, but it does mess with the /mingw64 paths because it's not the posix-style cmake.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 31, 2014

Can we give it a version range then (v0.21+ perhaps)?

@jakebolewski
Copy link
Member

The test doesn't check the patch number, only the major / minor version numbers.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 31, 2014

Ok, but it looks like Ubuntu has 0.19 or 0.20 right now https://packages.ubuntu.com/source/utopic/libgit2

@jakebolewski
Copy link
Member

v0.21 was released in June. I don't think it is possible to support any older version, merge support was added in v0.21.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Oct 31, 2014

It should be ok, since Julia 0.4 wouldn't be in Ubuntu till next spring or fall anyways. Just thought it might be worth mentioning, although I would also support getting this merged now so we can start to see what issues it might bring with it

@tkelman
Copy link
Contributor Author

tkelman commented Oct 31, 2014

Don't think it has to be perfect in this pr, we can keep working on it on master

@jakebolewski
Copy link
Member

0.21 was a breaking release as they are trying to get the api's settled for v1.0. There should not be as much api breakage going forward.

@jakebolewski
Copy link
Member

Bump. Can we merge this? I have time to work on this this week.

@staticfloat
Copy link
Sponsor Member

+1 for just merging and dealing with it this week

@StefanKarpinski
Copy link
Sponsor Member

Yeah, I'm in favor. @tkelman, your call.

tkelman added a commit that referenced this pull request Nov 3, 2014
Add libgit2 dependency to build system
@tkelman tkelman merged commit f762d1f into master Nov 3, 2014
@tkelman tkelman deleted the tk/libgit2 branch November 3, 2014 21:33
@tkelman
Copy link
Contributor Author

tkelman commented Nov 3, 2014

Well if you're gonna put it that way...

@staticfloat
Copy link
Sponsor Member

@tkelman tkelman right now

@StefanKarpinski
Copy link
Sponsor Member

Ah, yes. Finally!

@tkelman
Copy link
Contributor Author

tkelman commented Nov 3, 2014

will need ppa-packaging, and bottling once the more pressing osx-travis blockers are re-bottled

edit: we could borrow from / use https://launchpad.net/~presslabs/+archive/ubuntu/gitfs-dev/+packages for the ppa, and homebrew already bottles libgit2 for 10.8 and newer

@quinnj
Copy link
Member

quinnj commented Nov 8, 2014

Finally updating to master tonight and everything built without a hitch. Really big thanks and kudos to @tkelman for the great work here.

@tkelman
Copy link
Contributor Author

tkelman commented Nov 8, 2014

@quinnj Good to hear, you're very welcome, but getting it into the build system is just the start. And we haven't had any successful binaries uploaded since this merge. But that's mostly due to the low bus factor right now on our ability to build official binaries.

@tkelman
Copy link
Contributor Author

tkelman commented Nov 9, 2014

@staticfloat oh, whoops, looks like getting rid of the compile instructions for git broke the mac binaries. Sorry, my bad! Does the mac app still need to build git from source? If so I'll put it back.

https://buildbot.e.ip.saba.us:8010/builders/package_osx10.9/builds/278/steps/shell_6/logs/stdio

make -C ../../../deps install-git

@staticfloat
Copy link
Sponsor Member

We do need to bundle git with the mac dmgs, since without that, we don't
necessarily have git.
-E

On Sun, Nov 9, 2014 at 1:30 PM, Tony Kelman [email protected]
wrote:

@staticfloat https://github.com/staticfloat oh, whoops, looks like
getting rid of the compile instructions for git broke the mac binaries.
Sorry, my bad! Does the mac app still need to build git from source? If so
I'll put it back.

https://buildbot.e.ip.saba.us:8010/builders/package_osx10.9/builds/278/steps/shell_6/logs/stdio

make -C ../../../deps install-git


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

@tkelman
Copy link
Contributor Author

tkelman commented Nov 9, 2014

Okay I'll put it back, sorry I missed it - don't think I've ever looked into contrib/mac before. Can never keep track of what Apple installs by default vs what comes in the command line tools. We can get rid of it for real once libgit is fully ready, same as for the Windows binaries.

tkelman added a commit that referenced this pull request Nov 9, 2014
still being used for mac binaries, ref
#8820 (comment)
waTeim pushed a commit to waTeim/julia that referenced this pull request Nov 23, 2014
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

Successfully merging this pull request may close these issues.

8 participants