Re: [Plplot-devel] plplot, cairo on OSX without X11 libs
On Sun, Oct 4, 2009 at 7:37 PM, Alan W. Irwin wrote: > On 2009-10-04 08:52+0200 Zorg 421 wrote: > >> Hello plplot developper, >> >> I've built a plplot trying to link it only against a Cairo/Glib/Gtk >> framework which use >> directly quartz and bypass, know nothing about X11. >> It failed with the following error: [...] >> I've inverted some paths in PKG_CONFIG_PATH to fall on >> X11 cairo before quartz cairo but it's a bit of a shame. > > Is this a correct summary of what you wrote above? The xcairo device does > not build properly for a cairographics environment that excludes X (for > obvious reasons), but you found an alternative cairographics environment > that does include X which works. Hmm the one environnement on which the build fail is any of the native port of gtk to quartz directly, bypassing the need of the embedded X server of OSX. For example: http://www.gtk-osx.org/ My workaround is to use an X-based libcairo of macports, which implies having the OSX X server active for seeing the plplot example selecting the xcairo driver. > Assuming that summary is correct, does -dev xcairo work at run time for you? > If you feel our wiki at > http://www.miscdebris.net/plplot_wiki/index.php?title=Mac_OSX_Status needs > updating (say by adding the qualifier "cairographics must support X or else > must specify -DPLD_xcairo=OFF") please do so. > >> [out of order] >> the cairo driver of plplot implies it's using X11, which is not >> necesseraly the case on the mac, more and more it's using quartz >> natively. > > I agree with you (since Quartz is mentioned as a possible back-end for > cairo) that programming an additional quartzcairo device would be desirable > for the OS X case. It should also be straightforward; just follow the notes > in drivers/README.drivers (just updated as of revision 10512) that list > required changes for a new device. In general, the process is completely > straightforward for everything other than the actual device code, but in > this particular case that should be straightforward as well: edit > drivers/cairo.c to duplicate what is done for xcairo for a new quartzcairo > device except to change the calls to libpango/libcairo appropriately for the > Quartz backend. Maybe is't better, if the changes appears to be two includes like #include #include instead of #include #include It's from memory, but there was a time for wich changes to lablgtk2 was a simple as this. So a -DDARWIN_QUARTZ_ONLY define or something similar would do the trick without duplicating extra code. NB: I haven't yet looked at plplot code, it's from previous experience about quartz vs X building. Regards. > Note, that we are all volunteers here who tend to work on our own PLplot > priorities. So if nobody else here volunteers for the above straightforward > job, I suggest you do it yourself (assuming you have some basic C > knowledge), and send us a patch so that everybody can benefit from your > work. I am sure everybody here would be willing to help you with any > questions you might have about the process of adding a new device to PLplot, > but the first place you should consult is (the newly updated) > drivers/README.drivers. > > Alan > __ > Alan W. Irwin -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
[Plplot-devel] plcairo in latest SVN
Hello plplot developpers, Since Sept29 the build system for plcairo has been integrated into cmake. Unfortunately, on my godi 3.11 on a mac, with ocaml-cairo from GIT and lablgtk2 from svn installed by hands in site-lib and std-lib respectively, it's not beeing detected by cmake configuration: ... -- OCAMLC = /opt/godi311/bin/ocamlc.opt -- CAMLIDL = /opt/godi311/bin/camlidl -- OCAMLMKLIB = /opt/godi311/bin/ocamlmklib -- OCAMLOPT = /opt/godi311/bin/ocamlopt.opt -- OCAMLFIND = /opt/godi311/bin/ocamlfind -- OCAML_LIB_PATH = /opt/godi311/lib/ocaml/std-lib -- CAMLIDL_LIB_DIR = /opt/godi311/lib/ocaml/std-lib -- WARNING:Cairo OCaml library not found. Disabling Plcairo module -- WARNING: lablgtk2 OCaml library not found. ... While: $ ocamlfind query plplot /opt/godi311/lib/ocaml/site-lib/plplot $ ocamlfind query cairo /opt/godi311/lib/ocaml/site-lib/cairo and ls /opt/godi311/lib/ocaml/std-lib/lablgtk2/ gives 273 dir entries. I guess lablgtk2 is reachable using "ocamlopt -I +lablgtk2". Is there some define option to the cmake configure to set those paths for bypassing autodetection? Thanks, regards. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
[Plplot-devel] plplot, cairo on OSX without X11 libs
Hello plplot developper, I've built a plplot trying to link it only against a Cairo/Glib/Gtk framework which use directly quartz and bypass, know nothing about X11. It failed with the following error: Scanning dependencies of target cairo [ 29%] Building C object drivers/CMakeFiles/cairo.dir/cairo.c.o /Users/philou/src/plplot-svn/drivers/cairo.c:44:24: error: cairo-xlib.h: No such file or directory /Users/philou/src/plplot-svn/drivers/cairo.c: In function ‘xcairo_init_cairo’: /Users/philou/src/plplot-svn/drivers/cairo.c:1406: warning: assignment makes pointer from integer without a cast make[2]: *** [drivers/CMakeFiles/cairo.dir/cairo.c.o] Error 1 make[1]: *** [drivers/CMakeFiles/cairo.dir/all] Error 2 make: *** [all] Error 2 the cairo driver of plplot implies it's using X11, which is not necesseraly the case on the mac, more and more it's using quartz natively. In the meantime I've inverted some paths in PKG_CONFIG_PATH to fall on X11 cairo before quartz cairo but it's a bit of a shame. Regards. -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
[Plplot-devel] embedding one/many plplots in a gtk drawingarea
Hello plpplot developpers, I'm new to plplot, I need it mostly thru it's ocaml binding. There are some concern, however: - from my understanding, the only option to embed a/several plots in a window, is to use the gnomecanva, right? unfortunately, it's anti-aliasing quality is poor (I only got some form of text antialiasing in the C canva animation demo, after uncommenting a mistyped ANTIALISED_CANVA in gnome.c under driver/) - The cairo driver generate plots 15-20% smaller than the other drivers (at least under OSX). - The cairo driver does not rescale the plot when the user resize it's windows (but flicker like mad processing redraw event anyway). - I'm missing the randr X extension under OSX, could it have some bad influence? I would like to embed high quality screen output (like the wxWin, probably using quartz) in a gtk ocaml application, using simply the gtk drawing area to embed the cairo output, is it possible? I may help implementing it if necessary. Someone has a backup of the cairo-demo CVS repo? it's down, and cairo comes with almost no examples, poor doco :-( The best starter I have is a ocaml-cairo example, which is not easy to follow for implementing first a way to export the cairo output to a drawing area in C. Regards. -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel