git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/5] drop vcs-svn experiment

From
Jeff King <peff@peff.net>
Date
Aug 14, 2020, 15:11 UTC
Message-ID
<20200814151137.GA4169627@coredump.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.2008141634500.54@tvgsbejvaqbjf.bet>
On Fri, Aug 14, 2020 at 04:39:07PM +0200, Johannes Schindelin wrote:
Show 26 quoted lines
> On Thu, 13 Aug 2020, Jeff King wrote:
> 
> > The code in vcs-svn was started in 2010 as an attempt to build a
> > remote-helper for interacting with svn repositories (as opposed to
> > git-svn). However, we never got as far as shipping a mature remote
> > helper, and the last substantive commit was e99d012a6bc in 2012.
> >
> > We do have a git-remote-testsvn, and it is even installed as part of
> > "make install". But given the name, it seems unlikely to be used by
> > anybody (you'd have to explicitly "git clone testsvn::$url", and there
> > have been zero mentions of that on the mailing list since 2013, and even
> > that includes the phrase "you might need to hack a bit to get it working
> > properly"[1]).
> >
> > We also ship contrib/svn-fe, which builds on the vcs-svn work. However,
> > it does not seem to build out of the box for me, as the link step misses
> > some required libraries for using libgit.a. Curiously, the original
> > build breakage bisects for me to eff80a9fd9 (Allow custom "comment
> > char", 2013-01-16), which seems unrelated. There was an attempt to fix
> > it in da011cb0e7 (contrib/svn-fe: fix Makefile, 2014-08-28), but on my
> > system that only switches the error message.
> 
> FWIW I got it to work, as part of my initial patches to support
> `init.defaultBranch`. I even included a patch to touch `svn-fe` up in the
> patch thicket to demonstrate how we can move from `master` as Git's
> default branch to `main`.

In my case I needed to specify both -lpthread (common for Unix systems) and -lpcre (uncommon; I set USE_LIBPCRE).

It looks like it tries to use PTHREAD_LIBS automatically, but that's only defined in the Makefile for most platforms, not any of the config.mak.* we include. However, I think it would be defined if I used autoconf.

So I can _almost_ build with:
  make PTHREAD_LIBS='-lpthread -lpcre2-8'

But it still doesn't work, because the code which uses those (and -lz, which the Makefile does know about) is in the static libraries (libgit.a, etc). So the -l libs need to come after that. I needed:

diff --git a/contrib/svn-fe/Makefile b/contrib/svn-fe/Makefile
index e8651aaf4b..b90cf876cd 100644
--- a/contrib/svn-fe/Makefile
+++ b/contrib/svn-fe/Makefile
@@ -74,7 +74,7 @@ endif
 endif
 
 svn-fe$X: svn-fe.o $(VCSSVN_LIB) $(XDIFF_LIB) $(GIT_LIB)
-	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(EXTLIBS) -o $@ svn-fe.o $(LIBS)
+	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ svn-fe.o $(LIBS) $(EXTLIBS)
 
 svn-fe.o: svn-fe.c ../../vcs-svn/svndump.h
 	$(QUIET_CC)$(CC) $(CFLAGS) -I../../vcs-svn -o $*.o -c $<

So I'm sure somebody determined could get it to work, and it's
definitely salvageable. But given the lack of questions or reports about
this long-standing breakage on the list, I suspect that nobody is
actually building it in practice.

-Peff
Previous: Johannes SchindelinNext: Taylor Blau
Message 35 of 36 in “slimming down installed size”
  1. 0/5 slimming down installed sizeJeff King, Aug 13, 2020
  2. 1/5 Makefile: drop builtins from MSVC pdb listJeff King, Aug 13, 2020
  3. Taylor BlauAug 13, 2020
  4. Jeff KingAug 13, 2020
  5. Derrick StoleeAug 13, 2020
  6. Jeff KingAug 13, 2020
  7. Johannes SchindelinAug 14, 2020
  8. Jeff KingAug 14, 2020
  9. Johannes SchindelinAug 17, 2020
  10. Jeff HostetlerAug 17, 2020
  11. 2/5 make credential helpers builtinsJeff King, Aug 13, 2020
  12. Taylor BlauAug 13, 2020
  13. Jeff KingAug 13, 2020
  14. Junio C HamanoAug 13, 2020
  15. 3/5 make git-bugreport a builtinJeff King, Aug 13, 2020
  16. Derrick StoleeAug 13, 2020
  17. Jeff KingAug 13, 2020
  18. Junio C HamanoAug 13, 2020
  19. Junio C HamanoAug 13, 2020
  20. Jeff KingAug 14, 2020
  21. Johannes SchindelinAug 14, 2020
  22. Jeff KingAug 14, 2020
  23. Junio C HamanoAug 13, 2020
  24. Johannes SchindelinAug 14, 2020
  25. Jeff KingAug 15, 2020
  26. Emily ShafferAug 17, 2020
  27. Junio C HamanoAug 17, 2020
  28. Jeff KingAug 17, 2020
  29. Emily ShafferAug 17, 2020
  30. 4/5 make git-fast-import a builtinJeff King, Aug 13, 2020
  31. 5/5 drop vcs-svn experimentJeff King, Aug 13, 2020
  32. Taylor BlauAug 13, 2020
  33. Jeff KingAug 13, 2020
  34. Johannes SchindelinAug 14, 2020
  35. Jeff KingAug 14, 2020
  36. Taylor BlauAug 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.