Termux-packages: git svn fails: Can't locate SVN/Core.pm

Created on 14 Jun 2018  路  22Comments  路  Source: termux/termux-packages

Subversion and git are installed. The git svn command fails due to a missing Perl module dependency (SVN::Core).

$ svn
Type 'svn help' for usage.
$ git svn
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /data/data/com.termux/files/usr/share/perl5 /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/arm-android /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2 /data/data/com.termux/files/usr/lib/perl5/5.26.2/arm-android /data/data/com.termux/files/usr/lib/perl5/5.26.2 .) at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 32.
Compilation failes in require at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.

bug report

Most helpful comment

sudo xcodebuild -license
xcode-select --install # There will be a GUI prompt
sudo cpan SVN::Core # use the "sudo" method when prompted

Then add this to your ~/.profile:

export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH

Then probably:

brew reinstall git
brew reinstall subversion

All 22 comments

Have you tried installing it through cpan/cpanm?
cpan SVN::Core

I did; the installation failed. But that would be a different issue; the module should be installed as a dependency of the git package (or, possibly, the subversion package).

(FWIW, the issue with cpan SVN::Core was that it insists on compiling Subversion, even with both the subversion and subversion-dev packages installed. That required installing all of Subversion's dependencies -- apr-dev, apr-util-dev, libsqlite-dev, and libexpat-dev -- and then fails with a compiler error.)

This is sort of uncharted territory, we don't have any packages that I can think of that rely on modules/packages that are installed through third-party package managers (such as cpan, pip, ..).

Adding a dependency on SVN::CORE would mean either packaging SVN::CORE into it's own package ("perl-svn-core" I suppose) or installing it in a post-install script. Installing it in a postinst script would mean that we need to add perl (and possible apr-dev apr-util-dev, sqlite-dev, expat-dev, ...) to git's dependencies.
More realistic would then be to split git svn into it's own subpackage with all these dependencies and a working postinst script.

We tend to not package packages that are installable through other package managers, as we don't have the manpower to be able to maintain thousands of such packages.

Errr... the git package already comes with a number of Perl package...?

$ ls /data/data/com.termux/files/usr/share/perl5/Git/SVN
Editor.pm Fetcher.pm GlobSpec.pm Log.pm Memoize/ Migration.pm Prompt.pm Ra.pm Utils.pm

And SVN::Core _isn't_ installable through a third-party package manager, as cpan SVN::Core barfs as well...

Errr... the git package already comes with a number of Perl package...?

I have to look into the Makefile but maybe it's possible to install SVN::Core there as well then.

as cpan SVN::Core barfs as well...

Could you share the compiler error that you got?

Could you share the compiler error that you got?

Of course. Find the full log attached. The compiler error is:

CE   -Werror=unknown-warning-option -g -O2    -I./subversion/include -I./subversion -I/data/data/com.termux/files/usr/include/apr-1   -I/data/data/com.termux/files/usr/include/apr-1   -o subversion/libsvn_subr/cache-memcache.lo -c subversion/libsvn_subr/cache-memcache.c
In file included from subversion/libsvn_subr/cache-memcache.c:38:
In file included from /data/data/com.termux/files/usr/include/apr-1/apr_memcache.h:32:
In file included from /data/data/com.termux/files/usr/include/apr-1/apr_network_io.h:32:
In file included from /data/data/com.termux/files/usr/include/netinet/in.h:37:
In file included from /data/data/com.termux/files/usr/include/linux/in.h:217:
In file included from /data/data/com.termux/files/usr/include/asm/byteorder.h:21:
In file included from /data/data/com.termux/files/usr/include/linux/byteorder/little_endian.h:28:
/data/data/com.termux/files/usr/include/linux/swab.h:39:8: error: unknown type name 'inline'
static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) {
       ^
/data/data/com.termux/files/usr/include/linux/swab.h:39:15: error: expected identifier or '('
static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) {
              ^
/data/data/com.termux/files/usr/include/linux/swab.h:46:8: error: unknown type name 'inline'
static inline __attribute__((__const__)) __u32 __fswahb32(__u32 val) {
       ^
/data/data/com.termux/files/usr/include/linux/swab.h:46:15: error: expected identifier or '('
static inline __attribute__((__const__)) __u32 __fswahb32(__u32 val) {
              ^
/data/data/com.termux/files/usr/include/linux/swab.h:79:8: error: unknown type name 'inline'
static inline __u32 __swahw32p(const __u32 * p) {
       ^
/data/data/com.termux/files/usr/include/linux/swab.h:79:20: error: expected ';' after top level declarator
static inline __u32 __swahw32p(const __u32 * p) {
                   ^

svn_core.log

The compiler uses -std=c90, it would probably be solved with -std=c99 instead.

How to change that in a easy way is not something I know though.

Ref: https://stackoverflow.com/questions/25570468/clang-not-recognizing-inline-attribute-after-preprocessor-expansion.

That would be an upstream bug in Subversion 1.8.11 then, which does this during configure:

checking for gcc option to accept ISO C89... none needed
checking if gcc accepts -std=c90... yes

This results in said option being put into the Makefile.

There is a hackish way around this, which at least completes the build -- I could not yet test whether this hack breaks something further down the tracks:

$ CFLAGS=-std=99 cpan SVN::Core

The so-passed CFLAGS get put in the compiler command line _after_ the -std=c90 put there by configure, so the compiler runs in C99 mode.

Note that this generates a couple of rather ugly warnings (like printf() type mismatches...) that were not there before; that is why I wouldn't trust the resulting binaries too blindly.

Anyway... I still feel (strongly) that SVN::Core should be packaged with either subversion or git. At this point someone wanting to use git svn on Termux needs to install four otherwise unnecessary packages and find out about abovementioned hack to get there... perhaps even more as my smartphone is still working on the compile...

No luck. Subversion gets compiled successfully, and SVN::Core gets built, but it cannot find the library it needs:

$ git svn
Can't load '/data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/arm-android/auto/SVN/_Core/_Core.so' for module SVN::_Core: dlopen failed: library "libsvn_client-1.so.0" not found at /data/data/com.termux/files/usr/lib/perl5/5.26.2/arm-android/DynaLoader.pm line 196.
at /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/arm-android/SVN/Base.pm line 59.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/arm-android/SVN/Core.pm line 5.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.

The library _does_ exist in ~/.cpan, though:

$ find .cpan -name libsvn-client-1.so.0
.cpan/build/Alien-SVN-v1.8.11.0-0/src/subversion/subversion/libsvn_client/.libs/libsvn_client-1.so.0

The dlopen error can probably be solved by changing your install line to CFLAGS=-std=99 LDFLAGS=-lsvn_client-1 cpan SVN::Core (see https://github.com/android-ndk/ndk/issues/201 for background).

Compiling on device seems to be too much of a hassle, I agree that we should provide a package with the needed files. From @tomty89's linked README it looks like it should be built into subversion.

It needs to be -std=c99 (you were missing the "c" there).

Good idea on the LDFLAGS, but it isn't sufficient:

cd subversion/svn && /bin/sh /home/.cpan/build/Alien-SVN-v1.8.11.0-2/src/subversion/libtool --tag=CC --silent --mode=link gcc  -Werror=unknown-warning-option -std=c99    -lsvn_client-1    -rpath /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/arm-android/Alien/SVN  -o svn  add-cmd.lo blame-cmd.lo cat-cmd.lo changelist-cmd.lo checkout-cmd.lo cl-conflicts.lo cleanup-cmd.lo commit-cmd.lo conflict-callbacks.lo copy-cmd.lo delete-cmd.lo deprecated.lo diff-cmd.lo export-cmd.lo file-merge.lo help-cmd.lo import-cmd.lo info-cmd.lo list-cmd.lo lock-cmd.lo log-cmd.lo merge-cmd.lo mergeinfo-cmd.lo mkdir-cmd.lo move-cmd.lo notify.lo patch-cmd.lo propdel-cmd.lo propedit-cmd.lo propget-cmd.lo proplist-cmd.lo props.lo propset-cmd.lo relocate-cmd.lo resolve-cmd.lo resolved-cmd.lo revert-cmd.lo status-cmd.lo status.lo svn.lo switch-cmd.lo unlock-cmd.lo update-cmd.lo upgrade-cmd.lo util.lo ../../subversion/libsvn_client/libsvn_client-1.la ../../subversion/libsvn_wc/libsvn_wc-1.la ../../subversion/libsvn_ra/libsvn_ra-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_diff/libsvn_diff-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -L/data/data/com.termux/files/usr/lib -laprutil-1 -L/data/data/com.termux/files/usr/lib -lapr-1
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_cache__create_null'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_sort__array_lookup'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_io_file_rename2'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_ra_list'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__fnv1a_32x4'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_cstring__reverse_match_length'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_output2'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_stringbuf_from_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__data_create_root'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__get_shelves_dir'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc_revert5'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_text_mark_resolved'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_temp_serializer__add_leaf'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_hunk__create_adds_single_line'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_ver_check_list2'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__data_write'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_fs__compatible_version'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_io__file_lock_autocreate'
/data/data/com.termux/files/usr/lib/libsvn_ra_serf-1.so: undefined reference to `svn_cstring_join2'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__translated_stream'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__node_get_not_present_children'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__next_byte_stream'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc_queue_committed4'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_tree_update_break_moved_away'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__first_int_substream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__data_read'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_io_file_aligned_seek'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_hunk__get_fuzz_penalty'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_get_binary_diff_original_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__encode_uint'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__byte_block_count'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_string_from_stream2'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_get_binary_diff_result_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_checksum__wrap_write_stream_fnv1a_32x4'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__get_int'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__read_conflict_descriptions2_t'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_stream_read_full'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_io_file_create_empty'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_tree_update_local_add'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_priority_queue__create'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_hunk__create_deletes_single_line'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_checksum__from_digest_fnv1a_32x4'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_fs_util__version'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_prop_mark_resolved'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__first_int_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_cstring__match_length'
/data/data/com.termux/files/usr/lib/libsvn_ra_serf-1.so: undefined reference to `svn_txdelta_to_svndiff_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_io_write_atomic2'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__decode_uint'
undefined reference to `svn__decode_uint'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_file_output_unified4'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__add_bytes'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_stringbuf_create_wrap'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__ui64tobase36'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_io_file_get_offset'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_fs__prop_lists_equal'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_sort__array'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_io_file_size_get'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__base36toui64'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_tree_update_incoming_move'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_io_file_flush'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_utf__fuzzy_glob_match'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_stream_set_read2'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__add_uint'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__get_uint'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_prefix_string__create'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__diff7'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__guess_incoming_move_target_nodes'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc_cleanup4'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__create_int_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_prefix_string__compare'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__get_bytes'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_prefix_tree__create'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__add_int'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_priority_queue__update'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_priority_queue__pop'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_cache__has_key'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__int_count'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__next_int_stream'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_tree_update_raise_moved_away'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_ra__dup_session'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__create_int_substream'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__conflict_tree_update_moved_away_node'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_error_quick_wrapf'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc_add_from_disk3'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_diff_output_binary'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__first_byte_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_checksum__wrap_write_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_packed__create_bytes_stream'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_mutex__get'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_stringbuf_appendfill'
/data/data/com.termux/files/usr/lib/libsvn_client-1.so: undefined reference to `svn_wc__parse_externals_description'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn_priority_queue__peek'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__encode_int'
/data/data/com.termux/files/usr/lib/libsvn_fs_x-1.so: undefined reference to `svn__decode_int'
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)                         make: *** [build-outputs.mk:761: subversion/svn/svn] Error 1                                                building subversion failed at inc/My/SVN/Builder.pm line 130.                                               No such file or directory at inc/My/SVN/Builder.pm line 21.
  MSCHWERN/Alien-SVN-v1.8.11.0.tar.gz
./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:                                     reports MSCHWERN/Alien-SVN-v1.8.11.0.tar.gz

(I forgot to tee the output and had to copy/paste the above one screenful at a time; I hope I got it right, because I won't do THAT again any time soon. :-D )

This is how I get git svn running:

tar -xf /sdcard/Download/subversion-1.10.0.tar.bz2
cd subversion-1.10.0/
sed -i 's/-std=c90 $CFLAGS/$CFLAGS/' configure
(cd subversion/bindings/swig/perl/libsvn_swig_perl/; ln -s ../../proxy/swig_perl_external_runtime.swg)
CPPFLAGS=" -I$PREFIX/lib/perl5/5.26.2/aarch64-android/CORE" ./configure --prefix=$PREFIX/local --disable-static
make install-swig-pl
$ git svn
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /data/data/com.termux/files/usr/share/perl5 /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2/aarch64-android /data/data/com.termux/files/usr/lib/perl5/site_perl/5.26.2 /data/data/com.termux/files/usr/lib/perl5/5.26.2/aarch64-android /data/data/com.termux/files/usr/lib/perl5/5.26.2 .) at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.

$ PERL5LIB=$PREFIX/local/lib/perl5/site_perl/5.26.2/aarch64-android git svn
Can't load '/data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/auto/SVN/_Core/_Core.so' for module SVN::_Core: dlopen failed: library "libsvn_delta-1.so.0" not found at /data/data/com.termux/files/usr/lib/perl5/5.26.2/aarch64-android/DynaLoader.pm line 196.
 at /data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/SVN/Base.pm line 59.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/SVN/Core.pm line 5.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.

$ (cd $PREFIX/lib; for i in libsvn_*; do ln -s "$i" "$i".0; done)

$ PERL5LIB=$PREFIX/local/lib/perl5/site_perl/5.26.2/aarch64-android git svn
Can't load '/data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/auto/SVN/_Core/_Core.so' for module SVN::_Core: dlopen failed: library "libsvn_swig_perl-1.so.0" not found at /data/data/com.termux/files/usr/lib/perl5/5.26.2/aarch64-android/DynaLoader.pm line 196.
 at /data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/SVN/Base.pm line 59.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/local/lib/perl5/site_perl/5.26.2/aarch64-android/SVN/Core.pm line 5.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.
BEGIN failed--compilation aborted at /data/data/com.termux/files/usr/libexec/git-core/git-svn line 21.

$ PERL5LIB=$PREFIX/local/lib/perl5/site_perl/5.26.2/aarch64-android LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/local/lib git svn
git-svn - bidirectional operations between a single Subversion tree and git
usage: git svn <command> [options] [arguments]

...

GIT_SVN_ID may be set in the environment or via the --id/-i switch to an
arbitrary identifier if you're tracking multiple SVN branches/repositories in
one git repository and want to keep them separate.  See git-svn(1) for more
information.

The first time I have it built $PREFIX/local/lib/perl5/site_perl/5.26.2/aarch64-android/auto/SVN/*/*.so were not properly linked to libsvn_*.so and I need to LD_PRELOAD them. I think it was because I didn't have subversion installed. Later build works fine without the need of LD_PRELOAD.

Hello, I stumbled upon this page from The Google because I had the issue described in the opening post. I'm trying to convert a SVN repository to a git one on CentOS 7.

I 'fixed' this issue by installing the subversion-perl package.

yum install subeversion-perl

I'm not sure if it's relevant for me to post here as I'm not using Termux, but that might be a hint in fixing the issue, or help others solve theirs.

Using these versions:

[availlancourt@localhost ~]$ git --version
git version 2.18.0
[availlancourt@localhost ~]$ svn --version
svn, version 1.9.3 (r1718519)

No package subversion-perl available on Termux.

(FWIW, I solved my practical problem by using another system to do the conversion. But the issue for the Termux distribution persists.)

@DevSolar Thanks for the reply. Then should it be appropriate for me to remove my comments here?

@vaillancourt, I think I would actually leave your comment, as it suggests a possible approach to the problem to developers (to make a subversion-perl package.)

Thanks @vaillancourt ... not using Termux, but google got me to this page, and your solution worked for me!

sudo xcodebuild -license
xcode-select --install # There will be a GUI prompt
sudo cpan SVN::Core # use the "sudo" method when prompted

Then add this to your ~/.profile:

export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH

Then probably:

brew reinstall git
brew reinstall subversion

@multithreadke Your solution was for MacOS, not Termux.

For Ubuntu 18.10 this is sudo apt install libsvn-perl

Thank you so much @vaillancourt! No one else made it this easy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bkdwt picture bkdwt  路  3Comments

thurask picture thurask  路  3Comments

Cyb3rD3m0n picture Cyb3rD3m0n  路  3Comments

Wetitpig picture Wetitpig  路  3Comments

adit picture adit  路  3Comments