lennardwalter / nwDoom

Doom port for the numworks graphing calculator
GNU General Public License v3.0
24 stars 1 forks source link

How to compile? #1

Closed ghost closed 3 years ago

ghost commented 3 years ago

When I try to compile Doom with Omega, I get this:

Makefile:29: HOME_DISPLAY_EXTERNALS is set but external isn't included, ignoring flag.
ICON    apps/exam_icon.png
I18N    apps/i18n.cpp
QSTRDAT python/port/genhdr/qstrdefs.generated.h
THEME   escher/palette.h
ICON    apps/doom/doom_icon.png
HOSTCC  escher/image/inliner
ICON    apps/on_boarding/logo_icon.png
ICON    apps/settings/settings_icon.png
CXX     ion/src/device/shared/usb/boot.o
 (!!)   Icon apps/doom/doom_icon.png not found in icon theme omega_dark. Using default!
HOSTCC  kandinsky/fonts/rasterizer
CXX     ion/src/device/n0110/drivers/board.o
CXX     ion/src/device/n0110/drivers/cache.o
CXX     ion/src/device/n0110/drivers/reset.o
CXX     ion/src/device/shared/drivers/backlight.o
CXX     ion/src/device/shared/drivers/base64.o
CXX     ion/src/device/shared/drivers/battery.o
CXX     ion/src/device/shared/drivers/board.o
CXX     ion/src/device/shared/drivers/console_uart.o
CXX     ion/src/device/shared/drivers/crc32.o
CXX     ion/src/device/shared/drivers/display.o
CXX     ion/src/device/shared/drivers/events_keyboard_platform.o
CXX     ion/src/device/shared/drivers/external_flash.o
CXX     ion/src/device/shared/drivers/flash.o
CXX     ion/src/device/shared/drivers/internal_flash.o
CXX     ion/src/device/shared/drivers/keyboard.o
CXX     ion/src/device/shared/drivers/led.o
CXX     ion/src/device/shared/drivers/power.o
CXX     ion/src/device/shared/drivers/random.o
CXX     ion/src/device/shared/drivers/reset.o
CXX     ion/src/device/shared/drivers/serial_number.o
CXX     ion/src/device/shared/drivers/swd.o
CXX     ion/src/device/shared/drivers/timing.o
CXX     ion/src/device/shared/drivers/usb.o
CXX     ion/src/device/shared/drivers/wakeup.o
CXX     ion/src/device/shared/usb/calculator.o
CXX     ion/src/device/shared/usb/dfu_interface.o
CXX     ion/src/device/shared/usb/stack/descriptor/bos_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/configuration_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/device_capability_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/device_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/dfu_functional_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/extended_compat_id_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/interface_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/language_id_string_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/microsoft_os_string_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/platform_device_capability_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/string_descriptor.o
CXX     ion/src/device/shared/usb/stack/descriptor/url_descriptor.o
CXX     ion/src/device/shared/usb/stack/device.o
CXX     ion/src/device/shared/usb/stack/descriptor/webusb_platform_descriptor.o
CXX     ion/src/device/shared/usb/stack/endpoint0.o
CXX     ion/src/device/shared/usb/stack/interface.o
CXX     ion/src/device/shared/usb/stack/request_recipient.o
CXX     ion/src/device/shared/usb/stack/setup_packet.o
CXX     ion/src/device/shared/usb/stack/streamable.o
CC      liba/src/assert.o
CC      liba/src/memcpy.o
CC      liba/src/memset.o
CC      liba/src/strlcpy.o
CC      liba/src/strlen.o
CXX     libaxx/src/cxxabi/pure_virtual.o
RASTER  kandinsky/fonts/LargeFont.cpp
RASTER  kandinsky/fonts/SmallFont.cpp
CXX     apps/alternate_empty_nested_menu_controller.o
CXX     apps/apps_container.o
CXX     apps/apps_container_launch_default.o
CXX     apps/apps_container_prompt_none.o
CXX     apps/apps_container_storage.o
CXX     apps/apps_window.o
CXX     apps/backlight_dimming_timer.o
CXX     apps/battery_timer.o
CXX     apps/battery_view.o
INLINER apps/doom/doom_icon.cpp
CXX     apps/doom/doom_controller.o
CXX     apps/doom/doom_view.o
CC      apps/doom/engine/am_map.o
CC      apps/doom/engine/d_event.o
In file included from apps/doom/engine/doomtype.h:63,
                 from apps/doom/engine/deh_main.h:21,
                 from apps/doom/engine/am_map.c:22:
/usr/include/inttypes.h:290:8: error: unknown type name 'intmax_t'
  290 | extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
      |        ^~~~~~~~
/usr/include/inttypes.h:290:26: error: unknown type name 'intmax_t'
  290 | extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
      |                          ^~~~~~~~
/usr/include/inttypes.h:293:27: error: unknown type name 'intmax_t'
  293 | extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      |                           ^~~~~~~~
/usr/include/inttypes.h:293:45: error: unknown type name 'intmax_t'
  293 | extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      |                                             ^~~~~~~~
