|
From: Andrew B. <an...@br...> - 2006-07-14 19:02:55
|
Hi, I recently started to use gnuplot 4.0, but found I needed some features in 4.1. When I try the provided binaries the program crashes, when I try and use this simple script: reset set terminal png set output 'temp.png' plot(sin(x)) So I figured it was a bug so I tried compiling from the latest CVS source. After many hours of compiling/recompiling, etc, I still have the same crash. However if I use a different terminal (other than png) the image is plotted fine. So I assume this is a problem with libpng? I found this old posting http://sourceforge.net/mailarchive/forum.php?thread_id=9178285&forum_id=6027 stating the same problem, but looking the CVS is compiling with /MT. Can anyone recommend how to compile the code? Or just give me a binary that works with PNGs... thanks BTW I'm using Visual Studio .Net 2003, on Windows XP, with the gnuplot code from CVS about 30minutes ago (as well as snapshots from April). Thanks for any help Andrew |
|
From: Petr M. <mi...@ph...> - 2006-07-14 20:17:05
|
> I recently started to use gnuplot 4.0, but found I needed some features in > 4.1. > > When I try the provided binaries the program crashes, when I try and use > this simple script: > reset > set terminal png > set output 'temp.png' > > plot(sin(x)) When it crashes? BTW, do yo do set out; set term pop afterwards? > Can anyone recommend how to compile the code? Or just give me a binary that > works with PNGs... thanks > > BTW I'm using Visual Studio .Net 2003, on Windows XP, with the gnuplot code > from CVS about 30minutes ago (as well as snapshots from April). It works for me (Wine 0.9.17 under SUSE Linux). --- PM |
|
From: Andrew B. <an...@br...> - 2006-07-16 11:09:28
|
Ok, maybe the description of my problem wasn't clear enough. I didn't download libpng, but whenever I try plotting a PNG it crashes. So, I'm starting again explaining each step I took. I firstly checked out the CVS tree using TortiseCVS, using the options I found for CVS listed here: http://www.gnuplot.info/development/index.html Then reading the INSTALL file it tells me to run "nmake -f ..\config\makefile.nt", however at that point I haven't downloaded the gdlib/pdflib libraries. So reading the instructions in the makefile.nt it says to download them both and place them in ..\src\gdwin32 and ..\src\pdflib which I do. BTW I download http://www.boutell.com/gd/http/gdwin32.zip and http://www.pdflib.com/products/pdflib/download/603/PDFlib-6.0.3p1-Windows.zip Now I run nmake -f ..\config\makefile.nt from the source directory. I'm using the Visual Studio 2003 Compiler. That compiles but fails at the linking, because \src\gdwin32 doesn't contain a bgd.lib file. After a quick google I realise I need to run \src\gdwin32\makevcimport.bat. I do that and try nmake again, and it finishes linking. I now copy the pgnuplot.exe wgnuplot.hlp and wgnuplot.exe in to their own directory. As well as copying the pdflib.dll and bgb.dll. Now when I run wgnuplot, the normal gnuplot window appears. I type the following lines plot(sin(x)) A nice sine wave window appears. Then I try set terminal pdf set output "test.pdf" plot(sin(x)) A PDF file appears with the correct graph in it. Then I try pngs: set terminal png set output "test.png" plot(sin(x)) (and as soon as I hit enter on that last line, GNUPlot crashs, leaving me with a zero byte test.png file) I then tried to plot with a different terminal type, so I type set terminal to obtain a list, and voila gnuplot crashes again once we get to the end of the list! But I see gif was a supported type, so I type the following: set terminal gif set output "test.gif" plot(sin(x)) and again a crash!. So maybe my former statement about it being libpng was wrong, its more generally libgd. Now the only difference I seem to be doing to Bastian, is that I'm using Visual Studio 2003, instead of Visual C++ 6. Also in response to Peter Mikulik's question about typing "set out; set term pop" afterwards? Well as soon as I type plot it crashes, so I'm unable to type it afterwards. I'm happy to send my binary files for anyone to debug, or I could recompile with debugging enabled if that helps. Until then I will be using gnuplot on a linux machine, but it would be a great help for me if Bastian would send me his compiled executable in the mean time. Thanks a lot Andrew P.S This post seems to outline what steps need to be done to compile the code, which is slightly more complex than listed in INSTALL, maybe some of these steps need to be added to INSTALL. thanks. ----- Original Message ----- From: "Bastian Maerkisch" <bma...@we...> To: "Andrew Brampton" <an...@br...> Sent: Saturday, July 15, 2006 6:24 AM Subject: Re: Windows gnuplot 4.1 libpng problems Andrew Brampton wrote: > Hi, > I recently started to use gnuplot 4.0, but found I needed some features in > 4.1. > > When I try the provided binaries the program crashes, when I try and use > this simple script: > reset > set terminal png > set output 'temp.png' > > plot(sin(x)) > > So I figured it was a bug so I tried compiling from the latest CVS source. > After many hours of compiling/recompiling, etc, I still have the same > crash. However if I use a different terminal (other than png) the image is > plotted fine. So I assume this is a problem with libpng? > > I found this old posting > http://sourceforge.net/mailarchive/forum.php?thread_id=9178285&forum_id=6027 > stating the same problem, but looking the CVS is compiling with /MT. Are you sure you are using a current CVS version? Support for binary version of libgd was added in last december. config.nt in CVS uses the /MD switch. No need to get libpng any more. > Can anyone recommend how to compile the code? Or just give me a binary > that works with PNGs... thanks > > BTW I'm using Visual Studio .Net 2003, on Windows XP, with the gnuplot > code from CVS about 30minutes ago (as well as snapshots from April). Well, I am using MSVC++ 6.0 on XP. And here's what I do: - download gdlib to gnuplot\src\gdwin32 (binary version!) - download pdflib to gnuplot\src\pdflib and compile it if you choose the source, (you can also remove all references to pdf in makefile.nt) - copy bgd.dll and pdflib.dllto a place in your path - change to gnuploit\src - run nmake -f ..\config\makefile.nt Works out of the box for me. (last tested 14 days ago) Hope that helps, Bastian > > Thanks for any help > Andrew -- Bastian Märkisch Physikalisches Institut, Universität Heidelberg |
|
From: Daniel J S. <dan...@ie...> - 2006-07-16 11:20:33
|
Andrew Brampton wrote: This shouldn't make a difference, but try adding "set output" before changing the terminal. If the crash goes away, there may be a bug. > A nice sine wave window appears. Then I try > > set terminal pdf > set output "test.pdf" > plot(sin(x)) set output > set terminal png > set output "test.png" > plot(sin(x)) set output > set terminal gif > set output "test.gif" > plot(sin(x)) set output Dan |
|
From: Andrew B. <an...@br...> - 2006-07-16 12:30:08
|
----- Original Message ----- From: "Daniel J Sebald" <dan...@ie...> To: "Andrew Brampton" <an...@br...> Cc: <gnu...@li...> Sent: Sunday, July 16, 2006 12:29 PM Subject: Re: Windows gnuplot 4.1 libpng problems > Andrew Brampton wrote: > > This shouldn't make a difference, but try adding "set output" before > changing the terminal. If the crash goes away, there may be a bug. > >> A nice sine wave window appears. Then I try >> >> set terminal pdf >> set output "test.pdf" >> plot(sin(x)) > > set output > >> set terminal png >> set output "test.png" >> plot(sin(x)) > > set output > >> set terminal gif >> set output "test.gif" >> plot(sin(x)) > > set output > > Dan > Thanks for the suggestion Dan, I just tried that, and again it crashes. Bastian has kindly sent me his binaries, and they are working great. However now I have a working copy I've noticed another difference. When I run my wgnuplot, I do not get the menu and the buttons along the top!. I just figured that had been removed for some reason, but now looking at Bastian's copy they are there. So something else must also be wrong :/ Here is a URL to my builds: http://me.bramp.net/gnuplot-vs2003.zip if anyone is curious in running them. I will try and compile a version with debug symbols ( I just need to figure out how to alter the makefile to do that). I was also just looking for my VC6 CD so I could install that and test if that solves my problem. I'll report back when I've done that. For the time being I'll be using Bastian binaries, but I'm happy to help figure out why my compile doesn't work. Thankyou for everyone's help. Andrew |
|
From: <br...@ph...> - 2006-07-16 18:36:46
|
Andrew Brampton wrote: > Bastian has kindly sent me his binaries, and they are working great. However > now I have a working copy I've noticed another difference. When I run my > wgnuplot, I do not get the menu and the buttons along the top!. I just > figured that had been removed for some reason, but now looking at Bastian's > copy they are there. So something else must also be wrong :/ That something else is the way you installed your own binaries. Consult the Windows section of "INSTALL" again. You forgot to bring along the wgnuplot.mnu file. |
|
From: <br...@ph...> - 2006-07-16 18:43:37
|
Andrew Brampton wrote: > Ok, maybe the description of my problem wasn't clear enough. I didn't > download libpng, but whenever I try plotting a PNG it crashes. Actually you did download libpng --- but in such a way that it was hard to notice. There's a full copy of libpng inside the DLL version of GD you downloaded. > I then tried to plot with a different terminal type, so I type set terminal > to obtain a list, and voila gnuplot crashes again once we get to the end of > the list! That rather strongly suggests that GD has nothing to do with it either: GD isn't involved in printing the 'set term' list. That's starting to look more like this: > Now the only difference I seem to be doing to Bastian, is that I'm using > Visual Studio 2003, instead of Visual C++ 6. is the real problem. IIRC, Boutell states rather strongly that his prebuilt DLL doesn't work on anything but VC++ 6. |
|
From: Ethan A M. <merritt@u.washington.edu> - 2006-07-16 18:50:35
|
On Sunday 16 July 2006 11:43 am, Hans-Bernhard Br=F6ker wrote: > Andrew Brampton wrote: >=20 > > Now the only difference I seem to be doing to Bastian, is that I'm usin= g=20 > > Visual Studio 2003, instead of Visual C++ 6. >=20 > is the real problem. IIRC, Boutell states rather strongly that his=20 > prebuilt DLL doesn't work on anything but VC++ 6. Hmm. And the problem Mojca was having with locale settings also seems to arise from using an earlier version of Visual Studio. Does this mean we should add a caveat somewhere in the docs that if you are building on Windo= ws with the MicroSoft tool chain, it requires VS 6.0? =20 In "Known Bugs", maybe? Or in the FAQ? Can Windows users download updated C libraries, or do they have to buy a whole new package? =2D-=20 Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |
|
From: <br...@ph...> - 2006-07-17 21:21:42
|
Ethan A Merritt wrote: > Hmm. And the problem Mojca was having with locale settings also seems to > arise from using an earlier version of Visual Studio. If anything, it's more likely too *new* a version he's using. VC++ version 6 is out of date, by MS's reckoning. As far as they're concerned, no application developer is supposed to be programming in C any more. We're all supposed to have switched from (their slight bastardization of) C to their much worse bastardizations of Java (C#) or C++, by now. > Does this mean we should add a caveat somewhere in the docs that if > you are building on Windows with the MicroSoft tool chain, it > requires VS 6.0? I don't think we have sufficient evidence to make the statement that strong. > Can Windows users download updated C libraries, or do they have to buy > a whole new package? They'd have to download backdated C libraries --- and those cost more than the brand-new honey-trap versions. |
|
From: Mojca M. <moj...@gm...> - 2006-07-18 10:20:52
|
On 7/17/06, Hans-Bernhard Br=F6ker wrote: > Ethan A Merritt wrote: > > > Hmm. And the problem Mojca was having with locale settings also seems t= o > > arise from using an earlier version of Visual Studio. > > If anything, it's more likely too *new* a version he's using. VC++ > version 6 is out of date, by MS's reckoning. As far as they're > concerned, no application developer is supposed to be programming in C > any more. We're all supposed to have switched from (their slight > bastardization of) C to their much worse bastardizations of Java (C#) or > C++, by now. > > > Does this mean we should add a caveat somewhere in the docs that if > > you are building on Windows with the MicroSoft tool chain, it > > requires VS 6.0? > > I don't think we have sufficient evidence to make the statement that > strong. I installed MS Visual Studio only because I wanted to be able to compile gnuplot - I'm just a very very basic user (programmer). I just wanted to approve that I have the same "crashing-problem" with PNG driver from the very beginning (but I have not enough experience to find out what's going wrong and I thought that I was simply too stupid to be able to compile gnuplot with GD and PDF support - PDF works OK though, but I get a huge watermark in the background with the name of the PDF library which makes the PDF driver useless even if it was more advanced). I'm just wating (hiping) that someone will compile gnuplot for me with png and wxt support built-in since I wasn't able to use/compile either fo them. The version 2005 is also known as the version "8", so it seems that my version is "too new". During compiling I also get tons of warnings in the sense of "deprecated function", but there should be some switch somewhere to turn this off - it complains for such basic functions as scanf. Mojca |
|
From: Petr M. <mi...@ph...> - 2006-07-18 11:12:31
|
> I'm just wating (hiping) that someone will compile gnuplot for me with > png and wxt support built-in since I wasn't able to use/compile either > fo them. Not wxt and pdf, but other terminals are in the "testing" windows binary gp41-July18_2006-winbin.zip available (as all other testing binaries, including gnuplot source tarballs): http://gnuplot.sourceforge.net/development/binaries/ --- PM |
|
From: Andrew B. <an...@br...> - 2006-07-18 10:42:30
|
Glad to hear I'm not the only one with this problem. I will try and generate binaries with debug symbols in, and look for the problem myself when I have the time. Incase anyone decides to, I've already forwarded Mojca the binaries that Bastain kindly sent me. Andrew ----- Original Message ----- From: "Mojca Miklavec" <moj...@gm...> To: "Hans-Bernhard Bröker" <br...@ph...> Cc: "Ethan A Merritt" <merritt@u.washington.edu>; <gnu...@li...>; "Andrew Brampton" <an...@br...> Sent: Tuesday, July 18, 2006 11:20 AM Subject: Re: Windows gnuplot 4.1 libpng problems On 7/17/06, Hans-Bernhard Bröker wrote: > Ethan A Merritt wrote: > > > Hmm. And the problem Mojca was having with locale settings also seems to > > arise from using an earlier version of Visual Studio. > > If anything, it's more likely too *new* a version he's using. VC++ > version 6 is out of date, by MS's reckoning. As far as they're > concerned, no application developer is supposed to be programming in C > any more. We're all supposed to have switched from (their slight > bastardization of) C to their much worse bastardizations of Java (C#) or > C++, by now. > > > Does this mean we should add a caveat somewhere in the docs that if > > you are building on Windows with the MicroSoft tool chain, it > > requires VS 6.0? > > I don't think we have sufficient evidence to make the statement that > strong. I installed MS Visual Studio only because I wanted to be able to compile gnuplot - I'm just a very very basic user (programmer). I just wanted to approve that I have the same "crashing-problem" with PNG driver from the very beginning (but I have not enough experience to find out what's going wrong and I thought that I was simply too stupid to be able to compile gnuplot with GD and PDF support - PDF works OK though, but I get a huge watermark in the background with the name of the PDF library which makes the PDF driver useless even if it was more advanced). I'm just wating (hiping) that someone will compile gnuplot for me with png and wxt support built-in since I wasn't able to use/compile either fo them. The version 2005 is also known as the version "8", so it seems that my version is "too new". During compiling I also get tons of warnings in the sense of "deprecated function", but there should be some switch somewhere to turn this off - it complains for such basic functions as scanf. Mojca |