rtems.git build broken(?) for --enable-rtemsbsp=psim with samples: multiple definition of `_POSIX_Once_Lock'

Nick Withers nick at nickwithers.com
Mon Aug 19 09:48:21 UTC 2013


On Sat, 2013-08-17 at 11:42 -0500, Joel Sherrill wrote:
> Hi
> 
> Haven't tested this beyond noting that the build continues.
> Please let us know if this works.

Yup - that seems to have done the trick, and I've tested with a
POSIX-init application.

Cheers!

> $ git diff src/once.c
> diff --git a/cpukit/posix/src/once.c b/cpukit/posix/src/once.c
> index d77c3c1..40484d3 100644
> --- a/cpukit/posix/src/once.c
> +++ b/cpukit/posix/src/once.c
> @@ -24,8 +24,6 @@
>   #include <rtems.h>
>   #include <rtems/posix/onceimpl.h>
> 
> -pthread_mutex_t _POSIX_Once_Lock;
> -
>   void _POSIX_Once_Manager_initialization(void)
>   {
>     pthread_mutexattr_t mattr;
> 
> 
> On 8/16/2013 10:26 PM, Nick Withers wrote:
> > Hullo all,
> >
> > It seems perhaps the rtems.git build is broken for the "psim" BSP, with
> > samples enabled (at least "hello"): multiple definitions of "_POSIX_Once_Lock".
> >
> > It builds for the "mvme3100" BSP without error with or without samples
> >
> > Last little bit from the "make" ("gmake" on my FreeBSD 9.2-PRERELEASE,
> > r254324, host) output:
> > ____
> >
> > gmake[3]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/wrapup'
> > Making all in testsuites
> > gmake[3]: Entering directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites'
> > Making all in samples
> > gmake[4]: Entering directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples'
> > gmake  all-recursive
> > gmake[5]: Entering directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples'
> > Making all in hello
> > gmake[6]: Entering directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples/hello'
> > powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I../../../../../../../../rtems/c/src/../../testsuites/samples/hello -I..     -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o ../../../../../../../../rtems/c/src/../../testsuites/samples/hello/init.c
> > mv -f .deps/init.Tpo .deps/init.Po
> > powerpc-rtems4.11-gcc -B../../../../../psim/lib/ -specs bsp_specs -qrtems -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs    -meabi -mcpu=603e -msdata=sysv -fno-common -Dppc603e   -o hello.exe init.o
> > ../../../../../psim/lib/librtemscpu.a(libposix_a-once.o): In function `_POSIX_Once_Manager_initialization':
> > /home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/cpukit/posix/../../../../../../../rtems/c/src/../../cpukit/posix/src/once.c:30: multiple definition of `_POSIX_Once_Lock'
> > ../../../../../psim/lib/librtemscpu.a(libsapi_a-posixapi.o):/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/cpukit/sapi/../../../../../../../rtems/c/src/../../cpukit/sapi/src/posixapi.c:50: first defined here
> > collect2: error: ld returned 1 exit status
> > gmake[6]: *** [hello.exe] Error 1
> > gmake[6]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples/hello'
> > gmake[5]: *** [all-recursive] Error 1
> > gmake[5]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples'
> > gmake[4]: *** [all] Error 2
> > gmake[4]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites/samples'
> > gmake[3]: *** [all-recursive] Error 1
> > gmake[3]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim/testsuites'
> > gmake[2]: *** [all-recursive] Error 1
> > gmake[2]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c/psim'
> > gmake[1]: *** [all-recursive] Error 1
> > gmake[1]: Leaving directory `/usr/home/nick/rtems/git/build/rtems/powerpc-rtems4.11/c'
> > gmake: *** [all-recursive] Error 1
> > ____
-- 
Nick Withers
email: nick at nickwithers.com
Web: http://www.nickwithers.com
Mobile: +61 414 397 446




More information about the devel mailing list