/usr/include/inttypes.h:297:8: error: unknown type name 'intmax_t'
  297 | extern intmax_t strtoimax (const char *__restrict __nptr,
      |        ^~~~~~~~
/usr/include/inttypes.h:301:8: error: unknown type name 'uintmax_t'
  301 | extern uintmax_t strtoumax (const char *__restrict __nptr,
      |        ^~~~~~~~~
/usr/include/inttypes.h:305:8: error: unknown type name 'intmax_t'
  305 | extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
      |        ^~~~~~~~
/usr/include/inttypes.h:310:8: error: unknown type name 'uintmax_t'
  310 | extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
      |        ^~~~~~~~~
In file included from apps/doom/engine/deh_main.h:23,
                 from apps/doom/engine/am_map.c:22:
apps/doom/engine/am_map.c: In function 'AM_loadPics':
apps/doom/engine/deh_str.h:41:22: warning: implicit declaration of function 'snprintf' [-Wimplicit-function-declaration]
   41 | #define DEH_snprintf snprintf
      |                      ^~~~~~~~
apps/doom/engine/am_map.c:487:2: note: in expansion of macro 'DEH_snprintf'
  487 |  DEH_snprintf(namebuf, 9, "AMMNUM%d", i);
      |  ^~~~~~~~~~~~
apps/doom/engine/am_map.c:47:1: note: 'snprintf' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
   46 | #include "am_map.h"
  +++ |+#include <stdio.h>
   47 | 
In file included from apps/doom/engine/deh_main.h:23,
                 from apps/doom/engine/am_map.c:22:
apps/doom/engine/am_map.c: In function 'AM_drawFline':
apps/doom/engine/deh_str.h:40:21: warning: implicit declaration of function 'fprintf'; did you mean 'M_snprintf'? [-Wimplicit-function-declaration]
   40 | #define DEH_fprintf fprintf
      |                     ^~~~~~~
apps/doom/engine/am_map.c:1006:9: note: in expansion of macro 'DEH_fprintf'
 1006 |         DEH_fprintf(stderr, "fuck %d \r", fuck++);
      |         ^~~~~~~~~~~
apps/doom/engine/am_map.c:1006:21: error: 'stderr' undeclared (first use in this function)
 1006 |         DEH_fprintf(stderr, "fuck %d \r", fuck++);
      |                     ^~~~~~
apps/doom/engine/am_map.c:1006:21: note: 'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
apps/doom/engine/am_map.c:1006:21: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/rules.mk:10: output/release/device/n0110/apps/doom/engine/am_map.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from apps/doom/engine/doomtype.h:63,
                 from apps/doom/engine/d_event.h:24,
                 from apps/doom/engine/d_event.c:23:
/usr/include/inttypes.h:290:8: error: unknown type name 'intmax_t'
  290 | extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
      |        ^~~~~~~~
/usr/include/inttypes.h:290:26: error: unknown type name 'intmax_t'
  290 | extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));
      |                          ^~~~~~~~
/usr/include/inttypes.h:293:27: error: unknown type name 'intmax_t'
  293 | extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      |                           ^~~~~~~~
/usr/include/inttypes.h:293:45: error: unknown type name 'intmax_t'
  293 | extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      |                                             ^~~~~~~~
/usr/include/inttypes.h:297:8: error: unknown type name 'intmax_t'
  297 | extern intmax_t strtoimax (const char *__restrict __nptr,
      |        ^~~~~~~~
/usr/include/inttypes.h:301:8: error: unknown type name 'uintmax_t'
  301 | extern uintmax_t strtoumax (const char *__restrict __nptr,
      |        ^~~~~~~~~
/usr/include/inttypes.h:305:8: error: unknown type name 'intmax_t'
  305 | extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
      |        ^~~~~~~~
/usr/include/inttypes.h:310:8: error: unknown type name 'uintmax_t'
  310 | extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
      |        ^~~~~~~~~
make: *** [build/rules.mk:10: output/release/device/n0110/apps/doom/engine/d_event.o] Error 1
lennardwalter commented 3 years ago

It currently doesn't compile for the calculator because some functions are missing in liba like fprintf. Also, it doesn't work on Omega because of the theming, you'd need to add the icon to icons.json manually. I'm not sure what the best way to handle that is though (probably just making it an external app). To sum it up: It only works for the epsilon simulator right now. Even if I'd fix all the missing functions, the calc wouldn't be able to run it because of memory restrictions. However, feel free to open a pull request and contribute :)

ghost commented 3 years ago

It currently doesn't compile for the calculator because some functions are missing in liba like fprintf. Also, it doesn't work on Omega because of the theming, you'd need to add the icon to icons.json manually. I'm not sure what the best way to handle that is though (probably just making it an external app). To sum it up: It only works for the epsilon simulator right now. Even if I'd fix all the missing functions, the calc wouldn't be able to run it because of memory restrictions. However, feel free to open a pull request and contribute :)

Ah so it isn't my fault (completely). I did add the icon to the icons.json and theme folder I was using. I guess I can rename this issue to "make available for actual calculators" or something like that. Wait, the calc isn't even capable of it? You sure you couldn't lower the quality enough or do some more hacks like on ticalcs?

I feel like this is some way possible. I'm not sure if it should be me to do this nor do I think I have the skill, but the next thing could be to make a scaled-down version compatible with real calculators.

ghost commented 3 years ago

I also just realised that there's no license or copyright notice at all, you should probably attend to that.

ghost commented 3 years ago

Ok, you were right, it works in the simulator.