On 2011-01-03 08:36-0800 David MacMahon wrote:

> I also noticed this when compiling tkwin.c...
>
> drivers/tkwin.c:398: warning: assignment makes pointer from integer without a 
> cast
>
> This is because XOpenDisplay is not declared in any #included files.  I think 
> because I'm on Mac OS X and Tk is not based on X11 on that platform.  I see a 
> lot of "#ifdef MAC_TCL" in the source code, but I can't find that being 
> #defined (or #undefed) anywhere nor any cmake files that refer to the MAC_TCL 
> macro.
>
> Thanks again,
> Dave
>
> P.S.  Here's the full command line that make used and the resulting output...
>
> cd /Users/davidm/local/src/plplot/tmp/drivers && /opt/local/bin/gcc  
> -Dtkwin_EXPORTS -DHAVE_CONFIG_H -arch i386 -isysroot 
> /Developer/SDKs/MacOSX10.6.sdk -fPIC -I/Users/davidm/local/src/plplot/include 
> -I/Users/davidm/local/src/plplot/lib/qsastime 
> -I/Users/davidm/local/src/plplot/lib/nistcd 
> -I/Users/davidm/local/src/plplot/tmp 
> -I/Users/davidm/local/src/plplot/tmp/include   
> -I/System/Library/Frameworks/Tcl.framework/Headers 
> -I/System/Library/Frameworks/Tk.framework/Headers -I/usr/include 
> -I"/Users/davidm/local/src/plplot"/bindings/tcl 
> -I"/Users/davidm/local/src/plplot/tmp"/bindings/tcl 
> -I"/Users/davidm/local/src/plplot"/bindings/tk-x-plat 
> -I"/Users/davidm/local/src/plplot"/bindings/tk -DUSINGDLL -o 
> CMakeFiles/tkwin.dir/tkwin.c.o   -c 
> /Users/davidm/local/src/plplot/drivers/tkwin.c
>
> /Users/davidm/local/src/plplot/drivers/tkwin.c: In function 'plD_open_tkwin':
> /Users/davidm/local/src/plplot/drivers/tkwin.c:398: warning: assignment makes 
> pointer from integer without a cast
> /Users/davidm/local/src/plplot/drivers/tkwin.c: In function 'Init':
> /Users/davidm/local/src/plplot/drivers/tkwin.c:946: warning: assignment makes 
> pointer from integer without a cast
> /Users/davidm/local/src/plplot/drivers/tkwin.c:959: warning: assignment makes 
> pointer from integer without a cast
> /Users/davidm/local/src/plplot/drivers/tkwin.c: In function 'CreatePixmap':
> /Users/davidm/local/src/plplot/drivers/tkwin.c:1235: warning: assignment 
> makes pointer from integer without a cast

Hi Dave:

Please insert the following line

message(STATUS "tkwin_COMPILE_FLAGS = ${tkwin_COMPILE_FLAGS}")

in cmake/modules/tk.cmake right after tkwin_COMPILE_FLAGS is defined,
then rerun cmake from an empty build tree while collecting its full
output to send here as an attachment to help us to figure out what is
going wrong above.

It has been a very long time since I have looked at the tkwin "device",
but here is some background (from memory and from looking at
cmake/modules/tcl-related.cmake and cmake/modules/tk.cmake.)

The tkwin "device" is usually built by default but rarely tested.  As
far as I can remember it is actually a shared object/dll that is meant
to be dynamically loaded by wish rather than a PLplot device driver
that is meant to be dynamically loaded by our core C library. 
tk.cmake says tkwin won't get built unless Tk is enabled.  Most
Tk-related components of PLplot use the extended Tk that depends on X.
So in general Tk won't be enabled unless X was found.  Thus, since
your build system is evidently building tkwin on Mac OS X, your cmake
output requested above should report that X was found and Tk enabled.
It should also give specifics about where X was found i.e.,
X11_INCLUDE_DIR and X11_LIBRARIES.

There is the cmake command

message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}")

in tcl-related.cmake so you should see that result in the cmake
output. If you look a few lines up in the file, TK_INCLUDE_PATH
includes X11_INCLUDE_DIR.  If you follow the logic in tk.cmake,
tkwin_COMPILE_FLAGS should depend on a transformed version of
X11_INCLUDE_DIR, that is the above build should include -I flags that
point to the X location.  The modified cmake result asked for above
should show what is contained in tkwin_COMPILE_FLAGS, and thus give us
a better idea of what is going on.

If you get further puzzling results, I encourage you to scatter
"message(STATUS ..." commands around in our build-system files to help
diagnose what is going on.  From my review of our build system files
it appears to me that our build-system logic should be working OK to
propagate X11_INCLUDE_DIR where it is needed for the tkwin build, but
it is possible the original value of X11_INCLUDE_DIR is screwed up.
We will see....

BTW, once tkwin is built without warnings for you, I believe you can
test it by following the last paragraph (the one involving
tk-x-plat) in examples/tk/README.tkdemos.

Thanks in advance.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to