Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
677 views
in Technique[技术] by (71.8m points)

c - yosemite svn 1.6.6 segmentation fault

svn stopped working in my Mac after upgrade to Yosemite. I know there is a very similar question with no answer, Segmentation fault: 11 in SVN checkout, however I've spent pretty much the whole day with this and I'm adding more information on the issue. I'm hoping somebody maybe somebody can help... I'm really stuck. I cannot upgrade svn and I'm planning to go back to Mavericks.

The error I get:

svn update
Segmentation fault: 11

I was already working with svn from a binary I compiled myself (although not so familiar with C). There was some months ago an update of Xcode that removed the old legacy svn 1.6.

This time with Yosemite, when I've tried to compile it again, I've seen that the os update has modified apache and APR and the sources do not compile anymore (or at least that's my guess from the error I get):

/bin/sh /mnt/netzima/icaria/apps/subversion-1.6.6/libtool --tag=CC --silent --mode=compile gcc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  -g -O2  -g -O2   -I/usr/include/apache2 -I./subversion/include -I./subversion -I/usr/local/apr/include/apr-1   -I/usr/local/apr-util/include/apr-1 -I/opt/local/include/neon  -o subversion/mod_authz_svn/mod_authz_svn.lo -c subversion/mod_authz_svn/mod_authz_svn.c
subversion/mod_authz_svn/mod_authz_svn.c:448:9: error: member reference base type 'char' is not a structure or union
        ap_log_rerror(file, line, level, 0, r,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've downloaded and make install the following:

  • libtool version 2.4.2
  • autoconf version 2.69
  • automake version 1.14
  • apr version 1.3.12
  • apr-util version 1.3.12
  • apache version 2.2.29

I was hoping that those versions would be compatible with svn 1.6.6, since, as I've mentioned before, my guess was that it is not compatible anymore to the newest versions.

In other to use those packages that I've downloaded, I had to add options to the configure command. For apr-util, I had to configure like this:

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

As for apache:

./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --prefix=/usr/local/apache2 --enable-dav --enable-so

And finally svn:

./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-apxs=/usr/local/apache2/bin/apxs --enable-maintainer-mode

This way at least svn compiles (I guess that proves it is getting the right versions). But it does not work, I get the same segmentation fault. I've added the /usr/local/... directories to my path just to be sure, although I'd guess svn puts all the library it needs in an accesible directory (I think it is /usr/local/bin, which was already in my path).

I have no idea how to go from here. I've tried to compile with debug to see if I can get a pointer to the segmentation fault, a core dump or something like that, with no success...

Any help would be much appreciated! And thanks anyway.

EDIT:

Following @indiv advice, this is the output of otool:

/usr/local/bin/svn:

/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.1.35)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.16.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 62.0.0)
/usr/local/lib/libsvn_client-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_wc-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_ra-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_diff-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_ra_local-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_repos-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_fs-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_fs_fs-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_fs_util-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_ra_svn-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libsasl2.2.dylib (compatibility version 3.0.0, current version 3.15.0)
/usr/local/lib/libsvn_ra_neon-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_delta-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libsvn_subr-1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
/usr/local/apr-util/lib/libaprutil-1.0.dylib (compatibility version 4.0.0, current version 4.12.0)
/usr/local/apr/lib/libapr-1.0.dylib (compatibility version 4.0.0, current version 4.12.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/opt/local/lib/libneon.27.dylib (compatibility version 30.0.0, current version 30.6.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
/opt/local/lib/libexpat.1.dylib (compatibility version 8.0.0, current version 8.0.0)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...