bhargavdas / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
0 stars 0 forks source link

Build error multiple macros not defined #1

Closed bhargavdas closed 1 year ago

bhargavdas commented 1 year ago

Build log:

$ make CONFIG_QEMU=y -j16 
Using /usr/bin/arm-none-eabi-gcc (from PATH).
[ VERSION  ]   ../../platform/1200D.102/version.bin
[ CPP      ]   magiclantern.lds
[ AS       ]   entry.o
../../build_tools/git_summary.py >> ../../platform/1200D.102/version.bin
[ AS       ]   ../../platform/1200D.102/stubs.o
[ VERSION  ]   ../../platform/1200D.102/version.c
mv tmp.lds magiclantern.lds
../../build_tools/git_summary.py >> ../../platform/1200D.102/version.c
[ CC       ]   task_utils.o
[ CC       ]   backtrace.o
[ CC       ]   sgi.o
[ CC       ]   cpu.o
[ CC       ]   mmu_utils.o
[ CC       ]   patch_mmu.o
[ CC       ]   boot-d45.o
[ CC       ]   init.o
[ CC       ]   fio-ml.o
[ CC       ]   mem.o
[ CC       ]   ico.o
[ CC       ]   edmac.o
[ CC       ]   menu.o
[ CC       ]   debug.o
[ CC       ]   rand.o
[ CC       ]   posix.o
[ CC       ]   util.o
[ CC       ]   imath.o
[ CC       ]   electronic_level.o
[ CC       ]   cfn.o
[ CC       ]   gui.o
[ CC       ]   picstyle.o
[ CC       ]   exmem.o
[ CC       ]   compositor.o
[ CC       ]   bmp.o
[ CC       ]   rbf_font.o
[ CC       ]   config.o
[ CC       ]   stdio.o
[ CC       ]   bitrate.o
[ CC       ]   lcdsensor.o
../../src/stdio.c: In function 'snprintf':
../../src/stdio.c:87:8: warning: nonnull argument 'fmt' compared to NULL [-Wnonnull-compare]
     if (fmt == NULL)
        ^
[ CC       ]   tweaks.o
[ CC       ]   tweaks-eyefi.o
[ CC       ]   lens.o
[ CC       ]   property.o
[ CC       ]   propvalues.o
[ CC       ]   gui-common.o
[ CC       ]   chdk-gui_draw.o
[ CC       ]   movtweaks.o
[ CC       ]   menuhelp.o
[ CC       ]   menuindex.o
[ CC       ]   af_patterns.o
[ CC       ]   focus.o
[ CC       ]   notify_box.o
[ CC       ]   bootflags.o
[ CC       ]   dialog_test.o
[ CC       ]   vram.o
[ CC       ]   greenscreen.o
[ CC       ]   fps-engio.o
[ CC       ]   shoot.o
[ CC       ]   hdr.o
[ CC       ]   lv-img-engio.o
[ CC       ]   state-object.o
[ CC       ]   tasks.o
[ CC       ]   vsync-lite.o
../../src/fps-engio.c: In function 'calc_tg_freq':
../../src/fps-engio.c:343:14: error: 'TG_FREQ_BASE' undeclared (first use in this function)
     int f = (TG_FREQ_BASE / timerA) * 1000 + MOD(TG_FREQ_BASE, timerA) * 1000 / timerA;
              ^~~~~~~~~~~~
../../src/fps-engio.c:343:14: note: each undeclared identifier is reported only once for each function it appears in
[ CC       ]   tskmon.o
../../src/fps-engio.c: In function 'fps_timer_print':
../../src/fps-engio.c:1128:21: error: 'FPS_TIMER_A_MIN' undeclared (first use in this function); did you mean 'FPS_TIMER_B_MIN'?
     int t_min = A ? FPS_TIMER_A_MIN : FPS_TIMER_B_MIN;
                     ^~~~~~~~~~~~~~~
                     FPS_TIMER_B_MIN
In file included from ../../src/gui-common.h:5,
                 from ../../src/dryos.h:38,
                 from ../../src/fps-engio.c:34:
../../src/fps-engio.c: In function 'tg_freq_print':
../../src/fps-engio.c:1157:9: error: 'TG_FREQ_BASE' undeclared (first use in this function); did you mean 'TG_FREQ_FPS'?
         TG_FREQ_BASE / 1000000, (TG_FREQ_BASE % 1000000) / 10000
         ^~~~~~~~~~~~
../../src/menu.h:84:102: note: in definition of macro 'MENU_SET_VALUE'
 #define MENU_SET_VALUE(fmt, ...)       snprintf(info->value,       MENU_MAX_VALUE_LEN,       fmt, ## __VA_ARGS__)
                                                                                                      ^~~~~~~~~~~
../../src/fps-engio.c: In function 'fps_try_to_get_exact_freq':
../../src/fps-engio.c:1186:18: error: 'FPS_TIMER_A_MIN' undeclared (first use in this function); did you mean 'FPS_TIMER_B_MIN'?
     for (int t = FPS_TIMER_A_MIN; t < FPS_TIMER_A_MAX; t+= 2)
                  ^~~~~~~~~~~~~~~
                  FPS_TIMER_B_MIN
[ CC       ]   battery.o
../../src/fps-engio.c: In function 'fps_try_to_get_180_360_shutter':
../../src/fps-engio.c:1219:21: error: 'TG_FREQ_BASE' undeclared (first use in this function); did you mean 'TG_FREQ_FPS'?
     int Ta_approx = TG_FREQ_BASE / fps_x1000 * 1000 / 2 / Tb0;
                     ^~~~~~~~~~~~
                     TG_FREQ_FPS
../../src/fps-engio.c: In function 'fps_setup_timerA':
../../src/fps-engio.c:1309:22: error: 'TG_FREQ_BASE' undeclared (first use in this function); did you mean 'TG_FREQ_FPS'?
             timerA = TG_FREQ_BASE / fps_x1000 * 1000 / fps_timer_b_orig;
                      ^~~~~~~~~~~~
                      TG_FREQ_FPS
[ CC       ]   imgconv.o
In file included from ../../src/dryos.h:50,
                 from ../../src/fps-engio.c:34:
../../src/fps-engio.c:1352:29: error: 'FPS_TIMER_A_MIN' undeclared (first use in this function); did you mean 'FPS_TIMER_B_MIN'?
     timerA = COERCE(timerA, FPS_TIMER_A_MIN, timerA_max);
                             ^~~~~~~~~~~~~~~
../../src/imath.h:28:24: note: in definition of macro 'MAX'
    ({ __typeof__ ((a)+(b)) _a = (a); \
                        ^
../../src/fps-engio.c:1352:14: note: in expansion of macro 'COERCE'
     timerA = COERCE(timerA, FPS_TIMER_A_MIN, timerA_max);
              ^~~~~~
[ CC       ]   histogram.o
make: *** [../../Makefile.filerules:25: fps-engio.o] Error 1
make: *** Waiting for unfinished jobs....
bhargavdas commented 1 year ago

Fixed : https://github.com/bhargavdas/magiclantern_simplified/commit/80eb4430586be9a26e4de970ce72fd44d8ab4cb8