gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] running program compiled by GCL via Wine


From: Camm Maguire
Subject: Re: [Gcl-devel] running program compiled by GCL via Wine
Date: Thu, 17 Oct 2013 10:26:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Greetings!

Robert Dodier <address@hidden> writes:

> Camm, thanks for the info about Wine & Maxima.
>
> I set up the binfmt stuff to recognize .exe files and it
> seems to work as intended (.exe is indeed executed
> via Wine) but I get the same error about msys.
>
> I don't understand the logic of detect_wine -- I don't
> see how it could succeed. Maybe you can help me
> understand it.
>
> I tried to execute just GCL itself  by installing GCL 2.6.9
> ANSI from the download page for the GCL project.
> The installer runs OK (some warnings) but saved_ansi_gcl.exe
> fails with the same error which originates in detect_wine.
> Here's how it reads when I try to execute saved_ansi_gcl.exe:
>
> Can't recognize 'c:/_cvs/gcl/lib/gcl-2.6.9/unixport/msys /tmp/ out8
> tmp8 log8' as an internal or external command, or batch script.
>
> I see that the installer installed msys.exe in the folder
> GCL-2.6.9-ANSI/unixport, but saved_ansi_gcl.exe tries
> to execute c:/_cvs/gcl/lib/gcl-2.6.9/unixport/msys instead.
>
> Looks like the immediate problem is that *SYSTEM-DIRECTORY*
> is not assigned a local path name but gets a hardcoded value
> (something set at build time, I guess) instead.
> Reading o/main.c, I see that GCL will accept a command
> line argument for *SYSTEM-DIRECTORY* if initflag == 0,
> which is not the case for saved images but is for raw images,
> according to a comment in main.c.
>

Thanks so much for pointing this out!  All my experience, mostly
successful, with running under wine comes from running in the build
directory.  You indeed seem to have discovered a problem with our
windows installer.  'make install' is supposed to run the following to
setup the system directory paths to their correct final values:

>From the top level makefile:
     
     echo '(reset-sys-paths "$(INSTALL_LIB_DIR)/")(si::save-system 
"$(FLISP)$(EXE)")' | ./temp$(EXE) && \

Don, can you see any reason why this is not happening?

In any case, alas, the detect_wine function is run too early to change
the si::*system-directory*.  I suppose I could have it read an
environment variable by default, or maybe move it to the first use of
'system', which might provide more working room.  Suggestions most
welcome.  In any case, if there is a chance you might build gcl from
source according to README.wine and run from the build directory, I'd
appreciate any feedback on how it goes for you.

> So ... I can get a little farther by executing raw_ansi_gcl.exe.
>
> wine ./drive_c/ProgramFiles/GCL-2.6.9-ANSI/unixport/raw_ansi_gcl.exe
> `pwd`/drive_c/ProgramFiles/GCL-2.6.9-ANSI/unixport/
> GCL (GNU Common Lisp)  April 1994  131071 pages
> Building symbol table for
> Z:/home/robert/.wine/drive_c/ProgramFiles/GCL-2.6.9-ANSI/unixport/raw_ansi_gcl.exe
> ..
> loading 
> /home/robert/.wine/drive_c/ProgramFiles/GCL-2.6.9-ANSI/unixport/../lsp/gcl_export.lsp
>
> Then it just sits there until I hit ctrl-C.
>

The raw image will be of no use to you unless you have access to the
build directory.

> strace shows that it seems to be repeatedly reading from
> z:/tmp/out8 which has the content
>
> ar x 
> /home/robert/.wine/drive_c/ProgramFiles/GCL-2.6.9-ANSI/unixport/libansi_gcl.a
> gcl_defmacro.o
>

msys is just a little helper to run external system commands
synchronously.  My experience with wine was that the native call
returned before the child finished, leading to corrupt gcc .o output,
for example.  From the above lines, yo don't have libansi_gcl.a (I don't
think) installed, so ar cannot produce the needed file to run the
initialization in the raw image.

> I guess this is related to scheme implemented by msys --
> not sure how this is supposed to play out.
>
> Thanks for any light you can shed on this.
>

Hope this is clear enough -- if not, please ask more questions.  I will
think about a detect_wine system-directory escape, and hopefully if you
can you might be able to test from a build directory.

Take care,
-- 
Camm Maguire                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

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