Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How to correctly install the gcc 4.6.1 toolchain: Page 1 of 2 (11 Items)
   
How to correctly install the gcc 4.6.1 toolchain  
Greetings,

I would be very glad about instructions about how to really correctly install the gcc 4.6.1 toolchain (in my case x86 
system and target), that is what should go where and so on.

Which links have to be set? What has to go where (esp. on the QNX target)?

Just copying the folders does not really seem reasonable.

Thanks a lot for help here,
Andy
RE: How to correctly install the gcc 4.6.1 toolchain  

> -----Message d'origine-----
> De : Andreas Beschorner [mailto:community-noreply@qnx.com]
> Envoyé : 29 juillet 2011 02:59
> À : general-toolchain
> Objet : How to correctly install the gcc 4.6.1 toolchain
> 
> Greetings,
> 
> I would be very glad about instructions about how to really correctly install
> the gcc 4.6.1 toolchain (in my case x86 system and target), that is what should
> go where and so on.
> 
> Which links have to be set? What has to go where (esp. on the QNX target)?
> 
> Just copying the folders does not really seem reasonable.

It worked for me ;-)

> 
> Thanks a lot for help here,
> Andy
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post87674
> 
Re: RE: How to correctly install the gcc 4.6.1 toolchain  
Hola!

Hm, I definitely can say that just copying does not do the job. For instance /lib/libstdc++.so.6 needs to be relinked 
from 6.0.13 to 6.0.16 (debugging won't work correctly otherwise). I am sure there are more small caveats.

For instance, we did not change any paths, but the new toolchain seems to have a lot of files in ... /usr/local/lib, 
whereas on our targets this directory is empty and most of the files are in /lib (though not all, and /lib includes 
other files instead).

Any suggestions?

Thanks a lot,
Andy
Re: RE: How to correctly install the gcc 4.6.1 toolchain  
Hoi again,

just to clarify this

1) From the tar archive, the directory ...usr/local/lib is copied to /lib on the target?
2) From the tar archive, the directory 
...usr/qnx650/target is copied to (HostQNXBasePath)/target 
and 
...usr/qnx650/host/qnx6/x86 is copied to (HostQNXBasePath)/host/win32/x86
right? (here are already structure differences)

Thanks a lot,
Andy
Re: RE: How to correctly install the gcc 4.6.1 toolchain  
Greetings again,

the above procedure did not work (Momentix stops compiling/linking with the error message that .../QNX650/host/win32/x86
/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.6.1/pic/liibstdc++.so file is not recognized due to the file format)

Would be glad to get help,

thanks in advance,
Andy
Re: How to correctly install the gcc 4.6.1 toolchain  
On 11-08-08 06:21 AM, Andreas Beschorner wrote:
> Hoi again,
>
> just to clarify this
>
> 1) From the tar archive, the directory ...usr/local/lib is copied to
> /lib on the target?

Which tarball/zipfile are you extracting that has usr/local/lib? I just 
double checked the files posted on the foundry and I couldn't find any 
containing a usr/local/lib/ directory.

> 2) From the tar archive, the directory
> ...usr/qnx650/target is copied to (HostQNXBasePath)/target
> and
> ...usr/qnx650/host/qnx6/x86 is copied to (HostQNXBasePath)/host/win32/x86
> right? (here are already structure differences)

The procedure should be to extract the file at the base qnx path (e.g. 
C:/QNX650, /opt/qnx650/ or /usr/qnx650) and it will extract into into 
host and target directories.

Then if you're running self hosted you'll need to copy 
$QNX_TARGET/x86/lib/libstdc++.so.6.0.16 to /lib and then change the 
/lib/libstdc++.so.6 to point to /lib/libstdc++.so.6.0.16.

Regards,

Ryan Mansfield
Re: How to correctly install the gcc 4.6.1 toolchain  
Greetings Ryan,

I downloaded a file named

win32-gcc-4.6.1

which included two compressed folders, "host" and "target".

I was already feeling strange having a lot of linux/qnx type libraries in the host directory.

I attached the higher levels of directory structure in an image.

Where do you get your tool chain? I downloaded mine here from the Momentics homepage...

Thanks and best wishes,
Andy


 
Attachment: Image gcc461Toc.PNG 19.07 KB
Re: How to correctly install the gcc 4.6.1 toolchain  
On 11-08-08 11:24 AM, Andreas Beschorner wrote:
> Greetings Ryan,
>
> I downloaded a file named
>
> win32-gcc-4.6.1
>
> which included two compressed folders, "host" and "target".
>
> I was already feeling strange having a lot of linux/qnx type libraries
> in the host directory.
>
> I attached the higher levels of directory structure in an image.

There isn't any usr/local/lib in the win32-gcc-4.6.1.zip, or the png. 
but the directory structure in the png looks correct. The files in the 
canonically named directories (i.e. 
$QNX_HOST/usr/lib/gcc/arm-unknown-nto-qnx6.5.0) on the host directories 
are mainly host specific (e.g. cc1.exe/cc1plus.exe) with the exception 
of a few target files such libgcc.a, libgcov.a and crtbegin/crtend.o 
which are specific to the version of gcc. If you're using a Windows 
host, you only need to download win32-gcc-4.6.1.zip and you don't need 
to download the linux/nto tarballs. unless you are developing using 
those as your hosts as well.

If you extract the win32-gcc-4.6.1.zip at the base qnx directory e.g. 
C:/QNX650, then everything should extract into the host/target 
directories and then you shouldn't have to copy anything else around on 
your host side to correct install it.

As your developing from a Windows host, and targeting an Neutrino x86 
target you'll have to update your target with the updated libraries.
Copy the $QNX_TARGET/x86/lib/libstdc++.so.6.0.16 on your host to the 
target, and make sure /lib/libstdc++.so.6 sym link points at new 
library. If you have libstdc++ as part of the IFS, then you'd have to 
rebuild it to pick up the updated library.

> Where do you get your tool chain? I downloaded mine here from the
> Momentics homepage...

Yes, that's the right location to download the libraries from.

Regards,

Ryan Mansfield
Re: How to correctly install the gcc 4.6.1 toolchain  
Hoi Ryan,

I redownloaded the file and now I seems to have the correct one. Compilation and everything works fine. 

A few more questions:
1) What all needs to be installed on the target machine? Just the libstdc++? What about libcpp-ne and other libraries or
 include files? I guess that on the target either /lib or /opt/lib or anything alike needs some new files, too, or?

2) What do you mean by IFS? The problem is that we do not have a licence for the compiler on the target itself and can 
not build/make/ use gcc on that one.

Thanks a lot again for help,
Andy
Re: How to correctly install the gcc 4.6.1 toolchain  
On 11-08-09 08:50 AM, Andreas Beschorner wrote:
> Hoi Ryan,
>
> I redownloaded the file and now I seems to have the correct one.
> Compilation and everything works fine.
>
> A few more questions:
> 1) What all needs to be installed on the target machine? Just the
> libstdc++? What about libcpp-ne and other libraries or include files? I
> guess that on the target either /lib or /opt/lib or anything alike needs
> some new files, too, or?

It depends on what libraries you're using, but it sounds like you're 
only using libstdc++. If you're using libmudflap as well then you'll 
need to copy that over as well. The headers files are only needed on the 
host side.

libcpp-ne is the Dinkumware C++ library and since it's not part of the 
gcc, it has only recompiled with updated toolchain but if you already 
have it on your target then your programs should be able to use the 
6.5.0 libcpp-ne.so.4.

> 2) What do you mean by IFS? The problem is that we do not have a licence
> for the compiler on the target itself and can not build/make/ use gcc on
> that one.

IFS is the image filesystem. It's the bootable OS image that has 
procnto, startup, your boot script, and depending on your target, other 
components such as drivers and shared objects. You probably don't have 
libstdc++ in your IFS but if you do then you'll need to rebuild the image.

Regards,

Ryan Mansfield