Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: Whr on February 12, 2021, 03:18:54 PM

Title: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 12, 2021, 03:18:54 PM
When I'm trying to build an iso-research firmware for 500D.I met some errors. I have no idea why.

make[4]: Entering directory '/root/magic-lantern/modules/raw_diag'

Building module raw_diag...
[ HGDIFF   ]   hgdiff.tmp
[ MODULE   ]   raw_diag.mo
[ STRIP    ]   raw_diag.mo
[ OBJCOPY  ]   raw_diag.mo
[ RM       ]   hgdiff.tmp
[ EXPORTS  ]   raw_diag.sym
[ DEPENDS  ]   raw_diag.dep
Will load on:
    500D
Not checked (compile ML for these cameras first):
    100D, 1100D, 50D, 550D, 5D2, 5D3.113, 5D3.123, 600D, 60D, 650D, 6D, 700D, 7D, EOSM
make[4]: Leaving directory '/root/magic-lantern/modules/raw_diag'
make[3]: Leaving directory '/root/magic-lantern/modules'
[ MKDIR    ]   ML directory structure...
cp ../modules/*/*.mo /root/magic-lantern/platform/500D.111/zip/ML/modules/
make[2]: Leaving directory '/root/magic-lantern/modules'
make[1]: Leaving directory '/root/magic-lantern/platform/500D.111'
make -C ../../installer/500D.111 autoexec-fir.bin
make[1]: Entering directory '/root/magic-lantern/installer/500D.111'
[ VERSION  ]   ../../platform/500D.111/version.bin
[ VERSION  ]   ../../platform/500D.111/version.c
[ CC       ]   version.o
[ LD       ]   magiclantern
bmp.o: In function `BMP_VRAM_START':
/root/magic-lantern/installer/500D.111/../../src/bmp.c:45: undefined reference to `sound_recording_enabled_canon'
/root/magic-lantern/installer/500D.111/../../src/bmp.c:80: undefined reference to `__recording'
../../src/Makefile.src:206: recipe for target 'magiclantern' failed
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory '/root/magic-lantern/installer/500D.111'
../../platform/Makefile.platform.extras:53: recipe for target 'installer_check' failed
make: *** [installer_check] Error 2
root@ubuntu:~/magic-lantern/platform/500D.111#


Here is my full log https://pasteme.cn/106135 (https://pasteme.cn/106135)
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: names_are_hard on February 12, 2021, 04:16:20 PM
You'll need to investigate the error logs, see here:
Quote
/root/magic-lantern/installer/500D.111/../../src/bmp.c:45: undefined reference to `sound_recording_enabled_canon'
A common cause for these kinds of errors is some ifdef that doesn't properly account for the configuration you're using.  Either in bmp.c near the line in the error, or in whatever file defines sound_recording_enabled_canon, such that the symbol never gets defined for your chosen config.

I would *strongly* recommend not running builds as root!  Changing that could conceivably fix this error, but is a good idea either way.
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 21, 2021, 10:41:46 AM

(https://i.loli.net/2021/02/21/DkKhIlvCUL7GzfW.png)

I found a commit for a 500D build fix in the branch lua_fix
So I modified the file src/installer.c in the branch that I had cloned.Despite the fact that I can compile normally,the firmware didn't work properly on my 500D.
Error embodied in cannot normal shutdown, even using switch is turned off, the camera on the blue and red leds don't turn off,and there's no plugin section in ML.
I don't know what I should do next
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: names_are_hard on February 21, 2021, 07:18:26 PM
We need more information about what you did.  If you took a single change from lua_fix branch and applied it to a different branch, there is no guarantee it will work.

What repo, branch and commit are you starting from?  Do you have much experience working with C?
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 22, 2021, 02:46:27 PM
Sorry, I have no basis for C.
I am trying to compile the firmware from this commit for the 500D iso-research firmware.https://foss.heptapod.net/magic-lantern/magic-lantern/-/commit/9a9124dc59969f18cf42598d7f3766179a9c38c1 (https://foss.heptapod.net/magic-lantern/magic-lantern/-/commit/9a9124dc59969f18cf42598d7f3766179a9c38c1)
I met these errors, as mentioned above.No matter whether to use root compilation, problems still exist
Here is my full log https://paste.ubuntu.com/p/VRJMpvMQYS/ (https://paste.ubuntu.com/p/VRJMpvMQYS/)
bmp.o: In function `BMP_VRAM_START':
/root/magic-lantern-9a9124dc59969f18cf42598d7f3766179a9c38c1/installer/500D.111/../../src/bmp.c:45: undefined reference to `sound_recording_enabled_canon'
/root/magic-lantern-9a9124dc59969f18cf42598d7f3766179a9c38c1/installer/500D.111/../../src/bmp.c:80: undefined reference to `__recording'
../../src/Makefile.src:206: recipe for target 'magiclantern' failed
make[1]: *** [magiclantern] Error 1
make[1]: Leaving directory '/root/magic-lantern-9a9124dc59969f18cf42598d7f3766179a9c38c1/installer/500D.111'
../../platform/Makefile.platform.extras:53: recipe for target 'installer_check' failed
make: *** [installer_check] Error 2
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: names_are_hard on February 22, 2021, 03:53:34 PM
I can confirm that it also doesn't build for me, with the same error, but I have no idea if the iso-research branch is supposed to be in a broken state or not (it definitely won't build on modern systems as it doesn't have the required fixes for modern Make, or python2).  I don't know why you're trying to build from that branch.  Taking random changes from other branches is not likely to fix your problem.

It looks to me that the reason it's not linking is because bmp.o needs audio-ak.o in order to get sound_recording_enabled_canon symbol, but it wasn't obvious to me how to add that dependency in a clean way.
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 23, 2021, 12:05:36 AM
I tried to build the firmware using the ISO-research branch in order to run the ADTG-GUI on my 500D and get less noise.
Thanks
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 23, 2021, 01:12:48 PM
Is there any other way to get my camera to run adtg_gui?
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: names_are_hard on February 23, 2021, 02:30:52 PM
I would ask in the ADTG_GUI thread about how to get that build running :)
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Whr on February 23, 2021, 03:40:24 PM
Thanks a lot. ;)
And I am looking forward to your reply.
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: names_are_hard on February 23, 2021, 03:44:38 PM
I don't have a reply to give, I don't know about the adtg_gui.  That's why I'm suggesting you ask the people who use it :)
Title: Re: 500D err bmp.o: In function `BMP_VRAM_START':
Post by: Audionut on February 26, 2021, 05:19:51 AM
Looks like it broke somewhere in between build #5 (https://builds.magiclantern.fm/jenkins/view/Experiments/job/iso_research/5/) and build #6 (https://builds.magiclantern.fm/jenkins/view/Experiments/job/iso_research/6/).

Quite a few changes pushed in #6, including the merge of lua_fix. No time to pursue further, but there's a working build from the lua_fix experiment (https://builds.magiclantern.fm/experiments.html).

I would hunt back through lua_fix and find the relevant changes in that branch.

edit: log shows 500D should have been fixed in #451 (https://builds.magiclantern.fm/jenkins/view/Experiments/job/lua_fix/451/), which includes the commit you already found.

500D broke here: https://builds.magiclantern.fm/jenkins/view/Experiments/job/lua_fix/446/