| View previous topic :: View next topic |
| Author |
Message |
exbutterfly
Joined: 12 May 2008 Posts: 3
|
Posted: Mon May 12, 2008 10:52 pm Post subject: SPU compilation stand-alone program troubles |
|
|
Hi,
I have some troubles in order to compile a simple stand-alone program for SPU.
I work on Yellow Dog Linux YDL 6.0 for PS3. All compilators are installed and updated.
This is the code of the "Hello World" program I would to test if the installation is complete :
| Code: | #include <stdio.h>
int main()
{
printf("Hello World !");
return 0;
}
|
I type in the command-line : spu-gcc -o test test.c
And I have the following message :
| Quote: | /usr/lib/gcc/spu/4.1.1/../../../../spu/bin/ld: skipping incompatible /usr/lib/gcc/spu/4.1.1/../../../../spu/lib/libc.a when searching for -lc
/usr/lib/gcc/spu/4.1.1/../../../../spu/bin/ld: skipping incompatible /usr/spu/bin/../lib/libc.a when searching for -lc
/usr/lib/gcc/spu/4.1.1/../../../../spu/bin/ld: skipping incompatible /usr/spu/lib/libc.a when searching for -lc
/usr/lib/gcc/spu/4.1.1/../../../../spu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
|
Any suggestions ?
Thanks for your help |
|
| Back to top |
|
 |
Radamantis
Joined: 14 Apr 2008 Posts: 4 Location: Caserta - Italy
|
Posted: Tue May 13, 2008 8:24 am Post subject: |
|
|
Hi exbutterfly...
Looking at the source everything seems fine... maybe it's a problem with environment variables... _________________ Radamantis, the greatest caution |
|
| Back to top |
|
 |
exbutterfly
Joined: 12 May 2008 Posts: 3
|
Posted: Tue May 13, 2008 11:48 am Post subject: |
|
|
Hi Radamantis.
Thanks for your answer.
Can you tell me the normal minimal content of environment variables LD_LIBRARY_PATH or others variables implied in the linking.
Maybe, it is an error in the config file of ld ? |
|
| Back to top |
|
 |
Radamantis
Joined: 14 Apr 2008 Posts: 4 Location: Caserta - Italy
|
Posted: Tue May 13, 2008 6:02 pm Post subject: |
|
|
Have you included in your $PATH the directory /opt/cell/sdk/usr/include ? _________________ Radamantis, the greatest caution |
|
| Back to top |
|
 |
exbutterfly
Joined: 12 May 2008 Posts: 3
|
Posted: Tue May 13, 2008 8:36 pm Post subject: |
|
|
I think i found the origin of the problem. But I have no solution.
In the installation of the RPM package elfspe with yum, an error had occured :
| Code: | /usr/bin/elfspe-register: line 6: /proc/sys/fs/binfmt_misc/register: No such file or directory
error: %post(elfspe2-2.2.0-91.ppc) scriptlet failed, exit status 1
|
It makes sense that this error disturbe the linking.
If someone have any suggestions |
|
| Back to top |
|
 |
_Razorblade_
Joined: 14 May 2008 Posts: 1
|
Posted: Wed May 14, 2008 6:54 am Post subject: |
|
|
I don't know why elspe2 requires this, but if "/proc/sys/binfmt_misc/register" is the problem, then it's your kernel not supporting "Misc" exec format (as in "Executable file formats -> Kernel support for MISC binaries").
Do you use a stock kernel from YDL or a self-compiled one? |
|
| Back to top |
|
 |
leonhong
Joined: 09 Jan 2008 Posts: 10
|
Posted: Wed Jun 18, 2008 5:14 pm Post subject: Re: SPU compilation stand-alone program troubles |
|
|
Dear exbutterfly:
According to the IBM guidelines, all spe programs must be spawned by ppe kernel threads. Many preparations (locate spe, loading text and data to LS, start execution, arrange communications, stop execution, etc) should be done before you can use the spe. If you are trying to code stand-alone spu programs, maybe you can try CTK projects.
Best regards |
|
| Back to top |
|
 |
|