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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 14, 2020 at 04:39:07PM +0200, Johannes Schindelin wrote:

> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux