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

------------------------------------------------------------------------------
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

Reply via email to