Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: The link stage fails with messages like: ?ASlink-Warning-Undefined Global '__mcs51_genRAMCLEAR' referenced by module 'test' ?ASlink-Warning-Undefined Global '__mcs51_genXINIT' referenced by module 'test' ?ASlink-Warning-Undefined Global '__sdcc_external_startup' referenced by module '' ?ASlink-Warning-Undefined Global '__mcs51_genXRAMCLEAR' referenced by module 'test' Version-Release number of selected component (if applicable): sdcc-3.4.0-1.fc21.x86_64 i.e. SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.4.0 #8981 (Aug 18 2014) (Linux) How reproducible: Always Steps to Reproduce: 1. Simple test.c file like: char test; void main(void) { test=0; } 2. sdcc-sdcc test.c Actual results: ?ASlink-Warning-Undefined Global '__mcs51_genRAMCLEAR' referenced by module 'test' ?ASlink-Warning-Undefined Global '__mcs51_genXINIT' referenced by module 'test' ?ASlink-Warning-Undefined Global '__sdcc_external_startup' referenced by module '' ?ASlink-Warning-Undefined Global '__mcs51_genXRAMCLEAR' referenced by module 'test' Expected results: Should compile without any additional output. Works on Fedora 20. Additional info: The example is taken from the manual /usr/share/doc/sdcc/sdcc/sdccman.pdf (page 20), apart from the change of sdcc to sdcc-sdcc. strace -f shows it is really opening the libraries: [pid 2658] open("/usr/share/sdcc/lib/small/mcs51.lib", O_RDONLY) = 6 [pid 2658] open("/usr/share/sdcc/lib/small/libsdcc.lib", O_RDONLY) = 6 [pid 2658] open("/usr/share/sdcc/lib/small/libint.lib", O_RDONLY) = 6 [pid 2658] open("/usr/share/sdcc/lib/small/liblong.lib", O_RDONLY) = 6 [pid 2658] open("/usr/share/sdcc/lib/small/libfloat.lib", O_RDONLY) = 6 [pid 2658] open("/usr/share/sdcc/lib/small/mcs51.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/libsdcc.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/libint.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/liblong.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/libfloat.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/mcs51.lib", O_RDONLY) = 4 [pid 2658] open("/usr/share/sdcc/lib/small/mcs51.lib", O_RDONLY) = 7 and the last one on the list has the symbols, which it claims to be missing. I notice that: sdcc-sdcc --print-search-dirs gives the following output: programs: /usr/libexec/sdcc datadir: /usr/libexec/sdcc/../share /usr/share includedir: /usr/libexec/sdcc/../share/sdcc/include/mcs51 /usr/share/sdcc/include/mcs51 /usr/libexec/sdcc/../share/sdcc/include /usr/share/sdcc/include libdir: /usr/libexec/sdcc/../share/sdcc/lib/small /usr/share/sdcc/lib/small libpath: Note the incorrect paths. There is no /usr/libexec/sdcc/../share/sdcc/lib/small it should be /usr/libexec/sdcc/../../share/sdcc/lib/small!
The issue is not the search path of the libraries as they are being opened, but rather to format of the library files. I am investigating the issue.
sdcc-3.4.0-3.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/sdcc-3.4.0-3.fc21
Package sdcc-3.4.0-3.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing sdcc-3.4.0-3.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-13620/sdcc-3.4.0-3.fc21 then log in and leave karma (feedback).
Yes, that seems to fix it. Indeed, I hadn't noticed that the format of the libraries was completely different, until you pointed it out. I've left some karma, but for some reason, it seems to have put me down as "anonymous". As far as I am concerned, the bug is fixed.
sdcc-3.4.0-3.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.