Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Subversion does not run after SQLite was changed to keg_only on 10.6.8 #17172

Closed
michaellopez opened this Issue · 21 comments

6 participants

@michaellopez

After brew update and brew upgrade today subversion does not run anymore.

$ svn --version
dyld: Library not loaded: /usr/local/lib/libsqlite3.0.8.6.dylib
  Referenced from: /usr/local/lib/libserf-1.0.0.0.dylib
  Reason: image not found
Trace/BPT trap

I tracked it to #17005 and I think that the keg_only change is the cause. The reason is that after running brew link sqlite the svn command runs just fine.

Gist: https://gist.github.com/4564921

@samueljohn

Thanks, did you already brew rm sqlite svn and then brew install svn?

@michaellopez

@samueljohn Yeah, the gist is copy/paste from terminal from the second time I ran it, with the HOMEBREW_MAKE_JOBS=1 VERBOSE=1 part. svn command was still broken unfortunately.

@samueljohn

Is your brew doctor happy?

@michaellopez

It complains about my NTFS-3G installation. But most likely that won't affect this issue as brew and all my formulae have worked and brew link sqlite is a workaround.

I followed the guidelines, my brew doctor output is in the gist

@samueljohn

Okay, the NTFS-3G should not be the problem here.

@adamv
Owner

What does which svn and otool -L $(which svn) give you?

@adamv
Owner

Wait, never mind above.

$ brew deps svn
neon
pkg-config
readline
serf
sqlite

Try brew rm svn serf neon and then reinstall svn.

@samueljohn

Thing is I can't reproduce.

@michaellopez

@adamv Thank you, running brew rm svn serf neon and then brew install svn solves it for me!

@Sharpie
Collaborator

The problem isn't coming from SVN, it is coming from serf:

 Referenced from: /usr/local/lib/libserf-1.0.0.0.dylib

It loos like we don't list SQLite as a serf dependency:

➜  ~  brew deps serf
libtool

This could be a problem if serf links against the system SQLite but SVN links against the keg-only SQLite. This begs the question: does SVN really need a newer SQLite than OS X provides? I can't find anything in the logs that gives the reasoning behind using our SQLite and SVN was built against the system version at one time: 800f03b.

@adamv
Owner

MacPorts doesn't list sqlite as a dep for serf either...

@adamv
Owner

But doing a brew install -v serf shows it is adding -lsqlite3 to its libs.

@adamv
Owner

...and linking to the system Sqlite. Jeez.

@Sharpie
Collaborator

And as far as ack can tell, no piece of serf code is calling a function beginning with sqlite3_ which is very curious.

@Sharpie
Collaborator

...and linking to the system Sqlite. Jeez.

Well, it would now that Homebrew SQLite is keg-only and not listed as a dep.

@adamv adamv reopened this
@adamv
Owner

Does this have something to do with how apr works?

@Sharpie
Collaborator

From apu-1-config:

➜  serf-1.1.1  apu-1-config --libs
-lldap -llber -llber    -lexpat -liconv    -lsqlite3        -lldap -llber -llber

Which looks like it gets rolled into the serf build (tough to tell as serf has a bit of a wonky custom buildsystem):

self.LIBS = self.apu.get_value(None, '--link-libtool') \                    
                + ' ' + self.apu.get_value(None, '--libs') \                    
                + ' ' + self.apr.get_value(None, '--link-libtool') \            
                + ' ' + self.apr.get_value(None, '--libs') \                    
                + ' -lz'

As an aside, isn't there a linker option that can be invoked such that dylibs won't be linked unless the object code used to create a dylib or executable actually needs functions from the external lib?

@adamv
Owner

Might add sqlite as a build-time dep for serf in the meantime.

@adamv
Owner

(I'm not opposed to having svn link against system sqlite, if that works on all supported platforms.)

@adamv adamv closed this issue from a commit
@adamv adamv serf: depend on sqlite
apr-util will add a linkage to sqlite, even though serf doesn't use it
(from what I can tell). But when serf is linked with subversion, they
need to reference the same sqlite or bad things happen.

Closes #17172.
6b339a7
@adamv adamv closed this in 6b339a7
@norioxkimura norioxkimura referenced this issue from a commit in norioxkimura/homebrew
@adamv adamv serf: depend on sqlite
apr-util will add a linkage to sqlite, even though serf doesn't use it
(from what I can tell). But when serf is linked with subversion, they
need to reference the same sqlite or bad things happen.

Closes #17172.
6e4e748
@cooljeanius cooljeanius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@bitboxer

I had that problem today. Fixed it with adding --build-from-source to install subversion on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.