Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MegaZeux fails to build after maxmod mm_main splitting #90

Closed
asiekierka opened this issue Oct 18, 2023 · 3 comments
Closed

MegaZeux fails to build after maxmod mm_main splitting #90

asiekierka opened this issue Oct 18, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@asiekierka
Copy link
Contributor

/opt/wonderful/toolchain/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/13.2.0/../../../../arm-none-eabi/bin/ld: /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main9.s.o): in function `mmSuspendIRQ_t':
(.text+0xa2): multiple definition of `mmSuspendIRQ_t'; /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main_ds.s.o):(.text+0x9c): first defined here
/opt/wonderful/toolchain/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/13.2.0/../../../../arm-none-eabi/bin/ld: /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main9.s.o): in function `mmRestoreIRQ_t':
(.text+0xc0): multiple definition of `mmRestoreIRQ_t'; /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main_ds.s.o):(.text+0xb8): first defined here
/opt/wonderful/toolchain/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/13.2.0/../../../../arm-none-eabi/bin/ld: /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_comms.s.o): in function `mmLockChannels':
(.text+0x5c): multiple definition of `mmLockChannels'; /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main_ds.s.o):(.text+0x0): first defined here
/opt/wonderful/toolchain/gcc-arm-none-eabi/lib/gcc/arm-none-eabi/13.2.0/../../../../arm-none-eabi/bin/ld: /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_comms.s.o): in function `mmUnlockChannels':
(.text+0x62): multiple definition of `mmUnlockChannels'; /opt/wonderful/thirdparty/blocksds/core/libs/maxmod/lib/libmm9.a(mm_main_ds.s.o):(.text+0x8a): first defined here
[...]

Reverting blocksds/maxmod@6debcf0#diff-07986c343d7f4a5132293d6b99341a1554d04042fac94e8a8ab33d3f56a66d74 fixes it.

To reproduce:

  1. Clone nds: add BlocksDS port AliceLR/megazeux#359
  2. . arch/nds-blocksds/CONFIG.NDS
  3. make
@AntonioND AntonioND added the bug Something isn't working label Oct 18, 2023
@AntonioND
Copy link
Member

I give up with this code reorganization in maxmod.

I've reverted the commit and released a new version of BlocksDS just for this problem. https://github.com/blocksds/sdk/releases/tag/v0.9.1

@AntonioND
Copy link
Member

AntonioND commented Oct 18, 2023

If someone wants to do some reorganization in maxmod in the future, I've created this test that uses all of the ARM9 maxmod functions just to check for conflicts when linking:

maxmod_all_functions.zip

I could reproduce the issue in this post with that example (a bit easier than using the megazeux repository), but I don't have time to test it right now, so I'd rather revert the patch.

@asiekierka
Copy link
Contributor Author

Fixed, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants