Bug 1155591 - ASlink-Warning-Undefined Global
Summary: ASlink-Warning-Undefined Global
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sdcc
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-22 12:50 UTC by nvwarr
Modified: 2016-02-01 02:00 UTC (History)
4 users (show)

Fixed In Version: sdcc-3.4.0-3.fc21
Clone Of:
Environment:
Last Closed: 2014-11-10 06:51:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description nvwarr 2014-10-22 12:50:58 UTC
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!

Comment 1 Roy Rankin 2014-10-24 03:08:32 UTC
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.

Comment 2 Fedora Update System 2014-10-24 22:09:02 UTC
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

Comment 3 Fedora Update System 2014-10-27 08:17:01 UTC
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).

Comment 4 nvwarr 2014-10-28 07:32:34 UTC
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.

Comment 5 Fedora Update System 2014-11-10 06:51:54 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.