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

James Paige Bob at hamsterrepublic.com
Sun Dec 27 16:24:55 PST 2020


Oh, nevermind! I accidentally added libgmp-dev instead of libgpm-dev

So that fixed that failure, but now I am getting another ffi-h failure in a
different place.

I'll keep at it. :D

---
James Paige


On Sun, Dec 27, 2020 at 5:59 PM James Paige <Bob at hamsterrepublic.com> wrote:

> No luck, including libgpm-dev in the container does not make any difference
>
> On Sat, Dec 26, 2020 at 11:25 PM Ralph Versteegen <teeemcee at gmail.com>
> wrote:
>
>> You need the gpm library. It might be called libgpm-dev in ubuntu.
>>
>> On Sun, 27 Dec 2020 at 10:33, James Paige <Bob at hamsterrepublic.com>
>> wrote:
>>
>>> Okay! Thank you for all those good clarifications.
>>>
>>> I tried to incorporate them into my Dockerfile, but no luck yet. Right
>>> now it is failing with
>>>
>>> CC src/rtlib/obj/linux-x86/io_print.o
>>> CC src/rtlib/obj/linux-x86/io_print_bool.o
>>> src/rtlib/linux/io_mouse.c:17:17: fatal error: gpm.h: No such file or
>>> directory
>>>  #include <gpm.h>
>>>                  ^
>>> compilation terminated.
>>> makefile:670: recipe for target 'src/rtlib/obj/linux-x86/io_mouse.o'
>>> failed
>>> make: *** [src/rtlib/obj/linux-x86/io_mouse.o] Error 1
>>> make: *** Waiting for unfinished jobs....
>>> The command '/bin/sh -c make compiler install-compiler install-includes
>>> -j6     && make rtlib install-rtlib gfxlib2 install-gfxlib2 MULTILIB=32 -j6
>>>     && make rtlib install-rtlib gfxlib2 install-gfxlib2 MULTILIB=64 -j6
>>> && make unit-tests     && echo "Done make linux and unit tests..."'
>>> returned a non-zero code: 2
>>>
>>>
>>>
>>> On Wed, Dec 23, 2020 at 7:31 PM Ralph Versteegen <teeemcee at gmail.com>
>>> wrote:
>>>
>>>> It isn't necessary to use a config.mk file. I ran
>>>> make rtlib install-rtlib gfxlib2 install-gfxlib2
>>>> TARGET=i686-w64-mingw32.static prefix=$HOME/local/fbc-git CFLAGS="-g
>>>> -DDISABLE_FFI"
>>>> and it worked for me. This should have worked regardless of which fbc
>>>> branch you were on; I didn't add that flag.
>>>>
>>>> Then I had a look at mxe's libffi test program and found that they use
>>>> pkg-config to get the include path. The following works:
>>>> TARGET=i686-w64-mingw32.static
>>>> make rtlib install-rtlib gfxlib2 install-gfxlib2 TARGET=$TARGET
>>>> prefix=$HOME/local/fbc-git CFLAGS="-g `$TARGET-pkg-config libffi --cflags`"
>>>> I'm guessing that ffi.h is hidden like this because it's arch-specific,
>>>> unlike normal headers.
>>>>
>>>> On Thu, 24 Dec 2020 at 03:54, Ralph Versteegen <teeemcee at gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, 24 Dec 2020 at 03:52, 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
>>>>>>>
>>>>>>
>>>>> Argh, when I copy-pasted that link from github I failed to realise it
>>>>> didn't include the branch name. I meant my android branch from there.
>>>>>
>>>>>
>>>>>> 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.
>>>>>>
>>>>>>
>>>>>>> #!/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
>>>
>> _______________________________________________
>> 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/e1223816/attachment-0001.html>


More information about the Ohrrpgce mailing list