ra1npoc icon indicating copy to clipboard operation
ra1npoc copied to clipboard

[BUG] Duplicate symbol debug_enabled

Open badger200 opened this issue 1 year ago • 1 comments

When I build this on iOS I always fail with:


duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/payload-89202a.o
duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/limera1n-4db8c7.o
duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/s5l8950x-56592b.o
duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/iousb-d1a8f6.o
duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/common-c42f5d.o
duplicate symbol '_debug_enabled' in:
    /var/tmp/main-d46c05.o
    /var/tmp/checkm8_arm64-058c5f.o
ld: 6 duplicate symbols for architecture arm64

badger200 avatar Apr 09 '23 05:04 badger200

I spent two hours tinkering with commenting out bool debug_enabled / changing it to extern bool in the various locations like main.c, include/io/iousb.h etc and somehow got it to finally compile.

The key was to comment out main.c: extern bool debug_enabled, and change src/include/io/iousb.h bool debug_enabled to be an extern bool.

I'd love to see how anyone is able to get this to compile as-is without encountering these duplicate symbol errors for all the _debug_enabled symbols.

badger200 avatar Apr 20 '23 11:04 badger200