Forum Topic - invalid string offsets when using gcc4.2.4 instead of ggc3.3.5:
   
invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
Hi there,
hopefully this is not off topic.

I have installed QNX6.3.2. I use IBM/Rhapsody 7.4 together with gcc 3.3.5 successfully. There is a framework included in
 Rhapsody which has to be compiled. This works fine with gcc3.3.5.

For some reasons I want to change to gcc4.2.4 but I cannot upgrade to QNX6.4.0.
-> I installed gcc4.2.4 and binutils 2.18 into my existing QNX6.3.2 enviroment.
( selection of 4.2.4 in IDE and "Hello World" project working fine )
I changed the compiler version in the default file to make shure 4.2.4 is the used version.

When I rebuild the Rhapsody framework I get a lot of errormessages looking like this:
BFD: nnnn.o: invalid string offset xxxx >= yyyy for setction `.shstrtab'

The build does not break, so I guess it is not fatal error.

After I compile and link my application against the "bad" Rhapsody Libs, I get an application that is able to run on an 
6.3.2 target.

Hm, do I have to care about these errors? What can I do to solve them?
Thanks,
Stefan
Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
stefan thiel wrote:
> Hi there,
> hopefully this is not off topic.
> 
> I have installed QNX6.3.2. I use IBM/Rhapsody 7.4 together with gcc 3.3.5 successfully. There is a framework included 
in Rhapsody which has to be compiled. This works fine with gcc3.3.5.
> 
> For some reasons I want to change to gcc4.2.4 but I cannot upgrade to QNX6.4.0.
> -> I installed gcc4.2.4 and binutils 2.18 into my existing QNX6.3.2 enviroment.
> ( selection of 4.2.4 in IDE and "Hello World" project working fine )
> I changed the compiler version in the default file to make shure 4.2.4 is the used version.
> 
> When I rebuild the Rhapsody framework I get a lot of errormessages looking like this:
> BFD: nnnn.o: invalid string offset xxxx >= yyyy for setction `.shstrtab'
> 
> The build does not break, so I guess it is not fatal error.
> 
> After I compile and link my application against the "bad" Rhapsody Libs, I get an application that is able to run on 
an 6.3.2 target.
> 
> Hm, do I have to care about these errors? What can I do to solve them?

Are the 2.18 binutils being invoked when you get these warnings? Does 
the build directly invoke the canonically named binutils (e.g. 
i386-pc-nto-qnx6.3.0-ar)? I've seen this happen when different versions 
of binutils have been mixed.

Regards,

Ryan Mansfield
Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
hi Ryan,
I had a quick look into the gcc_ntox86*.conf files and they all seem to be set up well for 2.18 

As a cross check, I have renamed all ntox86-*-2.18.exe to make sure what files will be used by a rebuild. Every missing 
file I renamed back step by step

Had the following results:
cc: spawn of C:\Programme\QNX632\host\win32\x86\usr\bin\ntox86-as-2.18 failed: No such file or directory
after rerenaming the assembler, the BDF: messages occured again and build completed.

-> You mentined to check files i386-pc-nto-qnx6.3.0-*, so I did the renaming things with these files

result: same without renaming, this seems to me like the i386* files from 2.18 are either not used or not needed. 


Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
next try:
I changed all lines off all gcc_ntox86*.conf files
to use 
/usr/bin/i386-pc-nto-qnx6.3.0-*2.18
instead of
/usr/bin/ntox86-*2.18

exactly same behaviour and BFD errors

double checked by renaming i386-pc-nto-qnx6.3.0-as-2.18
-> result:
cc: spawn of C:\Programme\QNX632\host\win32\x86\usr\bin\i386-pc-nto-qnx6.3.0-as-2.18 failed: No such file or directory

--> maybe another file not including 2.18 in its name is causing the problem?
Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
stefan thiel wrote:
> next try:
> I changed all lines off all gcc_ntox86*.conf files
> to use 
> /usr/bin/i386-pc-nto-qnx6.3.0-*2.18
> instead of
> /usr/bin/ntox86-*2.18
> 
> exactly same behaviour and BFD errors
> 
> double checked by renaming i386-pc-nto-qnx6.3.0-as-2.18
> -> result:
> cc: spawn of C:\Programme\QNX632\host\win32\x86\usr\bin\i386-pc-nto-qnx6.3.0-as-2.18 failed: No such file or directory

> 
> --> maybe another file not including 2.18 in its name is causing the problem?

The conf files should be calling the suffixed binutils which shouldn't 
be the source of the problem. I was wondering if some other part of the 
build was directly calling the 2.12 binutils. Can you paste a log of the 
command that generates the warnings?

Regards,

Ryan Mansfield
Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
The build is invoked from within the Rhapsody IDE, so it's not easy to get a lot of output.

But here are the makefiles being called for this operation

QNXCWbuild.mak is the one being invoked first
Attachment: Compressed file oxf.zip 344 bytes
Re: invalid string offsets when using gcc4.2.4 instead of ggc3.3.5  
I tried 4.2.1.
Same BFD errors here, however the *.conf files pointing to binutils 2.17