Compiling qcad using clang++ under current

mike mike at reifenberger.com
Thu Sep 5 09:22:37 UTC 2013


Hi,
compiling the QT4 application cad/qcad using clang++ works for me on freebsd 
current amd64 r254593 but fails on the package cluster.

Fail-log: 
http://beefy2.isc.freebsd.org/bulk/latest-per-pkg/qcad/3.2.1.0/head-default.log
...
clang++ -c -pipe -g -w -pthread -D_THREAD_SAFE -fPIC -DQCAD_DLL -DPTHREADS 
-DHAVE_PTHREAD_H -DPACKAGE_BUGREPORT=\"mhadji at gmail.com\" -DNDEBUG 
-DSPATIALINDEX_CREATE_DLL -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/share/qt4/mkspecs/freebsd-clang -I. -I/usr/local/include/qt4/QtHelp 
-I/usr/local/include/qt4/QtDesigner -I/usr/local/include/qt4/QtUiTools 
-I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtNetwork 
-I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtOpenGL 
-I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtXmlPatterns 
-I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtSvg 
-I/usr/local/include/qt4/QtScriptTools -I/usr/local/include/qt4/QtScript 
-I/usr/local/include/qt4/QtWebKit -I/usr/local/include/qt4 -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/usr/local/include 
-Idebug -I/usr/local/include/qt4 -I/usr/local/include -o debug/TPRStatistics.o 
src/tprtree/TPRStatistics.cc
rm -f libspatialindexnavel.so
clang++ -rdynamic -pthread -Wl,-rpath,/usr/local/lib/qt4 -shared -o 
libspatialindexnavel.so debug/RandomEvictionsBuffer.o 
debug/MemoryStorageManager.o debug/Buffer.o debug/DiskStorageManager.o 
debug/rand48.o debug/Tools.o debug/RIndex.o debug/RLeaf.o debug/RNode.o 
debug/RTree.o debug/RBulkLoader.o debug/RStatistics.o debug/MVRStatistics.o 
debug/MVRIndex.o debug/MVRTree.o debug/MVRLeaf.o debug/MVRNode.o 
debug/TimeRegion.o debug/MovingRegion.o debug/Region.o debug/SpatialIndexImpl.o 
debug/TimePoint.o debug/MovingPoint.o debug/Point.o debug/LineSegment.o 
debug/TPRTree.o debug/TPRIndex.o debug/TPRNode.o debug/TPRLeaf.o 
debug/TPRStatistics.o   -L/usr/local/lib/qt4 -L/usr/local/lib 
-L/wrkdirs/usr/ports/cad/qcad/work/qcad-3.2.1.0/debug -lQtWebKit 
-L/usr/local/lib/qt4 -L/usr/local/lib -lQtScriptTools -lQtScript -lQtSvg 
-lQtXmlPatterns -lQtOpenGL -lQtUiTools 
-L/wrkdirs/usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.4/lib 
-lQtXml -lGL -lQtDesigner -lQtHelp -lQtSql -lQtGui -lQtNetwork -lQtCore
/usr/bin/ld: debug/RandomEvictionsBuffer.o: relocation R_X86_64_PC32 against 
`.LBB2_10' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
...

The strange thing is that the debug object where compiled using -fPIC !


The relevant compiling do work for me without errors and using the same build 
environment:
...
clang++ -c -pipe -g -w -pthread -D_THREAD_SAFE -fPIC -DQCAD_DLL -DPTHREADS 
-DHAVE_PTHREAD_H -DPACKAGE_BUGREPORT=\"mhadji at gmail.com\" -DNDEBUG 
-DSPATIALINDEX_CREATE_DLL -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/share/qt4/mkspecs/freebsd-clang -I. -I/usr/local/include/qt4/QtHelp 
-I/usr/local/include/qt4/QtDesigner -I/usr/local/include/qt4/QtUiTools 
-I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtNetwork 
-I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtOpenGL 
-I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4/QtXmlPatterns 
-I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtSvg 
-I/usr/local/include/qt4/QtScriptTools -I/usr/local/include/qt4/QtScript 
-I/usr/local/include/qt4/QtWebKit -I/usr/local/include/qt4 -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/usr/local/include 
-Idebug -I/usr/local/include/qt4 -I/usr/local/include -o debug/TPRStatistics.o 
src/tprtree/TPRStatistics.cc
rm -f libspatialindexnavel.so
clang++ -rdynamic -pthread -Wl,-rpath,/usr/local/lib/qt4 -shared -o 
libspatialindexnavel.so debug/RandomEvictionsBuffer.o 
debug/MemoryStorageManager.o debug/Buffer.o debug/DiskStorageManager.o 
debug/rand48.o debug/Tools.o debug/RIndex.o debug/RLeaf.o debug/RNode.o 
debug/RTree.o debug/RBulkLoader.o debug/RStatistics.o debug/MVRStatistics.o 
debug/MVRIndex.o debug/MVRTree.o debug/MVRLeaf.o debug/MVRNode.o 
debug/TimeRegion.o debug/MovingRegion.o debug/Region.o debug/SpatialIndexImpl.o 
debug/TimePoint.o debug/MovingPoint.o debug/Point.o debug/LineSegment.o 
debug/TPRTree.o debug/TPRIndex.o debug/TPRNode.o debug/TPRLeaf.o 
debug/TPRStatistics.o   -L/usr/local/lib/qt4 -L/usr/local/lib 
-L/fbsd/Checkouts/qcad/work/qcad-3.2.1.0/debug -lQtWebKit -L/usr/local/lib/qt4 
-L/usr/local/lib -lQtScriptTools -lQtScript -lQtSvg -lQtXmlPatterns -lQtOpenGL 
-lQtUiTools 
-L/wrkdirs/usr/ports/devel/qt4-designer/work/qt-everywhere-opensource-src-4.8.4/lib 
-lQtXml -lGL -lQtDesigner -lQtHelp -lQtSql -lQtGui -lQtNetwork -lQtCore
...


Can anyone imagine whats different on the package cluster?

Thanks in advance!

---
Michael Reifenberger


More information about the freebsd-ports mailing list