On 11/04/2014 09:12 PM, Alan W. Irwin wrote:
> On 2014-11-04 16:35-0500 Hazen Babcock wrote:
>
>>> But if none of the above helps, then the fundamental question you
>>> should ask yourself is whether you also have similar issues for the
>>> hand-crafted smoke bindings you started with.  [...] If not, then I
>>> suggest you look very carefully at the VERBOSE=1 results to see how
>>> our build system is deviating from what you do by hand.
>>
>> Yes, the hand-crafted bindings work. If you are interested, you can
>> read what worked for me (and what I'm trying to duplicate) here:
>> https://github.com/HazenBabcock/cl-plplot/tree/master/commonqt-plot
>
>  From the README.txt file there it appears you put in a symlink to qt.h
>
> As a test I did that locally here as well (to the existing qt.h file in
> the build tree),
> and that change improved the situation!
>
> For example,
>
> nm -a --demangle bindings/qt_gui/smoke/libsmokeplplotqt.so |\
> grep -i pl |\
> wc -l
>
> now shows 52 PLplot-related symbols in the library (compared to 17
> before), and
>
> ldd -r bindings/qt_gui/smoke/libsmokeplplotqt.so
>
> shows no undefined symbols or other issues.
>
> Note, this better result was obtained with the git version of plplotqt.h
>
> software@raven> cat plplotqt.h
> #include "qt.h"
>
> with no extra #defines.
>
> But to me it was incredible that
>
> /usr/bin/smokegen -config /usr/share/smokegen/qt-config.xml \
> -smokeconfig \
> /home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke/smokeconfig.xml
> \
> -I"/home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke" \
> -I"/home/software/plplot/HEAD/plplot.git/include" \
> -I"/home/software/plplot/HEAD/plplot.git/lib/qsastime" \
> -I"/home/software/plplot/HEAD/plplot.git/lib/nistcd" \
> -I"/home/software/plplot/HEAD/plplot.git/drivers" \
> -I"/home/software/plplot/HEAD/build_dir" \
> -I"/home/software/plplot/HEAD/build_dir/include" -- \
> /home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke/plplotqt.h
>
> (the command issued by our build system) cannot find qt.h in
> the "/home/software/plplot/HEAD/plplot.git/include" directory
> specifically mentioned as an -I option.  And (important!) this implies
> none of the above -I options are being honored so your symlink
> workaround is only going to generate an extremely limited result.
>
> I then realized the above was not exactly consistent with the one
> example of a -I option in the above URL which had a space between the
> "-I" and the directory name.  So I tried that form instead, e.g.,
>
> /usr/bin/smokegen -config /usr/share/smokegen/qt-config.xml \
> -smokeconfig \
> /home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke/smokeconfig.xml
> \
> -I /home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke \
> -I /home/software/plplot/HEAD/plplot.git/include \
> -I /home/software/plplot/HEAD/plplot.git/lib/qsastime \
> -I /home/software/plplot/HEAD/plplot.git/lib/nistcd \
> -I /home/software/plplot/HEAD/plplot.git/drivers \
> -I /home/software/plplot/HEAD/build_dir \
> -I /home/software/plplot/HEAD/build_dir/include -- \
> /home/software/plplot/HEAD/plplot.git/bindings/qt_gui/smoke/plplotqt.h
>
> without the symlink and the result was a much larger number (263) of
> symbols than the 52 found above or 17 found previously with the
> combination of just the symlink and the ignore (no-space) -I options.  So
> it appears the symlink method has been quite limited in what it can
> do, and the above is much more complete (and also passes the ldd -r
> test).
>
> I have committed (commit ids 2b3f9c2 and 0904d30) that build system fix,
> and I look
> forward to some follow up from you.

Thanks! It works for me now too.

> For example, you should look over the smokegen-generated source code
> to see if some of the above -I options are dragging in too much.
> If
> some of them should be removed, then all you have to do is remove the
> corresponding directory name in the include_directories_LIST variable.
>
> Note the latest version of the CMake logic which now means any change
> to that list is done consistently for not only smokegen but also the
> -I options used to build from those generated sources.
>
> Also, the current log file contains the following:
>
> plplotqt.h: (96111, 51): Expression expected :     ConstructPtr cptr =
> qMetaTypeConstructHelper<T>;
> plplotqt.h: (96111, 51): Initializer clause expected :
> ConstructPtr cptr = qMetaTypeConstructHelper<T>;
> plplotqt.h: (96113, 45): Expression expected :     DeletePtr dptr =
> qMetaTypeDeleteHelper<T>;
> plplotqt.h: (96113, 45): Initializer clause expected :     DeletePtr
> dptr = qMetaTypeDeleteHelper<T>;
> plplotqt.h: (96129, 41): Expression expected :     SavePtr sptr =
> qMetaTypeSaveHelper<T>;

Which log are you referring to? I'm not seeing this warning messages.

> which may indicate the current include_directories_LIST variable has
> too many directories or some other fix has to be made to get
> rid of what appear to be warning messages.
>
> Of course, once you are satisfied with the completeness of
> these bindings, I look forward to you adding a number of examples.

The lisp example in the cl-plplot project now works with these binding, 
so from my perspective they work. I'll look into creating an example 
that can go into the PLplot project, probably in Python.

> By the way, I believe the above issue I worked around is caused by an
> egregious smokegen bug in how it parses -I options. Accordingly, I
> have made a debian bug report about this
> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768105> which I
> hope the Debian packager will pass upstream to the smokegen
> developers.  But the Debian stable version of smokegen that I
> am using is pretty old so I also request that you ask the smokegen
> developers about this obvious human engineering issue (violation of
> the principle of least surprise) to see if they have fixed it in the
> latest version of smokegen.

It is too bad that smokegen has no --version flag so that we could 
compare versions. Mine might be more recent and I was having the same 
issues.

Ok, I will try and contact the developers.

-Hazen


------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to