FreeDos build needs update #2560
Comments
Most definitely it should be. The main purpose of presence of FatFs is unix build is unit testing, and it's enabled only in coverage build. |
So what exactly it crashes on? On producing map file? Please have an upstream bug reference ready and include it as a comment, to explain why suddenly freedos build doesn't produce a map. |
But map file generated (don't really know if it is finished). |
|
@pohmelie : So, to not leave this hanging on a half-word - as a freedos port maintainer, you would need to come up with the best way to resolve all this. Recommendation from a micropython maintainer is above (make sure it's reported upstream, then maybe in some half year it's - surprise - fixed), but we unlikely will be able to help much, as we're busy with esp8266 port, etc., so please use your best judgement, the aim is of course have a working freedos port. Thanks. |
|
@pohmelie using the fix commit in my freedos branch I was able to build working binary of micropython that works in dosbox. |
|
@prusnak, I can't check it right now, but if so, then I think it is a good place for pull request. |
|
@pohmelie I have no idea whether macro definitions belong to Also the following: is included in |
|
@prusnak, ok, I will try your fix ASAP. |
|
@prusnak $ PATH=/home/broomrider/tmp/upython/djgpp-6.2.0/bin/:$PATH make freedos
...
CC ../py/formatfloat.c
In file included from ../py/mpconfig.h:43:0,
from ../py/formatfloat.c:27:
/home/broomrider/tmp/upython/djgpp-6.2.0/lib/gcc/i586-pc-msdosdjgpp/6.2.0/include-fixed/math.h:210:15: error: expected identifier or '(' before 'double'
extern double trunc(double);
^
./mpconfigport_freedos.h:83:27: error: expected ')' before '?' token
#define trunc(X) ((X > 0) ? floor(X) : ceil(X))
^
/home/broomrider/tmp/upython/djgpp-6.2.0/lib/gcc/i586-pc-msdosdjgpp/6.2.0/include-fixed/math.h:216:15: error: expected identifier or '(' before 'double'
extern double round(double);
^
./mpconfigport_freedos.h:81:27: error: expected ')' before '?' token
#define round(X) ((X > 0) ? floor(X + 0.5) : ceil(X - 0.5))
^
/home/broomrider/tmp/upython/djgpp-6.2.0/lib/gcc/i586-pc-msdosdjgpp/6.2.0/include-fixed/math.h:240:14: error: expected identifier or '(' before 'float'
extern float truncf(float);
^
./mpconfigport_freedos.h:84:28: error: expected ')' before '?' token
#define truncf(X) ((X > 0) ? floorf(X) : ceilf(X))
^
/home/broomrider/tmp/upython/djgpp-6.2.0/lib/gcc/i586-pc-msdosdjgpp/6.2.0/include-fixed/math.h:243:14: error: expected identifier or '(' before 'float'
extern float roundf(float);
^
./mpconfigport_freedos.h:82:28: error: expected ')' before '?' token
#define roundf(X) ((X > 0) ? floorf(X + 0.5) : ceilf(X - 0.5))
^
../py/mkrules.mk:47: recipe for target 'build-freedos/py/formatfloat.o' failed
make[1]: *** [build-freedos/py/formatfloat.o] Error 1
make[1]: Leaving directory '/home/broomrider/tmp/upython/micropython/unix'
Makefile:225: recipe for target 'freedos' failed
make: *** [freedos] Error 2It looks like there is something wrong with defines at lines 81-84 of micropython_freedos.h And I have same segfault on linker after I comment those lines. How did you build your binary? |
|
I think I was using old version of djgpp. That's why I needed to define round[f]/trunc[f] stuff and others.I might look into upgrading it and looking into it, but no promises. |
|
I was able to update DJGPP to 6.2.0 and reproduce the crash. It is
commit for reference: prusnak@a97e088 |
|
@prusnak |
|
Yes, latest on the command line wins. Feel free to fix more correctly if needed, but this works for me and does not increase complexity of makefile too much. |
|
pull #2644 |
|
Let's close this issue if there is a pull request for this ... |
Tried to make FreeDos build on dev version and got some issues:
After fixing this everything build fine.
The text was updated successfully, but these errors were encountered: