On Aug 18, 2012, at 1:37 PM, Andrew Ross wrote: > On Fri, Aug 17, 2012 at 05:46:47PM -0700, Alan Irwin wrote: >> On 2012-08-17 09:59-0700 Alan W. Irwin wrote: >> >>> On 2012-08-16 20:37-0700 Jerry wrote: >>> >>>> Thanks for looking into this, Andrew. >>>> >>>> The results that I reported in my previous e-mail (reviving the thread) >>>> were with -DNON_TRANSITIVE=OFF. With your fix to 12216, I can now build >>>> 12216 for Qt. Problem fixed. >>>> >>>> When I switch to -DNON_TRANSITIVE=ON, however, the build fails like this: >>>> >>>> Linking CXX shared module qt.so >>>> cd /usr/local/plplot_build_dir/drivers && /opt/local/bin/cmake -E >>>> cmake_link_script CMakeFiles/qt.dir/link.txt --verbose=1 >>>> /usr/local/adacore-gnat-2011/bin/c++ -bundle >>>> -Wl,-headerpad_max_install_names -o qt.so CMakeFiles/qt.dir/qt.cpp.o >>>> ../src/libplplotd.11.0.0.dylib /usr/lib/libm.dylib >>>> ../bindings/qt_gui/libplplotqtd.0.0.1.dylib ../src/libplplotd.11.0.0.dylib >>>> -lQtCore >>>> ld: library not found for -lQtCore >>>> collect2: ld returned 1 exit status >>>> make[2]: *** [drivers/qt.so] Error 1 >>>> make[1]: *** [drivers/CMakeFiles/qt.dir/all] Error 2 >>>> make: *** [all] Error 2 >>> >>> Andrew, just to interject here, I believe the source of the error is >>> the lack of -L option in the above line to tell the linker where to >>> find QtCore. QT_LIBRARIES should have that information along with a >>> bunch of -l options that you do not want for the -DNON_TRANSITIVE=ON >>> case. So probably the thing to do here is to parse the QT_LIBRARIES >>> variable to remove the unwanted -l options. Since you are working >>> through a 3rd party (Jerry) for a platform you are not familiar with >>> (OS X), I suggest you use the CMake message command to always print >>> out both QT_LIBRARIES, and its parsed form just in case Jerry finds >>> any further difficulty with the parsed version. >> >> P.S. That comment wasn't quite right. To further clarify, all lists >> of linking flags like QT_LIBRARIES are further processed by our build >> system when they are first encountered (in cmake/modules) to transform >> -L and -l options to construct the equivalent full path name of >> libraries without disturbing other linking flags. (The absolute >> pathname form is the preferred one for variables that are used in >> target_link_libraries even though CMake internally changes that back >> to the -L and -l form when linking Linux libraries. But the actual >> resulting linking command may be different on other platforms which is >> why the absolute pathname form for library locations is preferred for >> input to target_link_libraries.) >> >> In sum, that clarification means for the case where you need to drop >> some but not all of those libraries, you should parse lists of linking >> flags such as QT_LIBRARIES to drop all absolute pathames other than >> the libraries you want. That parsing should leave hyphenated options >> alone. > > I've now done this, parsing QT_LIBRARIES to extract just the QtCore > library. Jerry, can you try this version? Out of interest, if it > doesn't work can you report the values of QT_LIBRARIES and QT_LINK_LIBS > returned by cmake, and also the actual command used to link the Qt driver? > > Thanks > > Andrew
Andrew, Sorry. With -DNON_TRANSITIVE=ON, the build failed on SVN 12217. The variables you wanted to see are: QT_LIBRARIES = /opt/local/lib/libQtSvg.dylib;/opt/local/lib/libQtGui.dylib;/opt/local/lib/libQtXml.dylib;/opt/local/lib/libQtCore.dylib QT_LINK_LIBS = /opt/local/lib/libQtCore.dylib Here is the error output and the few lines before it. Does this contain the link command you need to see? Scanning dependencies of target qt make -f drivers/CMakeFiles/qt.dir/build.make drivers/CMakeFiles/qt.dir/build /opt/local/bin/cmake -E cmake_progress_report /usr/local/plplot_build_dir/CMakeFiles 42 [ 31%] Building CXX object drivers/CMakeFiles/qt.dir/qt.cpp.o cd /usr/local/plplot_build_dir/drivers && /usr/local/adacore-gnat-2011/bin/c++ -Dqt_EXPORTS -DHAVE_CONFIG_H -fPIC -I/Users/jerrybauck/Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/include -I/Users/jerrybauck/Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/lib/qsastime -I/Users/jerrybauck/Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/lib/nistcd -I/usr/local/plplot_build_dir -I/usr/local/plplot_build_dir/include -I/opt/local/include/QtDesigner -I/opt/local/include/QtDeclarative -I/opt/local/include/QtScriptTools -I/opt/local/include/QtDBus -I/opt/local/include/QtDesigner -I/opt/local/include/QtXml -I/opt/local/include/QtSql -I/opt/local/include/QtOpenGL -I/opt/local/include/QtMultimedia -I/opt/local/include/QtNetwork -I/opt/local/include/QtXmlPatterns -I/opt/local/include/QtWebKit -I/opt/local/include/QtHelp -I/opt/local/include/QtUiTools -I/opt/local/include/QtTest -I/opt/local/include/QtScript -I/opt/local/include/QtSvg -I/opt/local/include/Qt3Support -I/opt/local/include/QtGui -I/opt/local/include/QtCore -I/opt/local/share/qt4/mkspecs/default -I/opt/local/include -I/opt/local/include/QtCore -DUSINGDLL -o CMakeFiles/qt.dir/qt.cpp.o -c /Users/jerrybauck/Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/drivers/qt.cpp Linking CXX shared module qt.so cd /usr/local/plplot_build_dir/drivers && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/qt.dir/link.txt --verbose=1 /usr/local/adacore-gnat-2011/bin/c++ -bundle -Wl,-headerpad_max_install_names -o qt.so CMakeFiles/qt.dir/qt.cpp.o ../src/libplplotd.11.0.0.dylib /usr/lib/libm.dylib ../bindings/qt_gui/libplplotqtd.0.0.1.dylib ../src/libplplotd.11.0.0.dylib /opt/local/lib/libQtCore.dylib Undefined symbols for architecture x86_64: "QWidget::move(QPoint const&)", referenced from: QWidget::move(int, int) in qt.cpp.o "QWidget::resize(QSize const&)", referenced from: QWidget::resize(int, int) in qt.cpp.o "QApplication::QApplication(int&, char**, bool, int)", referenced from: initQtApp(bool) in qt.cpp.o "QSvgGenerator::size() const", referenced from: plD_eop_svgqt(PLStream*) in qt.cpp.o "QPicture::QPicture(int)", referenced from: plD_init_qtwidget(PLStream*) in qt.cpp.o plD_init_extqt(PLStream*) in qt.cpp.o "QPainter::QPainter(QPaintDevice*)", referenced from: plD_init_qtwidget(PLStream*) in qt.cpp.o plD_init_extqt(PLStream*) in qt.cpp.o "QWidget::setWindowTitle(QString const&)", referenced from: plD_init_qtwidget(PLStream*) in qt.cpp.o "QPainter::~QPainter()", referenced from: plD_init_qtwidget(PLStream*) in qt.cpp.o plD_init_extqt(PLStream*) in qt.cpp.o "QPicture::~QPicture()", referenced from: plD_init_qtwidget(PLStream*) in qt.cpp.o plD_init_extqt(PLStream*) in qt.cpp.o "QWidget::raise()", referenced from: plD_eop_qtwidget(PLStream*) in qt.cpp.o "QImage::scanLine(int)", referenced from: plD_init_memqt(PLStream*) in qt.cpp.o plD_eop_memqt(PLStream*) in qt.cpp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [drivers/qt.so] Error 1 make[1]: *** [drivers/CMakeFiles/qt.dir/all] Error 2 make: *** [all] Error 2 With With -DNON_TRANSITIVE=OFF, the variables QT_LIBRARIES and do not appear in the cmake output, and the build succeeds. Jerry ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel