Hi Alan,

I wrote a small test program to determine where the compile errors with SWIG 
were coming from and to ensure that my MinGW/MSYS installation is indeed 32 
bits. The program is this:

/* test-compile.c --
       Test a few things with regards to the problems to compile SWIG
       under MinGW/MSYS

       -DSTAT: compile with the "struct stat" structure

       In any case: check the size of a pointer
*/
#include <stdio.h>

#ifdef STAT
#include <sys/stat.h>
#endif

int main( int argc, char *argv[] ) {

#ifdef STAT
    struct stat st;
#endif

    printf("Size of pointer: %d\n", sizeof(void *));

#ifdef STAT
    printf("Size of struct stat: %d\n", sizeof(st));
#endif
}


I tried building this program under various environments with the -DSTAT flag. 
They all succeeded - no compile errors. The output from the programs was rather 
varied:

- Cygwin: pointer size 8, struc stat size 128 -- this is a 64-bits environment
- Windows+gcc 4.5.2: pointer size 4, struc stat size 36 -- a 32-bits environment
- Windows+MSVC/C++, 64-bits: pointer size 4, struc stat size 48 -- a 64-bits 
environment
- MinGW/MSYS+gcc 4.8.1: pointer size 4, struct stat size 48 - definitely a 
32-bits environment!

The error messages with SWIG come from the flag -ansi:

$ gcc -o test-compile test-compile.c -DSTAT -ansi
test-compile.c: In function 'main':
test-compile.c:18:17: error: storage size of 'st' isn't known
     struct stat st;
                 ^

The real question is: where is the flag -ansi coming from? It appears together 
with -Wall -pedantic in the make files but I can not find its origins anywhere 
in PLplot or CMake (I have not checked the CMake executables, assuming all that 
sort of flags would be contained in the configuration files instead).

Okay, sofar that analysis. Now I will try your receipe.

Regards,

Arjen

> -----Original Message-----
> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca]
> Sent: Monday, February 10, 2014 11:24 PM
> To: Arjen Markus
> Cc: PLplot development list
> Subject: Re: [Plplot-devel] Still roughly on track for a February 12th 
> release of 5.10.0
>
> Hi Arjen:
>
> Please use the improved epa_build instructions you get with revision 12993.  
> I have
> replaced the old ENABLE_COMPREHENSIVE_PLPLOT_TEST cmake option with
> COMPREHENSIVE_PLPLOT_TEST_INTERACTIVE and
> COMPREHENSIVE_PLPLOT_TEST_NONINTERACTIVE to make it more
> convenient to split up interactive and noninteractive testing.
>
> This morning I finally got around to doing
> COMPREHENSIVE_PLPLOT_TEST_INTERACTIVE=ON testing for
> MinGW/MSYS/Wine and I discovered some issues.  All but one of those are fixed 
> as
> of revision 12993.  So for example, the test_c_ntk, test_c_wingcc, and
> test_tclsh_standard_examples targets (all dependencies of the 
> test_interactive target)
> all work correctly.  However, the test_pltcl_standard_examples target (also 
> currently
> a dependency of the test_interactive target) generates an error with message 
> "wine:
> Unhandled page fault on read access to 0x00867490 at address 0x867490 (thread
> 0034)" right near the end of the final page of example 33 (or perhaps just 
> after that
> final page is completed).  So this issue might be similar to
> http://sourceforge.net/p/plplot/bugs/139/.  But there the wish environment 
> failed while
> the plserver did not show the issue, while for the present case it is pltcl 
> that shows
> the issue, while tclsh does not.
>
> I am now wondering whether this is just a Wine issue or a symptom of a a more
> general PLplot memory management issue whenever pltcl, plserver, tclsh, or 
> wish
> exit from the standard examples case. Of course, as with any memory management
> issue, you sometimes get symptomless (i.e., good) results despite the memory
> management issue.
> So this hypothesis would explain why we get both good and bad results on 
> different
> platforms and depending on whether the standard examples are being run by 
> pltcl,
> tclsh, plserver, or wish.  But, of course, the variety of results we are 
> getting for the
> standard examples do not completely prove the hypothesis so the hypothesis is 
> just
> something to keep in mind.
>
> From this bad interactive result for MinGW/MSYS/Wine your priority for this 
> release
> should be to make sure
> COMPREHENSIVE_PLPLOT_TEST_NONINTERACTIVE=ON works for the 32-bit
> Windows case like it currently does for MinGW/MSYS/Wine.  Your second priority
> after that (if you have time before Wednesday) should be to try
> COMPREHENSIVE_PLPLOT_TEST_INTERACTIVE=ON just to see if the same
> issue I just discovered on Wine shows up on 32-bit Microsoft Windows as well 
> or
> whether you can get all the way through the comprehensive interactive tests 
> on that
> platform.
>
> 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); the Time Ephemerides project 
> (timeephem.sf.net);
> PLplot scientific plotting software package (plplot.sf.net); 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
> __________________________

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to