Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-svn no longer working after upgrade to Catalina 10.15.4 #52490

Closed
3 of 4 tasks
Joschka1 opened this issue Apr 3, 2020 · 128 comments
Closed
3 of 4 tasks

git-svn no longer working after upgrade to Catalina 10.15.4 #52490

Joschka1 opened this issue Apr 3, 2020 · 128 comments
Labels
outdated PR was locked due to age

Comments

@Joschka1
Copy link

Joschka1 commented Apr 3, 2020

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?

for svn formular: https://gist.github.com/627d85f2c1fc341b76f8f98f162331c8
for git formular: https://gist.github.com/0597eb212b85e92f35d8e35fc91d866a

  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
$brew doctor 
Your system is ready to brew.
$brew config
HOMEBREW_VERSION: 2.2.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: fa8fe0fc396550c23156043cd07550fc6ae6a27a
Last commit: 13 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6949fc6f36de1261dffbe37f3b2216cf903431ed
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GITHUB_API_TOKEN: set
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.4-x86_64
CLT: 11.4.0.0.1.1583798712
Xcode: 11.4
XQuartz: 2.7.11 => /opt/X11

What you were trying to do (and why)

Try to using git-svn to checkout and mange some svn repos with git

What happened (include command output)

git svn is no longer working. There are some problems with the perl bindings.

Command output

$ git svn rebase
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /usr/local/Cellar/git/2.26.0/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.26.0/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.26.0/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/Cellar/git/2.26.0/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.26.0/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /usr/local/Cellar/git/2.26.0/libexec/git-core/git-svn line 22.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.26.0/libexec/git-core/git-svn line 22.

What you expected to happen

That git svn rebase update my repository.

Step-by-step reproduction instructions (by running brew install commands)

Installed Git and SVN on Catalina 10.15.3

brew install svn
brew install git

git svn works fine.

Upgraded my system from Catalina 10.15.3 to Catalina 10.15.4 and git svn no longer works.
Reinstall git and svn don't solved the problem.

@SMillerDev
Copy link
Member

Please fill out the entire issue template, leaving all parts. They're needed to debug. This can be reopened once all the needed information is provided.

@Joschka1
Copy link
Author

Joschka1 commented Apr 6, 2020

I updated the post, sorry for that. Can you, @SMillerDev pleas reopen the issue?
I hope now there are all the informations you need.

Best,
Joschka

@SMillerDev SMillerDev reopened this Apr 6, 2020
@arichardson
Copy link
Contributor

arichardson commented Apr 8, 2020

I am also seeing the same issue. It appears that svn was removed from the CommandLineTools after the latest update and git-svn is not using the homebrew version of svn.

The following workaround works for me:
PERL5LIB=/usr/local/opt/subversion/lib/perl5/site_perl/5.30.1/darwin-thread-multi-2level/:$PERL5LIB /usr/local/bin/perl /usr/local/Cellar/git/2.26.0/libexec/git-core/git-svn rebase (obviously this will break once svn or git change version numbers)

/usr/local/Cellar/git/2.26.0/libexec/git-core/git-svn/usr/local/Cellar/git/2.26.0/libexec/git-core/git-svn has a hardcoded #!/usr/bin/perl so it will use the system packages instead of the homebrew ones

@Joschka1
Copy link
Author

Joschka1 commented Apr 9, 2020

The problem is, that the newest Xcode/ComandLineTools no longer supports SVN, but the brew git expect this and dosn`t work with the brew svn.

I found a quick fix at StackOverflow.
This solution works for me:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

@kumowoon1025
Copy link

How does that work, do you end up using the CLT git and svn if you do that? I had no idea "git svn ..." was this complicated till this update 😦

@stale
Copy link

stale bot commented May 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label May 9, 2020
@arichardson
Copy link
Contributor

This is still broken.

@stale stale bot removed the stale No recent activity label May 9, 2020
@pahjbo
Copy link

pahjbo commented May 12, 2020

It is indeed still a problem - I think that the above proposed workarounds are no-longer valid either with Xcode 11.4 and the associated comandline tools, subversion is definitely not in either package from Apple. Given that not everyone needs git and svn (or even git-svn) I propose that the solution is to do what the major distros have done and put git-svn into its own Formula - for me this would not be the whole solution however, as because of this gradual slowdown of support for subversion, other tooling that I use is not updating its subversion support as frequently as previously - just at the time that svn itself had gone to the crazy 6-month time based versioning. To avoid update hell, as git-svn depends on git, svn and perl, I think that it should depend on some explicitly versioned LTS versions of those tools.

@pahjbo
Copy link

pahjbo commented May 14, 2020

The problem cannot be solved by installing the brew subversion and brew git as they currently exist either - this is basically because of the /usr/local/Cellar/git/2.26.2/libexec/git-core/git-svn script not having a consistent set of perl and svn dependencies - there is a mixture between OS and brew dependencies. I am not sure of the best way to feed this back into the Git Formula directly as it would then require it to depend on subversion (which some people might find strange if they are not using git-svn) - Two changes need to be made to /usr/local/Cellar/git/2.26.2/libexec/git-core/git-svn

  1. the perl version needs to be the /usr/loca/bin/perl
  2. the include path needs to be changed to include where the subversion formula installs its perl modules.

I have manually edited mine (just to get something working quickly) so that the first few lines currently look like -ignore the exact versions (I have had to create my own subversion versioned formula in a local tap for other reasons), but replace with the version numbers that you have installed for each formula

#!/usr/local/bin/perl

use lib (split(/:/, $ENV{GITPERLLIB} || '/usr/local/Cellar/git/2.26.2/share/perl5:/usr/local/Cellar/subversion@1.11/1.11.1/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/'));
# Copyright (C) 2006, Eric Wong 

@pahjbo
Copy link

pahjbo commented May 14, 2020

Incidentally, if someone does have a go at updating the git and subversion Formulae to fix this, I would recommend removing the dependency that each has on brew perl and rely on the system perl - as otherwise there is an interdependency problem that means that when any one of the three is updated they all need to be updated, and I am not sure that homebrew has the ability to detect that.

@rmpel
Copy link

rmpel commented May 27, 2020

subscribed for future developments on this topic.
I'd like to note for others looking for this that in the 10.15.5 Catalina update with 11.5 developer tools, the command line to use is PERL5LIB=/usr/local/opt/subversion/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/:$PERL5LIB /usr/local/bin/perl /usr/local/Cellar/git/2.26.2_1/libexec/git-core/git-svn which is absolutely ugly.
I have tried installing the missing library (as stated by git svn) SVN::Core, using cpan, but that only resulted in git crashing with a non-descript "error 11". I have to assume this is because of version discrepancies but without a way to debug this, it really ends with guessing :(

searches on the web showed me that once there was an option "--with-brewed-svn" for installing git and "--with-perl" for installing subversion. I would assume that using these options would have solved the problem, but neither formulae of git and subversion have these options anymore.

@stale
Copy link

stale bot commented Jun 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label Jun 17, 2020
@Joschka1
Copy link
Author

The problem still exists.

@stale stale bot removed the stale No recent activity label Jun 17, 2020
@gilesorr
Copy link

I'm seeing the same problems (macOS Catalina 10.15.5, latest brew updates as of today). 'cpan' fails to build "SVN::Core" for lack of APR-related stuff (I didn't dig in, because third-party dependencies like this strike me as a losing battle).

For the moment it looks like I'll be using a local Fedora box for my 'git-svn' needs, which is ... less than ideal.

As mentioned previously in this thread, probably the best fix is to separate out 'git-svn' as its own formula (and sort out the dependencies) as is done on Fedora: 'git-svn' isn't part of the 'git' default install. Which makes sense when you think of packages like 'git-extras' and the reality that not a lot of people need 'git-svn'. Apologies for telling the Homebrew folks what to do and not doing it myself ... I've never dug into Homebrew's build system ...

@Hao-Wu
Copy link

Hao-Wu commented Jun 23, 2020

The problem is, that the newest Xcode/ComandLineTools no longer supports SVN, but the brew git expect this and dosn`t work with the brew svn.

I found a quick fix at StackOverflow.
This solution works for me:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

This work around doesn't work on MacOS from 10.15.4+. Reinstallation of xcode command line tool doesn't bring in SVN packages.

@themadsens
Copy link

For Catalina, the fix described above by pahjbo worked for me. YMMV.

@rmpel
Copy link

rmpel commented Jun 23, 2020

