platformio / platform-intel_mcs51

Intel MCS-51 (8051): development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/intel_mcs51
Apache License 2.0
56 stars 45 forks source link

linker warning noise? #6

Closed zerog2k closed 6 years ago

zerog2k commented 6 years ago

linker is warning about some duplicate symbols - I assume some sort of conflict or overlap between my built-in sdcc (from homebrew) vs the pio toolchain-sdcc It doesn't appear to cause any problem that I can see, but maybe confusing for users? Any ideas what might be going on?

hackpro:blinky jens$ pio run -v
[Fri Feb  9 09:30:51 2018] Processing stc15f204ea (platform: https://github.com/platformio/platform-mcs51.git; extra_scripts: extra_script.py; upload_port: /dev/ttyUSB0; board: stc15f204ea; upload_protocol: stcgal)
---------------------------------------------------------------------------------------------------------------------------------------------------
Platform: MCS 8051/8052 > stc15f204ea
System: MCS51 11MHz
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
Modes: Finder/chain Compatibility/light
Collected 0 compatible libraries
Scanning dependencies...
No dependencies
custom extra_script launching...
sdcc -o .pioenvs/stc15f204ea/src/blinky.rel -c --std-sdcc11 --opt-code-size --peep-return -mmcs51 -DF_CPU=11059200 -DHEAP_SIZE=64 -DPLATFORMIO=30502 -Isrc src/blinky.c
sdcc -o .pioenvs/stc15f204ea/src/ds1302.rel -c --std-sdcc11 --opt-code-size --peep-return -mmcs51 -DF_CPU=11059200 -DHEAP_SIZE=64 -DPLATFORMIO=30502 -Isrc src/ds1302.c
sdcc -o .pioenvs/stc15f204ea/src/serial.rel -c --std-sdcc11 --opt-code-size --peep-return -mmcs51 -DF_CPU=11059200 -DHEAP_SIZE=64 -DPLATFORMIO=30502 -Isrc src/serial.c
sdcc -o .pioenvs/stc15f204ea/firmware.ihx -mmcs51 --iram-size 256 --xram-size 0 --code-size 4096 --out-fmt-ihx .pioenvs/stc15f204ea/src/blinky.rel.pioenvs/stc15f204ea/src/ds1302.rel .pioenvs/stc15f204ea/src/serial.rel -L.pioenvs/stc15f204ea
?ASlink-Warning-Definition of public symbol '__mcs51_genRAMCLEAR' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/mcs51.lib', Module: 'crtclear.rel'
Library: '/usr/local/share/sdcc/lib/small/mcs51.lib', Module: 'crtclear.rel'
?ASlink-Warning-Definition of public symbol '__mcs51_genXINIT' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/mcs51.lib', Module: 'crtxinit.rel'
Library: '/usr/local/share/sdcc/lib/small/mcs51.lib', Module: 'crtxinit.rel'
?ASlink-Warning-Definition of public symbol '__gptrput' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: '_gptrput.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: '_gptrput.rel'
?ASlink-Warning-Definition of public symbol '__mcs51_genXRAMCLEAR' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/mcs51.lib', Module: 'crtxclear.rel'
Library: '/usr/local/share/sdcc/lib/small/mcs51.lib', Module: 'crtxclear.rel'
?ASlink-Warning-Definition of public symbol '_printf_small' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: 'printfl.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: 'printfl.rel'
?ASlink-Warning-Definition of public symbol '__ltoa' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: '_ltoa.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: '_ltoa.rel'
?ASlink-Warning-Definition of public symbol '_bp' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: '_bp.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: '_bp.rel'
?ASlink-Warning-Definition of public symbol '__XPAGE' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/mcs51.lib', Module: 'crtpagesfr.rel'
Library: '/usr/local/share/sdcc/lib/small/mcs51.lib', Module: 'crtpagesfr.rel'
?ASlink-Warning-Definition of public symbol '__sdcc_gsinit_startup' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/mcs51.lib', Module: 'crtstart.rel'
Library: '/usr/local/share/sdcc/lib/small/mcs51.lib', Module: 'crtstart.rel'
?ASlink-Warning-Definition of public symbol '__gptrget' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: '_gptrget.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: '_gptrget.rel'
?ASlink-Warning-Definition of public symbol '__modulong_PARM_2' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/liblong.lib', Module: '_modulong.rel'
Library: '/usr/local/share/sdcc/lib/small/liblong.lib', Module: '_modulong.rel'
?ASlink-Warning-Definition of public symbol '__divulong_PARM_2' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/liblong.lib', Module: '_divulong.rel'
Library: '/usr/local/share/sdcc/lib/small/liblong.lib', Module: '_divulong.rel'
?ASlink-Warning-Definition of public symbol '__sdcc_external_startup' found more than once:
Library: '/Users/jens/.platformio/packages/toolchain-sdcc/bin/../share/sdcc/lib/small/libsdcc.lib', Module: '_startup.rel'
Library: '/usr/local/share/sdcc/lib/small/libsdcc.lib', Module: '_startup.rel'
=========================================================== [SUCCESS] Took 0.67 seconds ===========================================================
spth commented 6 years ago

You have multiple copies of the standard libraries in your linker path. As long as those are copies of the same version, you might consider it noise. But if they are actually different versions, it can be a real problem, resulting in broken binaries.

Philipp