[Ohrrpgce] SVN: james/12141 Docker: add a first-draft attempt at an mxe build environment in a docke

Ralph Versteegen teeemcee at gmail.com
Sat Dec 26 20:28:55 PST 2020


On Sun, 27 Dec 2020 at 10:04, James Paige <Bob at hamsterrepublic.com> wrote:

>
>
> On Wed, Dec 23, 2020 at 9:53 AM Ralph Versteegen <teeemcee at gmail.com>
> wrote:
>
>>
>>
>> On Thu, 24 Dec 2020 at 03:45, Ralph Versteegen <teeemcee at gmail.com>
>> wrote:
>>
>>> Oh, sorry, I did write up instructions for compiling but didn't send
>>> them yet.
>>>
>>> In order to compile a fbc that can target android you of course need to
>>> use https://github.com/rversteegen/fbc.git which I have just merged
>>> upstream master into (and which therefore support emscripten too!) However
>>> this branch doesn't have the mac branch merged into it. That doesn't matter
>>> until we have a cross-compiler that targets Mac. At that point I can merge
>>> them. (Please ignore my androidmac branch, it's very old and I can't even
>>> remember what's going on in it.
>>>
>>> Anyway, to target android it isn't necessary to build the rtlib or
>>> gfxlib2 for it, unlike other platforms, due to our hacky android build
>>> system.
>>>
>>
>> To clarify: I used my android branch and compiled linux 32/64-bit and
>> windows libraries using it to get a multi-target FB installation.
>>
>> Also, I forgot to mention that recently when I tried to compile
>> ohrrpgce-game for Android I found it would crash when entering BROWSE(). I
>> didn't figure out why yet. I wonder whether it's due to something that went
>> wrong when I last merged upstream master into the android branch, back in
>> June. I think I must have successfully compiled for Android more recently
>> than that though. Would like to hear whether it works for you. I haven't
>> tried again since doing the latest merge.
>>
>
> I just tested the Android apk from last night's nightly build, and I was
> able to browse for RPG files with no problems. That was the 32-bit apk on
> an Android 9 phone.
>
> I admit that I almost never test BROWSE() on Android, as I am almost
> always using apk files built for a specific RPG file.
>
> However, today, for me, it works.
>

The nightly build? But which fbc build does that use? Not a recent one?
(I notice SConscript doesn't print version info for android builds; I
should change that)


>
>
>>
>>> #!/bin/sh
>>>
>>> cat <<EOF > config.mk
>>> prefix=$HOME/local/fbc-git
>>> CFLAGS += -Wfatal-errors -g
>>> #FBC := ~/local/fbc-1.05/bin/fbc
>>>
>>> # For some reason mxe puts ffi.h in a separate include dir, so it can't
>>> be found.
>>> # libffi is only needed for FB's ThreadCall operator, which we don't
>>> use, so just disable it.
>>> CFLAGS += -DDISABLE_FFI
>>>
>>> EOF
>>>
>>> # Compiler and includes
>>> make compiler install-compiler install-includes -j6  || exit 1
>>> # Linux x86 libraries
>>> make rtlib install-rtlib gfxlib2 install-gfxlib2 MULTILIB=32 -j6  ||
>>> exit 1
>>> # Linux x86_64
>>> make rtlib install-rtlib gfxlib2 install-gfxlib2 MULTILIB=64 -j6  ||
>>> exit 1
>>> make unit-tests  || exit 1
>>> # Note: make doesn't return false if any log-tests fail. A number do
>>> fail,
>>> # should doublecheck none are due to changes on the android branch.
>>> #make log-tests  || exit 1
>>> # Windows x86 (using mxe; mxe's usr/bin must be in PATH)
>>> make rtlib install-rtlib gfxlib2 install-gfxlib2
>>> TARGET=i686-w64-mingw32.static -j6  || exit 1
>>>
>>> # The following are for compiling commandline Android test programs, but
>>> NOT needed for Game/Custom builds.
>>> # export PATH=$HOME/local/android-toolchain-r12b-api9-arm/bin:$PATH
>>> # export PATH=$HOME/local/android-toolchain-r12b-api17-x86/bin:$PATH
>>> # make rtlib install-rtlib TARGET=arm-linux-androideabi -j6  || exit 1
>>> # make rtlib install-rtlib TARGET=i686-linux-android -j6  || exit 1
>>>
>>>
>>>
>>> On Wed, 23 Dec 2020 at 09:38, James Paige <Bob at hamsterrepublic.com>
>>> wrote:
>>>
>>>> Right now this always fails in the step that does:
>>>>
>>>> RUN make TARGET=i686-w64-mingw32.static prefix=/usr/local/ rtlib
>>>> gfxlib2 install-rtlib install-gfxlib2
>>>>
>>>> It fails with this error message about ffi.h
>>>>
>>>> CC src/rtlib/obj/win32/sys_portio.o
>>>> CC src/rtlib/obj/win32/sys_rmdir.o
>>>> CC src/rtlib/obj/win32/sys_run.o
>>>> CC src/rtlib/obj/win32/sys_shell.o
>>>> CC src/rtlib/obj/win32/thread_call.o
>>>> src/rtlib/thread_call.c:33:17: fatal error: ffi.h: No such file or
>>>> directory
>>>> compilation terminated.
>>>> makefile:554: recipe for target 'src/rtlib/obj/win32/thread_call.o'
>>>> failed
>>>> make: *** [src/rtlib/obj/win32/thread_call.o] Error 1
>>>> The command '/bin/sh -c make TARGET=i686-w64-mingw32.static
>>>> prefix=/usr/local/ rtlib gfxlib2 install-rtlib install-gfxlib2' returned a
>>>> non-zero code: 2
>>>>
>>>> libffi-dev is definitely installed, so i don't know what the problem is.
>>>>
>>>> I tried skipping libffi with CFLAGS=-DDISABLE_FFI per the instructions
>>>> in https://rpg.hamsterrepublic.com/ohrrpgce/Cross-compiling but that
>>>> made no difference.
>>>>
>>>> I also tried switching from https://github.com/freebasic/fbc.git to
>>>> https://github.com/rversteegen/fbc for the FBC sources, and that
>>>> didn't help either (unless maybe I needed to use a specific branch?)
>>>>
>>>> Anyway, I'll look at it more later. This was as far as I got today :D
>>>>
>>>> ---
>>>> James Paige
>>>>
>>>> On Tue, Dec 22, 2020 at 3:32 PM <subversion at hamsterrepublic.com> wrote:
>>>>
>>>>> james
>>>>> 2020-12-22 12:32:41 -0800 (Tue, 22 Dec 2020)
>>>>> 158
>>>>> Docker: add a first-draft attempt at an mxe build environment in a
>>>>> docker container.
>>>>>
>>>>> This does not work yet, but will provide a base for further
>>>>> improvements
>>>>> ---
>>>>> A   wip/docker/ohrrpgce-mxe-build-env/
>>>>> A   wip/docker/ohrrpgce-mxe-build-env/Dockerfile
>>>>>
>>>>> _______________________________________________
>>>>> Ohrrpgce mailing list
>>>>> ohrrpgce at lists.motherhamster.org
>>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>>
>>>> _______________________________________________
>>>> Ohrrpgce mailing list
>>>> ohrrpgce at lists.motherhamster.org
>>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>>>
>>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20201227/fc0e015b/attachment.html>


More information about the Ohrrpgce mailing list