This work around doesn't work on MacOS from 10.15.4+. Reinstallation of xcode command line tool doesn't bring in SVN packages.

Correct; the problem is that the newest CLI tools don't include SVN related stuff anymore. But you CAN downgrade (at least, currently, but who knows for how long). you will need Command Line Tools version 11.3.1. It is available through developer.apple.com (and I got a copy of it on my blog, but I am unsure if I am allowed to link it here)

@wxiaoguang
Copy link

#52490 (comment)

pahjbo's solution is correct, macOS 10.15

@johnbillion
Copy link

johnbillion commented Jun 26, 2020

I have git version 2.21.1 and svn version 1.10.4 installed on macOS 10.15.5, and I can confirm that downloading and installing Command Line Tools 11.3.1 from the developer.apple.com site fixed git svn for me (thanks @rmpel). Unfortunately you have to agree to a load of EULA fluff from Apple to get there.

@objczl
Copy link

objczl commented Jul 14, 2020

I have a simple fixed solution on macOS 10.15.5

  1. make sure install git, svn, perl with brew
brew install git
brew install perl
brew install subversion
  1. edit /usr/local/Cellar/git/2.27.0/libexec/git-core/git-svn

replace #!/usr/bin/perl with #!/usr/local/bin/perl

  1. git svn works

The above solution only works under perl 5.32.0, when I update the perl to 5.32.1. There is a new issue, I had tried to install cpan SVN::Core, but it didn't work.

Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module)  ...

Now, I have to downgrade the perl to 5.32.0 to make git-svn works. but the vim depends on perl latest version, I have to downgrade vim to 8.2.2375 too.

@smbneuro5
Copy link

Hi - when I try to use the solution @pahjbo posted:

use lib (split(/:/, $ENV{GITPERLLIB} || “/usr/local/Cellar/git/2.27.0/share/perl5:/usr/local/Cellar/subversion@1.11/1.11.1/lib/perl5/site_perl/5.30.0/darwin-thread-multi-2level/“))

I get the following error:

-bash: syntax error near unexpected token `('

Any idea what I might be missing? I am new to all of this, so apologies if there is an obvious answer!

@rmpel
Copy link

rmpel commented Jul 18, 2020

@objczl an elegant and logical solution. Will try that very soon.
I was wondering; would it not be best to use #! /usr/bin/env perl ? Which should use brew perl if it is installed and system perl if not, right?

@dwt
Copy link
Contributor

dwt commented Jul 31, 2020

In the meantime, I've put this script into ~/bin/git-svn as a workaround:

#!/bin/sh -x

# TODO remove as soon as https://github.com/Homebrew/homebrew-core/issues/52490 is resolved

PERL_VERSION=$(brew info --json perl |jq -r '.[0].installed | .[0].version')
export PERL5LIB=$(brew --prefix)/opt/subversion/lib/perl5/site_perl/$PERL_VERSION/darwin-thread-multi-2level/:$PERL5LIB
GIT_VERSION=$(brew info --json git |jq -r '.[0].installed | .[0].version')

$(which perl) $(brew --cellar)/git/$GIT_VERSION/libexec/git-core/git-svn $*

This allows me to invoke git-svn fetch and other git-svn commands I need.

This builds on the previously posted solutions. Thanks for those!
(Update, fix subcommand invocation)

@Schroedingers-Cat
Copy link

@gromgit any idea how to get git-svn working on an M1 MacBook?

@gromgit
Copy link
Member

gromgit commented Sep 2, 2021

Sorry, been busy and don't have an M1 box. That said:

MBP-M1 ~ % /usr/local/bin/brew config
HOMEBREW_VERSION: 3.2.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: d14fc2db125c18832fe83c98fdeb54931dc48f03
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 122a14f0a715638f08a398be1469bc5bd9b7158b
Core tap last commit: 87 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 12.0.5 build 1205
Git: 2.30.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.5.2-arm64
CLT: 12.5.0.22.9
Xcode: 12.5.1
Rosetta 2: false

That last line is troubling. IIRC, Rosetta should be enabled for /usr/local/bin/brew. Perhaps it didn't install at all? Try running the following (source: https://derflounder.wordpress.com/2020/11/17/installing-rosetta-2-on-apple-silicon-macs/):

if /usr/bin/pgrep oahd >/dev/null 2>&1; then
    echo "Rosetta is already installed and running. Nothing to do."
else
    /usr/sbin/softwareupdate –install-rosetta –agree-to-license
   
    if [[ $? -eq 0 ]]; then
    	echo "Rosetta has been successfully installed."
    else
    	echo "Rosetta installation failed!"
    fi
fi

@hoserama99
Copy link

hoserama99 commented Sep 2, 2021

FWIW, I have brew installed as both Rosetta and native. My /usr/local/bin/brew config also says Rosetta 2 is false, and that's just wrong. I think it's an error in how it's detecting Rosetta 2, at least in some configs.

Not that it matters, but I used pkgutil --files com.apple.pkg.RosettaUpdateAuto to detect if it was installed from the Terminal (even though I'm certain it is) and that gives me the list of files installed in /Library/Apple/usr/* (and they are there!)

@Schroedingers-Cat
Copy link

[...] but I used pkgutil --files com.apple.pkg.RosettaUpdateAuto to detect if it was installed from the Terminal (even though I'm certain it is) and that gives me the list of files installed in /Library/Apple/usr/* (and they are there!)

I think I've used Rosetta before on my laptop and it seems to be there already:

pkgutil --files com.apple.pkg.RosettaUpdateAuto
Library
Library/Apple
Library/Apple/usr
Library/Apple/usr/lib
Library/Apple/usr/lib/libRosettaAot.dylib
Library/Apple/usr/libexec
Library/Apple/usr/libexec/oah
Library/Apple/usr/libexec/oah/debugserver
Library/Apple/usr/libexec/oah/libRosettaRuntime
Library/Apple/usr/libexec/oah/runtime
Library/Apple/usr/libexec/oah/translate_tool
Library/Apple/usr/share
Library/Apple/usr/share/rosetta
Library/Apple/usr/share/rosetta/rosetta

Reading from the subversion brew page, I should get the perl bindings installed into:

The perl bindings are located in various subdirectories of:
$(brew --prefix)/opt/subversion/lib/perl5

That doesn't happen over here:

ls $(brew --prefix)/opt/subversion/lib/perl5
ls: /opt/homebrew/opt/subversion/lib/perl5: No such file or directory

However, the parent directory does exist, it just doesn't contain the perl5 directory:

ls $(brew --prefix)/opt/subversion/lib
libsvn_client-1.0.dylib libsvn_fs-1.dylib libsvn_ra-1.a libsvn_repos-1.0.dylib libsvn_wc-1.dylib [...]

Maybe part of the problem is that some files necessary to run git-svn on M1 are installed into the wrong places and we have to find out where those files went?

@jbyauk
Copy link
Contributor

jbyauk commented Sep 17, 2021

Reading from the subversion brew page, I should get the perl bindings installed into:

The perl bindings are located in various subdirectories of:
$(brew --prefix)/opt/subversion/lib/perl5

That doesn't happen over here:

ls $(brew --prefix)/opt/subversion/lib/perl5
ls: /opt/homebrew/opt/subversion/lib/perl5: No such file or directory

However, the parent directory does exist, it just doesn't contain the perl5 directory:

ls $(brew --prefix)/opt/subversion/lib
libsvn_client-1.0.dylib libsvn_fs-1.dylib libsvn_ra-1.a libsvn_repos-1.0.dylib libsvn_wc-1.dylib [...]

Maybe part of the problem is that some files necessary to run git-svn on M1 are installed into the wrong places and we have to find out where those files went?

I've been banging my head against the wall recently trying to figure this out, and I think I found the cause of the missing perl bindings-- the subversion formula only installs them on Intel machines: #67531

I'm currently checking what happens when you install the formula after removing those guardrails. I imagine I'll start seeing the issue that the pull request was made to fix.

jbyauk added a commit to jbyauk/homebrew-core that referenced this issue Sep 19, 2021
Perl bindings were removed from subversion on Apple Silicon machines
in Homebrew#67531 due to test failures.  However, the bindings being missing
prevents other things that depend on them, such as git-svn, from working
properly on this architecture (see some of the comments on Homebrew#52490).  The
tests have been updated since that PR, so it appears to be safe to add
the bindings back now without reintroducing the failures.
BrewTestBot pushed a commit that referenced this issue Sep 19, 2021
Perl bindings were removed from subversion on Apple Silicon machines
in #67531 due to test failures.  However, the bindings being missing
prevents other things that depend on them, such as git-svn, from working
properly on this architecture (see some of the comments on #52490).  The
tests have been updated since that PR, so it appears to be safe to add
the bindings back now without reintroducing the failures.

Closes #85418.

Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@jbyauk
Copy link
Contributor

jbyauk commented Sep 19, 2021

Alright, with #85418 perl bindings should be installed now when building subversion from source on Apple Silicon machines. With this fix, the PERL5LIB/GITPERLLIB workaround should be usable on them.

@Schroedingers-Cat
Copy link

Schroedingers-Cat commented Sep 20, 2021

@jbyauk thanks a lot for the fix!

It's still not working over here, though. On my M1 machine, I installed the current version of git and subversion via brew.
The perl5 bindings are in /opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/. So added the following line to the .zshenv and .bashrc files: export GITPERLLIB="/usr/local/opt/git/share/perl5:$(echo /opt/homebrew/Cellar/subversion/*/lib/perl5/site_perl/*/darwin-thread-multi-2level):$(echo /opt/homebrew/Cellar/git/*/share/perl5)"

When running ´git-svn´, I get the following error:

Can't load '/opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle' for module SVN::_Core: dlopen(/opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle, 1): no suitable image found.  Did find:
	/opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle: mach-o, but wrong architecture
	/opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle: mach-o, but wrong architecture at /System/Library/Perl/5.30/darwin-thread-multi-2level/DynaLoader.pm line 197.
 at /opt/homebrew/Cellar/subversion/1.14.1_4/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level/SVN/Base.pm line 59.

Any idea what I'm missing?

EDIT: The issue only happens when the terminal process is intel-based/rosetta. I wasn't aware of that. A native/Apple Silicon terminal will work with the above GITPERLLIB variable.

@jbyauk
Copy link
Contributor

jbyauk commented Sep 20, 2021

So added the following line to the .zshenv and .bashrc files: export GITPERLLIB="/usr/local/opt/git/share/perl5:$(echo /opt/homebrew/Cellar/subversion/*/lib/perl5/site_perl/*/darwin-thread-multi-2level):$(echo /opt/homebrew/Cellar/git/*/share/perl5)"

/usr/local/opt/git/share/perl5 is for git installed with Rosetta, I believe. Do you have an /opt/homebrew/opt/git/share/perl5 that you can drop in instead?

If you have git and subversion installed via brew running natively (no Rosetta), then the paths should all be "/opt/homebrew/...".
If you have git and subversion installed via brew running under Rosetta, then the paths should all be "/usr/local/...".
If you might have both installed, you can double-check which are ones are being used at runtime with which git svn.

@Schroedingers-Cat
Copy link

@jbyauk I see. In fact, ´/usr/local/opt/git/share/perl5´ didn't exist on my machine but /opt/homebrew/opt/git/share/perl5. I also didn't realize that the GUI I'm using (SourceTree) was spawning an Intel-based terminal process, so the error is probably due to Rosetta having to load a native library.

With a native/Apple Silicon based terminal, git-svn works either with the GITPERLLIB path from my previous post (which doesn't exist on my system) or with your suggested path (which does exist).

What do I have to do to get git-svn working for GUIs and terminal sessions running under Rosetta?

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Oct 13, 2021
@cappert
Copy link

cappert commented Oct 13, 2021

up, the problem still happens on Big Sur, a year and a half later:

% git svn
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /opt/homebrew/Cellar/git/2.33.1/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.30/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.30/darwin-thread-multi-2level /Library/Perl/5.30/darwin-thread-multi-2level /Library/Perl/5.30 /Network/Library/Perl/5.30/darwin-thread-multi-2level /Network/Library/Perl/5.30 /Library/Perl/Updates/5.30.2 /System/Library/Perl/5.30/darwin-thread-multi-2level /System/Library/Perl/5.30 /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level /System/Library/Perl/Extras/5.30) at /opt/homebrew/Cellar/git/2.33.1/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /opt/homebrew/Cellar/git/2.33.1/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /opt/homebrew/Cellar/git/2.33.1/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /opt/homebrew/Cellar/git/2.33.1/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /opt/homebrew/Cellar/git/2.33.1/libexec/git-core/git-svn line 23.
BEGIN failed--compilation aborted at /opt/homebrew/Cellar/git/2.33.1/libexec/git-core/git-svn line 23.
% brew info git subversion
git: stable 2.33.1 (bottled), HEAD
Distributed revision control system
https://git-scm.com
/opt/homebrew/Cellar/git/2.33.1 (1,513 files, 42.7MB) *
  Poured from bottle on 2021-10-13 at 15:20:09
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb
License: GPL-2.0-only
==> Dependencies
Required: gettext ✔, pcre2 ✔
subversion: stable 1.14.1 (bottled), HEAD
Version control system designed to be a better CVS
https://subversion.apache.org/
/opt/homebrew/Cellar/subversion/1.14.1_4 (234 files, 33.8MB) *
  Poured from bottle on 2021-10-13 at 15:59:59
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/subversion.rb
License: Apache-2.0
==> Dependencies
Build: openjdk ✘, pkg-config ✔, python@3.9 ✔, scons ✘, swig ✘
Required: apr ✔, apr-util ✔, gettext ✔, lz4 ✔, openssl@1.1 ✔, utf8proc ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
svntools have been installed to:
  /opt/homebrew/opt/subversion/libexec

The perl bindings are located in various subdirectories of:
  /opt/homebrew/opt/subversion/lib/perl5

You may need to link the Java bindings into the Java Extensions folder:
  sudo mkdir -p /Library/Java/Extensions
  sudo ln -s /opt/homebrew/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

On Mac M1 but it shouldn't matter.

@github-actions github-actions bot removed the stale No recent activity label Oct 13, 2021
@mr-salty
Copy link

FWIW, it still breaks for me when I upgrade (as it just did), but for the last few times all I've had to do to fix it is sudo vi /usr/local/Cellar/git/*/libexec/git-core/git-svn and add local to the first line: #!/usr/local/bin/perl

I have export GITPERLLIB="/usr/local/opt/git/share/perl5:$(echo /usr/local/opt/subversion/lib/perl5/site_perl/*/darwin-thread-multi-2level)" and I also built svn from source: #52490 (comment)

@iMichka
Copy link
Member

iMichka commented Oct 23, 2021

We have now a separate git-svn formula that can now be used. Thanks all for your patience, and thanks to all of you who tested this and/or wrote code to fix this.

@iMichka iMichka closed this as completed Oct 23, 2021
@mr-salty
Copy link

mr-salty commented Nov 9, 2021

FYI, in case anyone else has trouble with the new formula, I had to undo some stuff I had tried earlier:

To install the new formula: brew install git-svn

First, it was crashing (SEGV) until I unset unset GITPERLLIB (and removed it from my shell startup).

Then I was getting errors about not finding SVN::Core. I'm not sure if that was only because I had previously done brew install subversion --HEAD.

In any case, my first solution was just brew unlink subversion; brew install subversion which did work but moved me back to the released version. But, I couldn't recall why I was running HEAD in the first place, so I decided to back to that:

brew unlink svn
brew link svn --HEAD
brew reinstall svn

@cdlm
Copy link
Contributor

cdlm commented Nov 16, 2021

Still no cake, subversion fails to build here, but due to an incorrect -rpath option to ld: https://gist.github.com/cdlm/0341a0d66620e5299cdd1b2bc07ab439
This smells like a different issue altogether but I don't understand enough to confirm…

@Bo98
Copy link
Member

Bo98 commented Nov 16, 2021

That will indeed be an entirely separate issue. It's probably a scons issue but we have been unable to reproduce the issue.

@cabo
Copy link
Contributor

cabo commented Nov 16, 2021

Still no cake, subversion fails to build here, but due to an incorrect -rpath option to ld: https://gist.github.com/cdlm/0341a0d66620e5299cdd1b2bc07ab439
This smells like a different issue altogether but I don't understand enough to confirm…

If it consoles you, I have the same problem (malformed rpath option in building libserf) on one of my systems.

@cdlm
Copy link
Contributor

cdlm commented Nov 16, 2021

At least it's reassuring that I'm not alone 😁
I'll post my logs as another issue then… I'm pretty sure I didn't see an existing one, even though @Bo98 seems to know about the problem?

@github-actions github-actions bot added the outdated PR was locked due to age label Dec 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet