[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Compiling GCL with Wine
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: Compiling GCL with Wine |
Date: |
Tue, 14 Sep 2010 16:07:44 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Greetings!
Gabriel Dos Reis <address@hidden> writes:
> Camm Maguire <address@hidden> writes:
>
> [...]
>
> | > Camm, what are the instructions to build and test GCL under wine?
> | >
> |
> | This is the README.wine file:
>
> Hi Camm,
>
> Thanks for the instructions. My box is a x86_64 running openSUSE-11.2.
> I don't think that matters substantially. However, a few notes for
> anyone out there who would like to try the cross compile:
>
> | On Debian, for example, gcl can be run and tested under wine as follows:
> |
> | (as root)
> |
> | aptitude install mingw32 mingw32-runtime mingw32-binutils wine
> |
> | If necessary, as root
> |
> | update-binfmts --enable wine
>
> openSUSE does not have `update-binfmts', but:
> (1) one can install wine through YAST
> (2) enable wine as
>
> # echo ':DOSWin:M::MZ::/usr/bin/wine:' >> /proc/sys/fs/binfmt_misc/register
>
> On x86_64, the cross compiler tools for MinGW available through YAST
> would have some trouble installing (because it does not have a 64-bit
> cross build.) The simplest is to just build your own cross tool chain.
> Here is what I did:
>
> (a) Build binutils:
> (i) download binutils (2.20.1)
> (ii) build with prefix /opt/cross and target i686-pc-mingw32
> (iii) install
>
> (b) Build minimal GCC
> (i) download GCC -- I just took the development version
> (ii) configure with prefix /opt/cross, target i686-pc-mingw32 and
> other switches such as
> --enable-languages='c,c++' \
> --disable-nls --disable-multilib \
> --disable-bootstrap
> (iii) make all-gcc && sudo make install-gcc
>
> (c) Install MinGW headers and libraries
> (i) donwload MinGW-RT and W32API from MinGW sourcefore website
> (ii) unpack them in /opt/cross/i686-pc-mingw32
>
> (d) Rebuild and install full GCC with (C and C++ compilers)
>
> | Then as a normal user,
> |
> | export PATH=/usr/i586-mingw32msvc/bin:$PATH
> | export CC=/usr/bin/i586-mingw32msvc-gcc
> |
> | ./configure --host=mingw32 && make
> |
>
> PATH=/optc/cross/i686-pc-mingw32/bin:$PATH
> CC='i686-pc-mingw32-gcc' ./configure --host=i686-pc-mingw32
> --prefix=/opt/cross/i686-pc-mingw32
> make
>
> With that, the system built raw_pre_gcl.exe. But, the the boostrap
> failed with the following:
>
> cp init_pre_gcl.lsp foo
> echo " (in-package \"USER\")(system:save-system \"saved_pre_gcl\")" >>foo
> ar x libpre_gcl.a $(ar t libpre_gcl.a |grep ^gcl_)
> /home/gdr/src/gcl-2.6.8pre/unixport/raw_pre_gcl.exe
> /home/gdr/src/gcl-2.6.8pre/unixport/ -libdir /home/gdr/src/gcl-2.6.8pre/ < foo
>
> Unrecoverable error: Can't allocate. Good-bye!.
>
Thanks for this report! This indicates an sbrk failure, emulated here
in unexnt.c. If you can, try rebuilding with --enable-debug, you
should then be able to then run winedbg, which has elementary gdb
command capability. Break at sbrk, and step through, please, to see
where the failure occurs. There is a call to the wine-emulated
VirtualAlloc which I'm guessing is returning NULL. After the failure,
you can 'p DisplayError("foo")' to see the error output.
Non-wine related issues could be running with a limited .data segment
size constraint (e.g. ulimit -a), or a general configure error leading
to a bad heap size calculation.
I think wine also has a trace facility which should let you watch
VirtualAlloc. (Maybe set by environment variable as I recall?)
I have been told by the wine developers that the standard wine build
on a 64bit machine is an attempt at win64 emulation and is currently
highly experimental. I doubt this is what you are seeing, but it
might be wise to double check that everything is 32 bit here.
On that note, just a reminder if you could to post that failed win64
configure. That would be most helpful.
Take care,
>
> The system has 8GB of physical memory. Any idea as of why it gcl_pre
> could not allocate?
>
> -- Gaby
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah