GIT-SVN Issue on Mac - perl

I am in the process of getting git-svn working on my Mac. I am currently on Lion (but I had similar results when testing on Snow Leopard. I seem to be one of the few people having this issue. This is different from the issue I see that some people had with just including SVN/Core.pm.
Below is an attempt to do a git svn clone on a vanille repository (obviously the host and directory details have been changed for posting):
Macbook-Pro:git david$ git svn clone https://somesite.com/SVN/someRepo/
Initialized empty Git repository in /Projects/git/MyWorkspace/.git/
Can't load '/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle' for module SVN::_Core: dlopen(/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle, 1): Library not loaded: /usr/lib/libsvn_client-1.0.dylib
Referenced from: /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle
Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204.
at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Base.pm line 59
BEGIN failed--compilation aborted at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Core.pm line 5.
Compilation failed in require at /Developer/usr/libexec/git-core/git-svn line 58.

In my case, simply installing git via Macports solved my problem. I believe this problem was probably caused by older installs (maybe the Mac OS X Git Installer). If you are in this scenario, first install Macports:
http://www.macports.org/install.php
Then, once Macports is installed (with the correct version for your OS), then run:
sudo port install git-core +svn
After this, I just had to use the git at the new location installed by Macports:
/opt/local/bin/git
I modified my PATH variable so that this was the git used by default.

I took a slightly-different approach to this problem (as I am running a beta of XCode 4.2 as well):
Install the Collabnet Subversion package. I downloaded the OSX 10.7 version as I am running Lion on my Mac.
Create a symlink of all /opt/subversion/libsvn_* files in /usr/lib/

I spent a copious amount of time trying to get this fixed. None of the approaches above helped. What really fixed the issue was to remove the following line from my ~/.zshrc (.bash_profile, if you use bash.)
export VERSIONER_PERL_PREFER_32_BIT=yes;

Related

How do I install the hg-git plugin on Debian Stretch?

Debian Jessie, as well as sid, have a mercurial-git package which contains the hg-git plugin. However, this package was (auto-)removed from Debian Stretch to to a release-critical bug.
But - I need it installed and running. Surely this should be possible, right?
Well, I followed the installation instructions on the plugin page:
I ran apt-get install python-setuptools python-setuptools-git python4-setuptools python3-setuptools-git
I ran easy_install hg-git and it seemed to work
But still, when I run various mercurial operations I get, as the first line, the error message:
*** failed to import extension hgext.git: No module named git
(regardless of whether I'm doing anything git-related or not.)
My questions:
Why is this happening?
What do I need to do in order to make the error message go away while having hggit working?
Now,
How do I correctly install dulwich to get hg-git working on Windows?
Apparently, that critical bug doesn't manifest always (and perhaps only under very specific circumstances), so you can try installing the Debian sid version of the mercurial-git package (that is, version 0.8.11-1 at the time of writing). There's a SuperUser question about how to do this:
https://linuxaria.com/howto/how-to-install-a-single-package-from-debian-sid-or-debian-testing
my personal opinion in this case is to simply install the .deb file, which you can get from here (it's not platform-specific; at the link you'll need to choose a mirror.) That makes the error message go away, at least assuming you have:
[extensions]
hgext.bookmarks =
hggit =
in your ~/.hgrc file.

meld - gi._glib.GError: Icon 'meld-change-apply-right' not present in theme. What is wrong with the installation?

I have managed to install the meld 3.14.2 and all the dependency packages, by compiling each package from source and all are installed on a NFS share with --prefix=<base>/meldfor the meld tool && --prefix=<base>/meld/deps for the dependencies.
Finally, I invoked the tool and I can see the GUI. But when I try to do some functionality testing, it throws me errors. I have never used the tool. So, I don't know how it is supposed to work exactly. But users have pointed out the following error, and there can be many other errors too I guess. But the following is one of it.
$meld
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
II 1
Traceback (most recent call last):
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/newdifftab.py", line 117, in on_button_compare_clicked
tab = self.diff_methods[self.diff_type](compare_paths)
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/meldwindow.py", line 647, in append_filediff
doc = filediff.FileDiff(len(files))
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/filediff.py", line 281, in __init__
from meld.gutterrendererchunk import GutterRendererChunkAction
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 33, in <module>
class GutterRendererChunkAction(GtkSource.GutterRendererPixbuf):
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 38, in GutterRendererChunkAction
MODE_REPLACE: load("meld-change-apply-right"),
File "/applics/platform/meld/meld-3.14.2/lib/python2.7/site-packages/meld/gutterrendererchunk.py", line 30, in load
return icon_theme.load_icon(icon_name, LINE_HEIGHT, 0)
File "/applics/platform/meld/meld-3.14.2/dependencies/lib/python2.7/site-packages/gi/types.py", line 113, in function
return info.invoke(*args, **kwargs)
gi._glib.GError: Icon 'meld-change-apply-right' not present in theme
Please tell me what could be wrong?
The following variables I have used throughout the installation and while using the tool.
PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH, PYTHONPATH, GSETTINGS_SCHEMA_DIR
The reason for using all these paths is it is completely customized installation, as there were already existing GTK etc versions running on the servers and we don't want to disturb them and want a separate setup for meld, and also in a way that the same installation shared on NFS can be used from multiple servers.
But, unlike the other tools that we usually install, meld has very serious dependencies and we need to compile complex packages like GTK.
Anyhow, can any one tell us what's the wrong with the current installation? And do I need to set more variables and references or do I need to install the modules again with extra options? Now, I have only installed recommended dependencies for each package and left optional package dependencies.
And coming to the error, I can find the png file in my installation <base>/meld/share/icons/hicolor/16x16/actions/meld-change-apply-right.png, then why the tool is unable to find it? What is theme means here?
I was actually quite proud of myself after seeing the window, but now it seems it's just an empty window with zero functionality :(
I got that error as well, and
Reinstalling meld & gnome-icon-theme fixed my problem:
sudo apt-get install --reinstall meld gnome-icon-theme
without the --reinstall, I'm only getting the following for my Ubuntu 18.04.1 LTS:
$ sudo apt-get install meld gnome-icon-theme
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnome-icon-theme is already the newest version (3.12.0-3).
meld is already the newest version (3.18.0-6).
I solved on Ubuntu 16.04 with
sudo apt-get install gnome-icon-theme
I had a similar problem running Meld 3.16.0 on Archlinux. In my case the specific error message was GLib.Error: gtk-icon-theme-error-quark: Icon 'meld-change-apply-right' not present in theme gnome (0).
I "fixed" it by creating symbolic links from the directory the Meld icons were installed in to the place Meld is apparently looking for these icons. In my case that that meant ln -s /usr/share/icons/hicolor/16x16/actions/meld* /usr/share/icons/gnome/16x16/actions/.
I consider this a work around rather than a real solution, but at least Meld is working correctly now.
I solved reinstalling meld
$ sudo apt-get install meld
(a new version was available in debian stretch). Issue disappeared.
Reinstalling solved the problem in my case as well on CentOs 7.
sudo yum remove meld
sudo yum install meld

Can't run cloned repository

How do I download my old code from github? I made a mistake on my app, and when I try to download the old zip file from github and run it I get an error.
I think I'm doing it right, don't I just need to clone the repository? When I do, i get this error when I try to run the server:
An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.
and when I run bundel install I still get the error.
I also get this error:
bundle install doesn't work and I still get the error along with this one:Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
It ssems to me that you do not have install Postgres. Install it and try bundle install again.
How install Postgres on Ubuntu (of course you can have another system :) ) - https://help.ubuntu.com/community/PostgreSQL
If you have installed Mavericks, that is the source of your problem. I had to install another gem with native dependencies that needed to be compiled after I installed Mavericks, and some changes as to which compiler Mavericks uses to compile gem dependencies creates problems. In your case, I would suggest you pick one of the solutions in this answer to resolve your PG installation problems.

Symbol not found: _PQbackendPID with Django project

Running on MAC os 10.6.8
with postgresSQL installed, as well django - using python2.7
Also installed psycopg2 and dj-database-url using pip in my virtual env
And added these two lines to my setting.py:
import dj_database_url
DATABASES = {'default': dj_database_url.config(default='postgres://localhost')}
Based on instructions for Heroku in:
https://devcenter.heroku.com/articles/django#database_settings
When running:
python manage.py runserver
I am getting this error:
ImportError: dlopen(/Users.... venv/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID
Referenced from: /Users.... venv/lib/python2.7/site-packages/psycopg2/_psycopg.so
Expected in: dynamic lookup
I kept searching for hours and tried all kind of thing including the advice on:
Mac OS X Lion Psycopg2: Symbol not found: _PQbackendPID
to no avail.
Wonder if anyone had such an issue and had any luck.
I had the same problem. Instead of installing the dependencies as Heroku suggests using
pip install Django psycopg2 dj-database-url
clone whatever repo you're hoping to run in venv, keeping its original settings.py. Then:
source venv/bin/activate
to activate the new environment, cd into your new repo, and python manage.py runserver. Should be set.
Alternatively, you could remake PostGreSQL, and run again, but that's a bit more of a task - it would work for psycopg2, though. As far as I can tell that issue comes from using an 64 or i386 build when you should be using a 32 build - but I'm not sure about this, and the above solution works well to solve the problem and use venv for what you're actually going to be using it for, most likely.
I had the same problem as you guys and I had read many pages and I couldn't find the answer in any of them. Many solution was about installing from source file and don't relate to the virtual environment.
I've found and tested following solution and it solve my problem.
1- Make sure your Postgres is NOT higher than 9.4 version according to psycopg2. Check python version as well. I use Postgres 3.9.9.
2- The problem is behind different version of Python(32/64 bit). It should comply with your operation system's bit architecture which is 64bit. Uninstall all versions of Python and pip from your system. Instruction you can find here but do NOT remove Python2.7 which is Apple-supplied system Python.
3- Install "Mac OS X 64-bit/32-bit" installer from python official website and install it.
After that install pip. Note that you should use the command "python3.5" for using Python version 3.5. You might install virtualenv from the new pip as well.
4- After all that you can go on your virtualenv and type "pip3 install -r requirement.txt" for installing all dependencies on your local machine.
Hope this can help you.

How do I fix JavaHL (JNI) Not available after I have changed the logon password on my Mac?

I have installed Eclipse 3.5.2 and the plugin Subversion JavaHL Native Library Adapter 1.6.9.2 and this worked without any problems. However, this morning I was forced to change the password to logon to my Mac and since then I get the message that "Subversion native library not available" when I try to save any changes. Can anyone help? I have tried to add this line (-Djava.library.path=/usr/lib/jni) to the eclipse.ini file but this didnĀ“t seem to make any difference.
Can anyone help?
Install MacPorts or HomeBrew, then run the following command:
For MacPorts, the commands to run are:
sudo port install subversion-javahlbindings +no_bdb +universal
For HomeBrew, the command is:
brew install --universal --java subversion
I was having a similar problem on Mac OS X Snow Leopard. I suspect your libraries are there but just need permissions changed, whereas I didn't have the libs at all.
The directory to check is /opt/subversion/lib, see if it has any libsvnjavahl files. In your case they may be there and just need new permissions.
To get the files I followed the the instructions they give for installing JavaHL on OS X, which is to download and install Open CollabNet. (login required, although it's free)
Then you just need to update your environment variable in .profile, something like:
export PATH=.:/opt/subversion/bin:$HOME/bin:$PATH
Then ran:
. .profile
Then I tested with javahltests.jar as mentioned here.
The easiest thing to do is download and install the OSX package that is provided on openCollabNet.
MacPorts also provides an easy Subversion and JavaHL package, however on Snow Leopard ?MacPorts is still compiling these packages as simple 32-bit binaries. If you use the default Snow Leopard JVM which is 64-bit you will get an error...
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
/opt/local/lib/libsvnjavahl-1.0.0.0.dylib: no suitable image found. Did find: /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o, but wrong architecture
Note the error about wrong architecture. This is because the 64-bit JVM cannot load a 32-bit native library. The ?CollabNet binaries for OSX do not have this problem because they include both 32-bit and 64-bit versions.
Source: subclipse.tigris.org
Here is a blog entry that gives a solution:
http://blog.mattwoodward.com/getting-rid-of-subversion-native-library-not
I don't know whether this will work in your particular situation, but it's worth a try.
(Edited to fix link that became broken after I posted. The link became broken sometime between May 3 and June 1.)
In case you already have subversion installed I'd recommend performing first a brew uninstall and then the install again. And follow the steps to create the links indicated after the install concludes. This worked for me. Regards
I fixed it installing the SVNKit Client Adapter (not required) package.