Recent

Author Topic: Copy Subversion to Big Sur from another Mac  (Read 2436 times)

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Copy Subversion to Big Sur from another Mac
« on: November 16, 2020, 09:27:33 am »
Hi,

It's offtopic, but can you help me copy Subversion from another Mac to Big Sur? I don't know what files should be copied.

Even on Intel Mac with Big Sur I can't install SVN. I tried new Macports adapted for Big Sur and it fails to compile dependencies for SVN, the same problem with Brew.

We use SVN in our work to synchronize the source code.

Thanks in advance for any advice!

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Copy Subversion to Big Sur from another Mac
« Reply #1 on: November 16, 2020, 09:37:38 am »
Pre-Xcode 11.4 command line tools include svn. I don't know what happens if you install them and then the later ones (ie whether the later ones remove svn or simply overwrite anything that already exists).

I did, once, copy svn files from a Mac mini to a VM running Catalina successfully - I don't recall the exact files. I copied the binary which then asked for the missing library files which I copied one by one until it stopped complaining. You could probably use otool  to list the needed libraries.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #2 on: November 16, 2020, 07:03:11 pm »
trev,

Thanks! I'll try again tomorrow.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #3 on: November 19, 2020, 12:53:36 pm »
trev,

I manually copied all svn binaries, dylibs and dependencies (openssl, lz4, apr, etc) from Intel Mac to Apple DTK on ARM.

Now I can get files from a server (svn up).

But I can't perform commit of local changes to a server:
Segmentation fault: 11

It seems that SVN doesn't work correctly.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Copy Subversion to Big Sur from another Mac
« Reply #4 on: November 19, 2020, 01:13:26 pm »
trev,

I manually copied all svn binaries, dylibs and dependencies (openssl, lz4, apr, etc) from Intel Mac to Apple DTK on ARM.

Now I can get files from a server (svn up).

But I can't perform commit of local changes to a server:
Segmentation fault: 11

It seems that SVN doesn't work correctly.

Uh, you need ARM binaries for that. You can't execute binaries built for x86 with ARM CPU. Unless there is a some sort of transpiler there.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Copy Subversion to Big Sur from another Mac
« Reply #5 on: November 19, 2020, 10:05:13 pm »
I manually copied all svn binaries, dylibs and dependencies (openssl, lz4, apr, etc) from Intel Mac to Apple DTK on ARM.

Now I can get files from a server (svn up).

But I can't perform commit of local changes to a server:
Segmentation fault: 11

I don't have access to an ARM system - my advice related to Intel, sorry.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #6 on: November 20, 2020, 08:29:15 am »
trev,

Do you know any alternate package with SVN which includes binary files? Probably something with GUI.

Cyrax,
macOS on ARM includes Rosetta 2 translator which automatically run x86-64 apps on ARM.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: Copy Subversion to Big Sur from another Mac
« Reply #7 on: November 20, 2020, 03:31:11 pm »
Uh, you need ARM binaries for that. You can't execute binaries built for x86 with ARM CPU. Unless there is a some sort of transpiler there.

As Igor Kokarev wrote macOS on ARM provides Rosetta 2 which allows to transparently run x86 applications on the ARM system (just like Windows on ARM64 allows the running of 32-bit x86 binaries).

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Copy Subversion to Big Sur from another Mac
« Reply #8 on: November 21, 2020, 03:05:24 am »
I've just built SVN for Arm64
If anyone is interested, you will find binaries at the end of the post.

Disclaimer: it's not an installer, so some command-line file copying will be needed. It's not a FAT binary, it will not work on Intel CPU. Binaries are not signed, you will have to "clear" them manually.

I was able to check out and commit to my GitHub repo (via svn). Which is good. (i.e. an old svn version on my MacOSX 10.6, refuses to deal with GitHub... actually it's vice versa, github doesn't like the old svn client)
« Last Edit: November 21, 2020, 03:20:53 am by skalogryz »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #9 on: November 21, 2020, 12:46:44 pm »
skalogryz,

