Thanks Larry, that's interesting. libqscintilla2_qt5 is already in cmake/FindQScintilla.cmake. The output of my cmake command also tells me that it's finding QScintilla2 in /usr/local/lib/libqscintilla2_qt5.dylib.

The problem seems to be that upon compilation, Qsci.so expects it to be called libqscintilla2.dylib. If I remove the symlink I've created after compilation, but before runtime, I get:

Couldn't load PyQGIS.
Python support will be disabled.


Traceback (most recent call last):
File "", line 1, in File "/Users/joel/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/gui/__init__.py", line 27, in from qgis._gui import *
ImportError: 
dlopen(/Users/joel/Applications/QGIS.app/Contents/MacOS/../Resources/python/PyQt5/Qsci.so,
 2): Library not loaded: @loader_path/../../../MacOS/lib/libqscintilla2.dylib
 Referenced from: 
/Users/joel/Applications/QGIS.app/Contents/Resources/python/PyQt5/Qsci.so
 Reason: image not found

So it seems to me that Qsci expects it to be in /usr/local/lib, called just libqscintilla2.dylib. If I move the symlink back and don't recompile, the application launches without error.

Regards,

--
Joel Buckley

On Wed, Oct 11, 2017 at 10:40:42AM -0600, Larry Shaffer wrote:
Hi Joel,

On Tue, Oct 10, 2017 at 11:39 PM, Joel Buckley <q...@spam.joelbuckley.com.au
wrote:

To close the loop on this, the problem was that though qscintilla2 was
installed on my system (OS X), it was not called simply
'libqscintilla2.dylib' in /usr/local/lib.

The fix is:
$ cd /usr/local/lib
$ ln -s libqscintilla2_qt5.dylib libqscintilla2.dylib


You should avoid this, as the symlink ends up spoofing that library's Qt4
naming convention. Better to make sure the FindQScintilla.cmake module
properly locates the name (which doesn't have any issues with finding it
here on macOS 10.11.6 using Homebrew).

Try adding libqscintilla2_qt5 to QSCINTILLA_LIBRARY_NAMES in:
https://github.com/qgis/QGIS/blob/master/cmake/FindQScintilla.cmake

and see if that helps.

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
----------------------------------
Boundless Desktop and QGIS Support/Development
Boundless Spatial - http://boundlessgeo.com
lshaf...@boundlessgeo.com

Regards,

--
Joel Buckley


On Tue, Oct 10, 2017 at 03:29:30PM +1100, Joel Buckley wrote:

You're right, running `make clean` and starting the process again had it
all working. Thanks!

So the only remain hang-up I have, is that upon launch (of either the
standalone binary, or the `make`d launcher), I get the following error:
---
Couldn't load PyQGIS.
Python support will be disabled.


Traceback (most recent call last):
File "", line 1, in
File "/Users/joel/Documents/QGIS/build/output/python/qgis/gui/__init__.py",
line 27, in
  from qgis._gui import *
ModuleNotFoundError: No module named 'PyQt5.Qsci'
---

I have searched on this, and tried reinstalling Qscintilla2 (via
homebrew). I've tried grepping for Qsci to determine if it's not being
picked up, but I'm not familiar enough with the build process just yet
to tell why it mightn't be compiled in.

Thanks for your help so far, and I hope this is my last query for now -
any suggestions on this error?

If it helps, I am running the following cmake:
cmake -D CMAKE_INSTALL_PREFIX=~/Applications \
-D CMAKE_BUILD_TYPE=MINSIZEREL \
-D ENABLE_TESTS=TRUE \
-D SPATIALINDEX_LIBRARY=/usr/local/lib/libspatialindex.dylib \
-D SPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex \
-D QWT_LIBRARY=/usr/local/Cellar/qwt/6.1.3_4/lib/qwt.framework \
-D QWT_INCLUDE_DIR=/usr/local/Cellar/qwt/6.1.3_4/lib/qwt.framework/Headers
\
-D BISON_EXECUTABLE=/usr/local/bin/bison \
-D PYTHON_EXECUTABLE=/usr/local/bin/python3 \
-D CMAKE_PREFIX_PATH=/usr/local/opt/qt \
-D WITH_BINDINGS=TRUE \
-D WITH_SERVER=TRUE \
-D QSCINTILLA_INCLUDE_DIR=/usr/local/Cellar/qscintilla2/2.10.1_1/include
\
-D 
QSCINTILLA_LIBRARY=/usr/local/Cellar/qscintilla2/2.10.1_1/lib/libqscintilla2_qt5.dylib
\
-D GRASS_INCLUDE_DIR7=/usr/local/Cellar/grass7/7.2.1/grass-base/include \
-D GRASS_PREFIX7=/usr/local/Cellar/grass7/7.2.1/grass-base/ \
-D QSCINTILLA_LIBRARY=/usr/local/lib/libqscintilla2_qt5.dylib \
-D QSCINTILLA_INCLUDE_DIR:PATH=/usr/local/include \
..

Regards,

--
Joel Buckley

On Mon, Oct 09, 2017 at 10:51:04AM +0200, David Marteau wrote:

Hi

Sorry but the 'make install' seems to work correctly for me on OSX
10.11.6: I have a stand alone binary installed at the location specified by
CMAKE_INSTALL_PREFIX - I'm running several versions of QGIS and then
nee to have different install paths. Is your ~/Applications/QGIS.app a
link ?

David.

Le 9 oct. 2017 à 01:20, Joel Buckley <q...@spam.joelbuckley.com.au> a
écrit :

Thanks, this helped. I'm now able to launch it from the command line
without a problem.

One thing I've noticed though, is `open -a ~/Applications/QGIS.app` will
actually invoke the binary created in QGIS/build/output/ - my `make`
output (if you ⌘-click on the application in the Dock, you will be shown
the location of the running application).  I imagined a standalone
binary would be created at `make install`.  Is there a separate set of
steps to create a standalone binary? I'm trying to make some changes and
distribute to a few others for them to try.

Thanks again for the QT_QPA_PLATFORM_PLUGIN_PATH tip.

Regards,

--
Joel Buckley

On Fri, Oct 06, 2017 at 01:59:30PM +0200, David Marteau wrote:

Hi

Try to define the environment variable QT_QPA_PLATFORM_PLUGIN_PATH=/o
pt/local/libexec/qt5/plugins/platforms (it may depends on how is your
qt5 installation - this path is ok for Macport installation)

According to my experience (see https://www.3liz.com/blog/rldh
ont/index.php?post/2017/06/01/How-to-build-qgis-on-OSX-with-MacPort)
: If this variable is not defined then QGIS will crash at startup.


Le 6 oct. 2017 à 09:46, Joel Buckley <q...@spam.joelbuckley.com.au> a
écrit :

Hi,

I am having some difficulty running `make install`, and compiling
QGIS into a single standalone application on macOS. I can successfully run
configuration and `make`, and can launch the `make`-d code from
build/output/bin with no problem.

`make install` runs without complaint and returns 0 (success), but
when I try to launch the newly create QGIS.app, it immediately crashes, and
produces a crash report (attached for brevity).

I have googled and attempted to parse the crash log, but the errors
it reports are beyond my capability. I'm hoping someone on the list might
have some input on how to remedy this?

Configuration information:
QGIS version: current master branch
QT5, python 3
macOS 10.12.6

Regards,

--
Joel Buckley

<crash.txt>_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to