Compile and Build QCAD Trouble

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
mdelore
Newbie Member
Posts: 5
Joined: Wed Oct 15, 2014 5:42 pm

Compile and Build QCAD Trouble

Post by mdelore » Wed Oct 15, 2014 8:03 pm

Hello,

I'm trying to access the source code of qcad to fit it to my academic project and am having some difficulties. I followed the steps outlined on the qcad.org website and would like suggestions on how to fix my error.

Here's a rundown of what I've done:

brew install dxflib (a prerequisite)

git clone [site] (the source code) (https://github.com/qcad/qcad)

downloaded qt-everywhere-opensource-src-4.8.4.tar.gz (extracted it and put it in /usr/local)

configured QT

make (this is where error came)

The error looks like this:

Code: Select all

Reading /Users/matthewdelorenzo/qcad/support/examples/transactionlistener/transactionlistener.pro
matthews-mbp-2:qcad matthewdelorenzo$ make
cd src/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
cd 3rdparty/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
cd spatialindexnavel/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.Release
clang++ -c -pipe -stdlib=libc++ -mmacosx-version-min=10.7 -mmacosx-version-min=10.6 -O2 -arch x86_64 -w -fPIC -DQCAD_DLL -DPTHREADS -DHAVE_PTHREAD_H -DPACKAGE_BUGREPORT=\"[email protected]\" -DNDEBUG -DSPATIALINDEX_CREATE_DLL -DHAVE_BZERO -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WEBKIT_LIB -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I/usr/local/Cellar/qt/4.8.6/mkspecs/unsupported/macx-clang-libc++ -I. -I/usr/local/Cellar/qt/4.8.6/lib/QtHelp.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtHelp.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtDesigner.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtDesigner.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/include/QtUiTools -I/usr/local/Cellar/qt/4.8.6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtOpenGL.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtOpenGL.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtXml.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtXmlPatterns.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtXmlPatterns.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtSql.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtSql.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtSvg.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtScriptTools.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtScriptTools.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtScript.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtWebKit.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/lib/QtWebKit.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.6/include -I../../core -I../../core/math -I../../grid -I../../snap -I../../gui -I../../entity -I../../operations -I../../scripting -I../../stemmer -I../../scripting/ecmaapi -I../../scripting/ecmaapi/generated -I../../scripting/ecmaapi/adapters -I../../io/dxf -I../../spatialindex -I../../3rdparty -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -Irelease -F/usr/local/Cellar/qt/4.8.6/lib -o release/RandomEvictionsBuffer.o src/storagemanager/RandomEvictionsBuffer.cc
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
make[4]: *** [release/RandomEvictionsBuffer.o] Error 1
make[3]: *** [release] Error 2
make[2]: *** [sub-spatialindexnavel-make_default-ordered] Error 2
make[1]: *** [sub-3rdparty-make_default-ordered] Error 2
make: *** [sub-src-make_default-ordered] Error 2
Thank you.

EDIT: I am running Mavericks 10.9.4 with homebrew installed.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Compile and Build QCAD Trouble

Post by andrew » Thu Oct 16, 2014 8:30 am

mdelore wrote:brew install dxflib (a prerequisite)
This is not needed. The latest version of dxflib is included in src/3rdparty of the QCAD sources and automatically compiled together with QCAD.
The error looks like this:

Code: Select all

clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
Can it be that you are using an unsupported make specification? Such as unsupported/macx-clang-libc++? If so, is there any particular reason for this?

I'm currently using macx-g++ here:

Code: Select all

qmake -spec macx-g++ -r
make

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Compile and Build QCAD Trouble

Post by andrew » Thu Oct 16, 2014 8:43 am

P.S.: Here's a fix to compile with -spec unsupported/macx-clang-libc++:
https://github.com/qcad/qcad/commit/474 ... b6024ace14

Your binary will most likely not run under Mac OS X 10.6.

mdelore
Newbie Member
Posts: 5
Joined: Wed Oct 15, 2014 5:42 pm

Re: Compile and Build QCAD Trouble

Post by mdelore » Thu Oct 16, 2014 4:45 pm

Thanks Andrew. I actually downloaded QT open source src 8.4.5, configured it and the make was much more successful. I will try this and report back. FWIW the next error that came (an hour or so after make) was:

Code: Select all

Undefined symbols for architecture i386:
  "_WKCreateMediaUIBackgroundView", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKCreateMediaUIControl", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTClearMediaDownloadCache", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTClearMediaDownloadCacheForSite", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTGetSitesInMediaDownloadCache", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTIncludeOnlyModernMediaFileTypes", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieDataRate", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieDisableComponent", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieGetType", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieHasClosedCaptions", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieMaxTimeLoaded", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieMaxTimeLoadedChangeNotification", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieMaxTimeSeekable", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieResolvedURL", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieSelectPreferredAlternates", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieSetShowClosedCaptions", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKQTMovieViewSetDrawSynchronously", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKWindowSetAlpha", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
  "_WKWindowSetScaledFrame", referenced from:
      InitWebCoreSystemInterface() in WebSystemInterface.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../../../../../../lib/QtWebKit.framework/QtWebKit] Error 1
make[2]: *** [release] Error 2
make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2
make: *** [sub-webkit-make_default-ordered] Error 2
Thanks

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Compile and Build QCAD Trouble

Post by andrew » Sat Oct 18, 2014 10:36 am

Thanks for the update. For Qt related compilation problems, you probably better post to a Qt forum such as:
https://qt-project.org/forums

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”