Bazaar Explorer Not Working With El Capitan

Bug #1520736 reported by Connectronica
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar Mac Installers
Confirmed
Critical
Unassigned

Bug Description

After upgrading to El Capitan, Bazaar Explorer has ceased working. Changed python to Python2.6 already. Getting following message:

bzr: ERROR: exceptions.ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  Reason: unsafe use of relative rpath QtCore.framework/Versions/4/QtCore in /Library/Python/2.6/site-packages/PyQt4/QtCore.so with restricted binary

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/explorer/lib/commands.py", line 144, in run
    from bzrlib.plugins.qbzr.lib import uifactory
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/qbzr/lib/uifactory.py", line 21, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  Reason: unsafe use of relative rpath QtCore.framework/Versions/4/QtCore in /Library/Python/2.6/site-packages/PyQt4/QtCore.so with restricted binary

bzr 2.6.0 on python 2.6.9 (Darwin-15.0.0-x86_64-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'explorer']
plugins: bash_completion[2.6.0], bzrtools[2.5.0], changelog_merge[2.6.0],
    colo[0.4.0], email[unknown], explorer[1.3.0], fastimport[0.14.0dev],
    git[0.6.11], grep[2.6.0], keychain[0.1.0], launchpad[2.6.0], loom[2.2.0],
    netrc_credential_store[2.6.0], news_merge[2.6.0], pipeline[1.4.0],
    po_merge[2.6.0], qbzr[0.23.1], rewrite[0.6.3], svn[1.2.2], upload[1.1.0],
    weave_fmt[2.6.0], xmloutput[0.8.8]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Tags: easy
Revision history for this message
Vincent Ladeuil (vila) wrote :

A new release of the mac installers would be necessary to address that.
I don't have a mac running El Capitan to investigate but I guess there is still a python 2 version available (2.7 ?) which should be used.

affects: bzr → bzr-mac-installers
Changed in bzr-mac-installers:
status: New → Confirmed
Revision history for this message
Connectronica (ainel-cuevas) wrote :

Yes. It uses python 2.7. I tried editing the file /usr/local/bin/bzr (with sudo) first line #!/usr/bin/python to #!/usr/bin/python2.6, which has been the fix in the past, from Lion to Yosemite, but it doesn't work, and apparently, not permitted anymore.

A colleague informed me that Apple implemented rootless, or SIP (https://en.wikipedia.org/wiki/System_Integrity_Protection), which may be the reason for the app no longer working. It was suggested that I completely disable SIP requiring advanced tech knowledge, at my own risk, and with no guarantee that it'll work.

However, I don't want to lessen security if it's not necessary. Any help would be greatly appreciated. I'll keep a lookout for the new installers.

Revision history for this message
Steffen (archdruidardanos) wrote :

Hi all,

it is my first post here and i'm wondering if there is a solution for the above error ? due to it seem bzr (cli) is working properly but only the bzr explorer is freaking up when mac os x 10.11.2 (El Capitan) is installed.

And as far as i understand that matter it is only due to a wrong place link to the QT Lib.

I found a reference in another forum which indicates to create a symlink to /usr/local/bin for the QTlib but that have not work properly for me.

may that hint will help somewhat to get this fix asap - due to bazaar seemed to be the source control i was looking for but the first impression is a little bit darkened at them moment due to this.

regards
Steffen

Revision history for this message
Vincent Ladeuil (vila) wrote :

This should be an easy fix for someone having access to an osx El Capitain host: building a new installer has always been relatively easy from osx.

https://bazaar.launchpad.net/~bzr-mac/bzr-mac-installers/trunk/view/head:/README says it all, download (download.py), build (build.py) and sign the installer with gpgp.

Any taker ?

Changed in bzr-mac-installers:
importance: Undecided → Critical
tags: added: easy
Revision history for this message
Andrew Johnson (anj) wrote :

I tried building this, but it will need some changes to the code for El Capitan. The download script seemed to run fine, but then:

woz$ python2.6 build.py
Traceback (most recent call last):
  File "build.py", line 24, in <module>
    class Builder(object):
  File "build.py", line 37, in Builder
    raise Exception("Unknown version of Mac OS X.")
Exception: Unknown version of Mac OS X.

I have OS_VERSION[1] == 11. There is an llvm-gcc binary on my machine but Python 2.6 appears to have been built with clang anyway:

woz$ python2.6
Python 2.6.9 (unknown, Oct 23 2015, 18:05:10)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> print platform.mac_ver()
('10.11.3', ('', '', ''), 'x86_64')

The latest version of Xcode provides the following SDKs:

woz$ ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
MacOSX10.10.sdk/ MacOSX10.9.sdk/

With the new OS_VERSION added I then discovered that many (but not all) of the tarfiles downloaded were actually HTML error pages; download.py doesn't seem to to be checking the status code it gets back from the web-server. The files that failed to download were:
  PyQt-mac-gpl-4.10.2.tar.gz
  bzr-2.6.0.tar.gz
  bzr-colo-0.4.0.tar.gz
  dulwich-0.9.0.tar.gz
  launchpadlib-1.10.2.tar.gz
  paramiko-1.11.0.tar.gz
  pycrypto-2.6.tar.gz
  python-fastimport-0.9.2.tar.gz
  sip-4.14.7.tar.gz
  subvertpy-0.9.1.tar.gz
It is possible that some of those failures may have been due to our firewall rules, but I don't normally have trouble downloading tarfiles.

At this point I'm giving up, but I'll be willing to try again with an updated version.

Revision history for this message
Kristof (kristof-1) wrote :
Download full text (4.6 KiB)

Dear Bazar wizards,

I'm new to Bazar and new to OS X but came across the same problem with no solution so far.
OS X 10.11.5 and I installed Python 2.7 and Bazar 2.6. In the install I installed pyqt as well as qt.I had to modify the first line in the /usr/local/bin/bzr file. Changed the first line to #!/usr/bin/python2.6 as recommended on line. I found that odd as # denotes a comment line no? Anyhow it worked. Having installed Python 2.7 I tried using 2.7 instead of 2.6 at the end the line but it worked only with 2.6 which is a version that seemed to be installed at the same time as 2.7.

$ bzr seem to start bazar as I get:

$ bzr
Bazaar 2.6.0 -- a free distributed version-control tool
http://bazaar.canonical.com/

Basic commands:
  bzr init makes this directory a versioned branch
  bzr branch make a copy of another branch

  bzr add make files or directories versioned
  bzr ignore ignore a file or pattern
  bzr mv move or rename a versioned file

  bzr status summarize changes in working copy
  bzr diff show detailed diffs

  bzr merge pull in changes from another branch
  bzr commit save some or all changes
  bzr send send changes via email

  bzr log show history of changes
  bzr check validate storage

  bzr help init more help on e.g. init command
  bzr help commands list all commands
  bzr help topics list all help topics

But $ bzr explorer #gives the error below.
I'm not sure I something wrong but at the end of the message below it states,
*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.
I found a lot of what might be outdated information such as info on QTY http://www.oak-tree.us/blog/index.php/2009/05/12/pyqt-mac but wondered if in the last 7 years things have not changed. Thanks for your help.

# Error msg after using "bzr explorer":
bzr: ERROR: exceptions.ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  Reason: unsafe use of relative rpath QtCore.framework/Versions/4/QtCore in /Library/Python/2.6/site-packages/PyQt4/QtCore.so with restricted binary

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packag...

Read more...

Revision history for this message
Ian Newson (ian-newson) wrote :

Is there any update on this? It's deeply concerning that a critical issue has remained unresolved for 3 years.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.