Compile error with V2.4.1

Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
Post Reply
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Compile error with V2.4.1

Post by Don_Kirby »

I don't even know how to describe this one...
C:/Program Files/ZBasic/zxlib\libzx24n.a(uart.o): In function `__vector_9':
(.text+0x13e): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'
C:/Program Files/ZBasic/zxlib\libzx24n.a(uart.o): In function `__vector_9':
(.text+0x14a): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'
make: *** [ZXOnly.i1] Error 1

Is this just a strange error message referring to an error in my code, or is there something else happening here?


-Don

Edit: Perhaps someone can relocate this to the new forum..
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Compile error with V2.4.1

Post by dkinzer »

Don_Kirby wrote:Is this just a strange error message referring to an error in my code?
This error comes from the backend process. Presumably, you're using either --keep-files or --verbose or both. Otherwise, all you would have seen is an internal compiler error which is (almost) never caused by an error on your part.

In this particular case, the linker could not resolve a relative jump to a label within the limits inherent to a relative jump. That's what the "out of range" message means, i.e. you can get there from here. The problem was caused by some last minute changes that we made in the ZX library code where we changed some relative call/jump instructions to absolute as they should have been. What's odd about this is that the test suite did not report the same error. I'll have to look into why this was the case.

I've uploaded a new ZX library .zip file with corrected .a files for each device. These should be extracted to the zxlib subdirectory of the ZBasic installation directory.

http://www.zbasic.net/download/zxlib/zxlib_2-4-9.zip
- Don Kinzer
Post Reply