Bug report #8951

Compilation fails on OSX Maverick

Added by Tim Sutton about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Larry Shaffer
Category:Build/Install
Affected QGIS version:2.0.1 Regression?:No
Operating System:OSX Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17616

Description

I got my Maverick update yesterday and it seems there are some issues compiling QGIS under OSX now:

Linking CXX shared library ../../output/lib/qgis_core.framework/Versions/2.1/qgis_core
Undefined symbols for architecture x86_64:
  "std::basic_ios<char, std::char_traits<char> >::widen(char) const", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "std::ostream::put(char)", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "std::ostream::flush()", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:
      QgsLogger::logMessageToFile(QString) in qgslogger.cpp.o
  "std::string::_Rep::_S_empty_rep_storage", referenced from:
      QgsLogger::logMessageToFile(QString) in qgslogger.cpp.o
  "std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)", referenced from:
      QString::toStdString() const in qgslogger.cpp.o
  "std::ios_base::Init::Init()", referenced from:
      __GLOBAL__I_a in qgsgpsconnection.cpp.o
      __GLOBAL__I_a in qgsnmeaconnection.cpp.o
      __GLOBAL__I_a in qgsgpsdconnection.cpp.o
      __GLOBAL__I_a in qgsgpsdetector.cpp.o
      __GLOBAL__I_a in qgshttptransaction.cpp.o
      __GLOBAL__I_a in qgslabelattributes.cpp.o
      __GLOBAL__I_a in qgslogger.cpp.o
      ...
  "std::ios_base::Init::~Init()", referenced from:
      __GLOBAL__I_a in qgsgpsconnection.cpp.o
      __GLOBAL__I_a in qgsnmeaconnection.cpp.o
      __GLOBAL__I_a in qgsgpsdconnection.cpp.o
      __GLOBAL__I_a in qgsgpsdetector.cpp.o
      __GLOBAL__I_a in qgshttptransaction.cpp.o
      __GLOBAL__I_a in qgslabelattributes.cpp.o
      __GLOBAL__I_a in qgslogger.cpp.o
      ...
  "std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "std::cout", referenced from:
      QgsMessageLogConsole::logMessage(QString, QString, QgsMessageLog::MessageLevel) in qgsmessagelog.cpp.o
  "___sincos_stret", referenced from:
      QgsMarkerSymbolLayerV2::_rotatedOffset(QPointF const&, double) in qgssymbollayerv2.cpp.o
      offsetLine(QPolygonF, double) in qgssymbollayerv2utils.cpp.o
      QgsMarkerLineSymbolLayerV2::markerAngle(QPolygonF const&, bool, int) in qgslinesymbollayerv2.cpp.o
      MyLine::diffForInterval(double) in qgslinesymbollayerv2.cpp.o
      QgsLinePatternFillSymbolLayer::applyPattern(QgsSymbolV2RenderContext const&, QBrush&, double, double, double, QColor const&) in qgsfillsymbollayerv2.cpp.o
      QgsLinePatternFillSymbolLayer::toSld(QDomDocument&, QDomElement&, QMap<QString, QString>) const in qgsfillsymbollayerv2.cpp.o
      QgsPointDisplacementRenderer::calculateSymbolAndLabelPositions(QPointF const&, int, double, double, QList<QPointF>&, QList<QPointF>&) const in qgspointdisplacementrenderer.cpp.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [output/lib/qgis_core.framework/Versions/2.1/qgis_core] Error 1
make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
make: *** [all] Error 2

History

#1 Updated by Larry Shaffer about 6 years ago

Hi Tim,

There are definitely issues with the initial Mavericks release. Not sure if they are an error on Apple's part, or specific (and permanent) changes to the SDK or build toolchain. There have been quite a few compile errors reported at the homebrew project.

I will not have a chance to duplicate and upgrade my Parallels 10.8.5 virtual machine to 10.9.0 until next week (still comfortably running stable 10.7.5). After Mac OS X 10.6.8, all recent OSes can be virtualized, but only on Mac hardware. (Mac 10.6.8 server can be virtualized, of which I own a copy.) It would be good to have a QGIS project or OSGeo Mac, or pay for Mac hosting, for setting up a continuous integration server, specifically for Mac. Could be used for nightly and release builds as well. Could be as simple as a dedicated Mac Mini server with 2 internal drives and running Parallels, with SSH/VNC access.

Will test compiling next week, as soon as I have 10.9 set up. Currently, J. Tull is running 10.9 and may be able to offer some help with a fix.

#2 Updated by Andrew Loerch about 6 years ago

I had QGIS running fine on 10.8, upgraded to 1o.9, and am experiencing several problems with QGIS 2.0.1 -

1. QGIS would not run, with errors related to GDAL Framework not being installed. I reinstalled GDAL-Complete 1.10, and those errors went away.

2. QGIS now refuses to run, saying that PIL needs to be installed. "pip install PIL" and "pip install pillow" are NOT working, so at the moment, QGIS is not working.

I am currently updating Xcode to version 5, and have already installed the new Xcode command line tools. HOPEFULLY that will resolve the problem (s)

#3 Updated by Andrew Loerch about 6 years ago

Updating Xcode, reinstalling the python modules, PIL and QGIS, worked.

1. In the Mac Store app, update Xcode to 5.0.1
2. If you haven't done so already, update the Xcode Command Line Tools (Xcode > Preferences > Downloads)
3. in the terminal, type "pip install PIL", if it givers a permissions error, try "sudo pip install PIL" (assuming you were getting PIL errors, too)
4. Re-install GDAL Framework, NumPy, and any other python modules
5. Re-install QGIS (not sure if this was necessary, but I didn't feel like taking chances)

After the above, the first launch of QGIS gave me the PIL error again, but subsequent launches did not, and the program seems to be working properly.

#4 Updated by Larry Shaffer about 6 years ago

Hi Andrew,

In your setup there, are you compiling QGIS source, or installing pre-built binaries from Kyngchaos.com?

I ask because Tim's issue here is when compiling QGIS.

#5 Updated by Tim Sutton almost 6 years ago

  • Status changed from Open to Closed

Closing this as old.

Also available in: Atom PDF