Errors building qGIS #14

ryanshaw opened this Issue Aug 22, 2012 · 9 comments

5 participants


I ran into some issues attempting to build qGIS, here's the configuration:

-- Configuring incomplete, errors occurred!
==> Build Environment
HEAD: bb5d1f5
CPU: dual-core 64-bit penryn
OS X: 10.8-x86_64
Xcode: 4.4.1
X11: 2.7.2 in /opt/X11
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.4/include -isystem /usr/local/include -I/opt/X11/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.4/lib -L/usr/local/lib -L/opt/X11/lib
PKG_CONFIG_PATH: /opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/Library/Homebrew/pkgconfig
OBJC: /usr/bin/clang
PATH: /usr/local/Cellar/readline/6.2.4/bin:/opt/X11/bin:/Users/ryan/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Users/ryan/.rvm/bin:/Users/ryan/.ec2/bin:/Users/ryan/.rvm/bin:/usr/local/Library/Contributions/cmds

Error: Failed executing: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/qgis/1.8.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DQWT_INCLUDE_DIR=/private/tmp/homebrew-qgis-1.8.0-Giq7/qgis-1.8.0/qwt52/include -DQWT_LIBRARY=/private/tmp/homebrew-qgis-1.8.0-Giq7/qgis-1.8.0/qwt52/lib/libqwt.a -DBISON_EXECUTABLE=/private/tmp/homebrew-qgis-1.8.0-Giq7/qgis-1.8.0/bison/bin/bison -DENABLE_TESTS=NO -DQGIS_MACAPP_BUNDLE=0 -DQGIS_MACAPP_DEV_PREFIX='/usr/local/Cellar/qgis/1.8.0/lib' -DQGIS_MACAPP_INSTALL_DEV=YES (qgis.rb:108)

Here's the last part of the config output:

-- Found Sqlite3: /usr/local/lib/libsqlite3.dylib
-- Found PostgreSQL: /usr/local/Cellar/postgresql/9.1.4/lib/libpq.dylib
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /usr/local/bin/qmake (found suitable version "4.8.2", required is "4.4.0")
-- Pedantic compiler settings enabled
-- Found PythonInterp: /usr/bin/python (found version "2.7.2")
-- Found Python executable: /usr/bin/python
-- Found Python version: 2.7.2
-- Found Python library: -framework Python
Traceback (most recent call last):
File "/tmp/homebrew-qgis-1.8.0-Giq7/qgis-1.8.0/cmake/", line 8, in
import sipconfig
ImportError: No module named sipconfig
CMake Error at cmake/FindSIP.cmake:54 (MESSAGE):
Could not find SIP
Call Stack (most recent call first):
CMakeLists.txt:476 (FIND_PACKAGE)


Looks like you are using the Python version shipped with OS X. Did you modify your PYTHONPATH to include the directories where Homebrew installs Python modules?


You could try with homebrew's python brew install python and then brew install sip.
Does the brew doctor complain?

System python seems not to have sip out of the box. You could install this by hand (or with pip) I guess. But homebrew is more comfortable.


Thanks for the reply, attempting to install python via brew results in a permission error, essentially the same error described here: Homebrew/legacy-homebrew#14278

I haven't been able to resolve that, even with a clean Homebrew install.


@ryanshaw basically check that no other python installation is upfront in path. So best is to have /usr/local/bin first (or where your brew --prefix is. Second check if there is not already an old python installation at /usr/local/bin - because installs there with sudo leaving homebrew unable to remove it.


Thanks for the reply, attempting to install python via brew

I didn't suggest installing python---I said you probably need to adjust your PYTHONPATH. See brew info sip for the formula caveats which explain this.


Ryan, any resolution to this? I'm having a similar error involving python and SIP.


@ryanshaw I had the same problem tonight. The solution appears to be in both PATH and PYTHONPATH ordering. Ensure brew paths show up first in both of these variables. From my ~/.bashrc:

# brew before all
# homebrew python support
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

Does this fix your issue as well?


@ndimiduk Ah, thought I had the PYTHONPATH in my environment but did not. That fixed it and it has compiled just fine. Thanks for the reply.

@ryanshaw ryanshaw closed this Oct 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment