All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 5/5] drop vcs-svn experiment
Date: Fri, 14 Aug 2020 11:11:37 -0400	[thread overview]
Message-ID: <20200814151137.GA4169627@coredump.intra.peff.net> (raw)
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:

> 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

  reply	other threads:[~2020-08-14 15:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 14:55 [PATCH 0/5] slimming down installed size Jeff King
2020-08-13 14:57 ` [PATCH 1/5] Makefile: drop builtins from MSVC pdb list Jeff King
2020-08-13 15:04   ` Taylor Blau
2020-08-13 15:08     ` Jeff King
2020-08-13 16:37       ` Derrick Stolee
2020-08-13 17:40         ` Jeff King
2020-08-14 14:18       ` Johannes Schindelin
2020-08-14 14:32         ` Jeff King
2020-08-17  4:42           ` Johannes Schindelin
2020-08-17 13:20         ` Jeff Hostetler
2020-08-13 14:58 ` [PATCH 2/5] make credential helpers builtins Jeff King
2020-08-13 15:08   ` Taylor Blau
2020-08-13 15:14     ` Jeff King
2020-08-13 17:55       ` Junio C Hamano
2020-08-13 14:59 ` [PATCH 3/5] make git-bugreport a builtin Jeff King
2020-08-13 17:01   ` Derrick Stolee
2020-08-13 17:38     ` Jeff King
2020-08-13 18:25       ` Junio C Hamano
2020-08-13 18:47         ` Junio C Hamano
2020-08-14 10:13           ` Jeff King
2020-08-14 14:25           ` Johannes Schindelin
2020-08-14 10:05         ` Jeff King
2020-08-13 18:01   ` Junio C Hamano
2020-08-14 14:28     ` Johannes Schindelin
2020-08-15  6:38     ` Jeff King
2020-08-17 12:12       ` Emily Shaffer
2020-08-17 16:58       ` Junio C Hamano
2020-08-17 21:40         ` Jeff King
2020-08-17 12:16   ` Emily Shaffer
2020-08-13 14:59 ` [PATCH 4/5] make git-fast-import " Jeff King
2020-08-13 15:00 ` [PATCH 5/5] drop vcs-svn experiment Jeff King
2020-08-13 15:11   ` Taylor Blau
2020-08-13 15:18     ` Jeff King
2020-08-14 14:39   ` Johannes Schindelin
2020-08-14 15:11     ` Jeff King [this message]
2020-08-13 15:13 ` [PATCH 0/5] slimming down installed size Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200814151137.GA4169627@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.