undefined reference to `pthread_setcancelstate' error while building rtems 4.11 with samples.

Nadia Gruman Nadia.Gruman at pro-dex.com
Fri Nov 22 00:41:44 UTC 2013


Hello,

I'm building rtems 4.11 on Ubuntu 12.04 (precise) 64-bit for the powerpc mvme5500. I have built and installed the tools successfully:

ls  /opt/rtems-4.11/bin/
powerpc-rtems4.11-addr2line*   powerpc-rtems4.11-gdb*
powerpc-rtems4.11-ar*          powerpc-rtems4.11-gprof*
powerpc-rtems4.11-as*          powerpc-rtems4.11-ld*
powerpc-rtems4.11-c++*         powerpc-rtems4.11-ld.bfd*
powerpc-rtems4.11-c++filt*     powerpc-rtems4.11-nm*
powerpc-rtems4.11-cpp*         powerpc-rtems4.11-objcopy*
powerpc-rtems4.11-elfedit*     powerpc-rtems4.11-objdump*
powerpc-rtems4.11-g++*         powerpc-rtems4.11-ranlib*
powerpc-rtems4.11-gcc*         powerpc-rtems4.11-readelf*
powerpc-rtems4.11-gcc-4.8.1*   powerpc-rtems4.11-run*
powerpc-rtems4.11-gcc-ar*      powerpc-rtems4.11-size*
powerpc-rtems4.11-gcc-nm*      powerpc-rtems4.11-strings*
powerpc-rtems4.11-gcc-ranlib*  powerpc-rtems4.11-strip*
powerpc-rtems4.11-gcov*

and now building rtems. I got the source from git and did the following:


export PATH=/opt/rtems-4.11/bin:$PATH
./bootstrap
cd ..
mkdir b-sis
cd b-sis
../rtems/configure --target=powerpc-rtems4.11 --enable-rtemsbsp=mvme5500 --enable-tests=samples --disable-posix
make

on make I get the following errors:
powerpc-rtems4.11-gcc -B../../../../../mvme5500/lib/ -specs bsp_specs -qrtems -mcpu=7450 -mtune=7450 -Dmpc7455 -O2 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs    -mcpu=7450 -mtune=7450 -Dmpc7455   -o hello.exe init.o
/opt/rtems-4.11/lib/gcc/powerpc-rtems4.11/4.8.1/../../../../powerpc-rtems4.11/lib/m7400/libc.a(lib_a-fflush.o): In function `_fflush_r':
/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/fflush.c:229: undefined reference to `pthread_setcancelstate'
/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/fflush.c:231: undefined reference to `pthread_setcancelstate'
/opt/rtems-4.11/lib/gcc/powerpc-rtems4.11/4.8.1/../../../../powerpc-rtems4.11/lib/m7400/libc.a(lib_a-findfp.o): In function `__sfp':
/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/findfp.c:111: undefined reference to `pthread_setcancelstate'
/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/findfp.c:135: undefined reference to `pthread_setcancelstate'
/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/findfp.c:124: undefined reference to `pthread_setcancelstate'
/opt/rtems-4.11/lib/gcc/powerpc-rtems4.11/4.8.1/../../../../powerpc-rtems4.11/lib/m7400/libc.a(lib_a-fwrite.o):/home/nadgru/tools/b-gcc/powerpc-rtems4.11/m7400/newlib/libc/stdio/../../../../../../gcc-4.8.1/newlib/libc/stdio/fwrite.c:122: more undefined references to `pthread_setcancelstate' follow
collect2: error: ld returned 1 exit status
make[6]: *** [hello.exe] Error 1
make[6]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c/mvme5500/testsuites/samples/hello'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c/mvme5500/testsuites/samples'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c/mvme5500/testsuites/samples'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c/mvme5500/testsuites'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c/mvme5500'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nadgru/tools/b-sis/powerpc-rtems4.11/c'
make: *** [all-recursive] Error 1
nadgru at lx-test:~/tools/b-sis$

Has anyone encountered this? I tried adding --enable-posix, but that didn't help.

Thank you.
Nadia.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20131122/4fecb89b/attachment.html>


More information about the users mailing list