pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PSPP & PSPPIRE running as native windows applications.


From: Ben Pfaff
Subject: Re: PSPP & PSPPIRE running as native windows applications.
Date: Wed, 07 Feb 2007 08:55:12 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"John McCabe-Dansted" <address@hidden> writes:

> On 2/7/07, Ben Pfaff <address@hidden> wrote:
>> > I know at least four tests fail simply because "make check" attempts
>> > to run cross-compiled binaries on the host machine.
>>
>> I think you're talking about tests/libpspp/ll-test.exe and
>> the other tests/libpspp tests.  Is there a way to make these run?
>> Obviously there is some way to run "cross-compiled" binaries,
>> because the tests are able to run pspp.exe.
>
> Yes, we can run them via "wine". Perhaps we could have something like
>    if linux && target_mingw
>        RUNTARGETEXE="wine"
>    else
>        RUNTARGETEXE=""
>    fi
> in the makefile?

I hadn't realized that mingw's compiler ran under Linux.  Now I
see that there's even a set of Debian packages for it.  That's
good news, because it means that I should be able to easily test
it myself.  (I don't have a Windows machine of my own.)

> The makescript attempts to run cross-compiled binaries in a number of
> places. The only place that matters for a straight "make" is q2c, so I
> replaced
>   /.../q2c
>        ./src/language/lexer/q2c $< $@
> with
>        wine ./src/language/lexer/q2c$(EXEEXT) $< $@

I am not sure that this is the correct fix.  q2c should run on
the build machine, not on the target.  It should be compiled with
the host C compiler, not with the target C compiler.

> I have likewise replaced pspp.exe with "wine pspp.exe" to get "make
> check" to run most of the tests.
>
> It would be possible to change the Makefile so that .exe files are run
> with wine and .sh files are run with /bin/sh, but I have not done this
> yet.

OK.

>> I notice there is a large number of segmentation faults in the
>> test runs.  Are you willing to try getting a backtrace for a few
>> of these with a debugger?  Probably, there are only a few causes,
>> so that fixing one of them will fix many.  I don't know what
>> you'd need to do under mingw, but under GNU/Linux I generally do
>> something like
>>         make check TESTS=tests/formats/time-in.sh SUPERVISOR='gdb --args'
>> to make a test run under the supervision of GDB.  You should see
>> a GDB prompt, at which you can type 'r' to run the program.  When
>> it stops, type 'bt' to get a backtrace, and mail the backtrace to
>> pspp-dev.
>
> For obvious reasons I am using SUPERVISOR="wine". I'll have a look at
> the debug options in wine.
>
> I don't understand those segmentation faults. Usually if a program
> running in wine segfaults, wine itself will dump some diagnostic data.
> How does the Makefile detect segfaults?

It's not the Makefile that does it.  The "main" function, in
src/ui/terminal/main.c, sets up a bunch of signal handlers.
There's a good chance that wine's diagnostics are more useful
than PSPP's, though, so you could consider just commenting out
the calls to signal and see if you get better information.
-- 
Ben Pfaff 
address@hidden
http://benpfaff.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]