Thank you very much for the compiled SVN for ARM64! I'll try it on Monday.

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #10 on: November 23, 2020, 12:44:36 pm »
skalogryz,

I got this error with SVN:

Code: Pascal  [Select][+][-]
  1. Igors-Mac:local mac$ svn
  2. dyld: Library not loaded: /Users/dmitry/FPC_Laz/svn/serf-1.3.9/libserf-1.dylib
  3.   Referenced from: /usr/local/bin/svn
  4.   Reason: image not found
  5. Abort trap: 6

Check dependencies for your svn binary to find other shared libraries:

otool -L /usr/local/bin/svn
« Last Edit: November 23, 2020, 02:11:33 pm by Igor Kokarev »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #11 on: November 24, 2020, 01:17:48 pm »
skalogryz,

I found a script to compile SVN on Apple Silicon. And it works for me, but this script doesn't include support of HTTP/HTTPS for SVN. If you could improve this script, it would be great:

Code: Pascal  [Select][+][-]
  1. #!/usr/bash
  2. #
  3. # use your own local mirror for the apache sources
  4. #
  5. curl -O https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
  6. curl -O https://mirrors.gigenet.com/apache/apr/apr-1.7.0.tar.gz
  7. curl -O https://mirrors.gigenet.com/apache/apr/apr-util-1.6.1.tar.gz
  8. curl -O https://mirrors.gigenet.com/apache/subversion/subversion-1.14.0.tar.gz
  9. tar xzf autoconf-2.69.tar.gz
  10. tar xzf apr-1.7.0.tar.gz
  11. tar xzf apr-util-1.6.1.tar.gz
  12. tar xzf subversion-1.14.0.tar.gz
  13. cd autoconf-2.69
  14. ./configure
  15. make
  16. sudo make install
  17. cd ..
  18. cd apr-1.7.0
  19. #
  20. # this patch courtesy of homebrew, and might not be appropriate for newer APRs
  21. #
  22. curl -O https://raw.githubusercontent.com/Homebrew/formula-patches/7e2246542543bbd3111a4ec29f801e6e4d538f88/apr/r1871981-macos11.patch
  23. patch -p0 -i r1871981-macos11.patch
  24. autoconf
  25. ./configure
  26. make
  27. sudo make install
  28. cd ..
  29. cd apr-util-1.6.1
  30. autoconf
  31. ./configure --with-apr=/usr/local/apr
  32. make
  33. sudo make install
  34. cd ..
  35. cd subversion-1.14.0
  36. autoconf
  37. ./configure --with-lz4=internal --with-utf8proc=internal
  38. make
  39. sudo make install
  40. cd ..

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Copy Subversion to Big Sur from another Mac
« Reply #12 on: November 25, 2020, 07:23:25 am »
This worked for me copying svn from Mojave to Big Sur (Intel) just now:

Code: Bash  [Select][+][-]
  1. cd /Applications/Xcode.app/Contents/Developer/usr/bin
  2. scp svn* <remote_destination>
  3. cd /Applications/Xcode.app/Contents/Developer/usr/lib
  4. scp libsvn_*.dylib <remote_destination>
  5. scp libserf*.dylib <remote_destination>

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 370
Re: Copy Subversion to Big Sur from another Mac
« Reply #13 on: November 25, 2020, 01:24:17 pm »
trev,

Thanks! Your solution works for me. Now I can run svn via Rosetta on Apple Silicon.

I modified your script. Because since Xcode 11.4 and higher SVN exists in Command Line Tools folder (Intel version only):

Code: Pascal  [Select][+][-]
  1. rm -rf svn_backup
  2. mkdir svn_backup
  3. cd svn_backup
  4. mkdir bin
  5. mkdir lib
  6. cd ..
  7. scp /Library/Developer/CommandLineTools/usr/bin/svn* svn_backup/bin
  8. scp /Library/Developer/CommandLineTools/usr/lib/libsvn_*.dylib svn_backup/lib
  9. scp /Library/Developer/CommandLineTools/usr/lib/libserf*.dylib svn_backup/lib

 

TinyPortal © 2005-2018