[weston] Makefile.am: Link weston_multi_resource against rt library

Submitted by Javier Jardón on Oct. 27, 2014, 3:13 p.m.

Details

Message ID 1414422799-23682-1-git-send-email-jjardon@gnome.org
State Accepted
Commit c47931e0f95f30b03f085dc5b2faf92a865b1312
Headers show

Not browsing as part of any series.

Commit Message

Javier Jardón Oct. 27, 2014, 3:13 p.m.
This fixes this build failure:

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
clients/weston_multi_resource-multi-resource.o: undefined reference to
symbol 'clock_gettime@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1
so try adding it to the linker command line
/lib64/librt.so.1: could not read symbols: Invalid operation
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/Makefile.am b/Makefile.am
index b2d6893..0c08acb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -419,7 +419,7 @@  weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
 
 weston_multi_resource_SOURCES = clients/multi-resource.c
 weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
-weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
+weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
 endif
 
 if BUILD_SIMPLE_EGL_CLIENTS

Comments

On Mon, Oct 27, 2014 at 03:13:19PM +0000, Javier Jardón wrote:
> This fixes this build failure:
> 
> /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
> clients/weston_multi_resource-multi-resource.o: undefined reference to
> symbol 'clock_gettime@@GLIBC_2.2.5'
> /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
> note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1
> so try adding it to the linker command line
> /lib64/librt.so.1: could not read symbols: Invalid operation
> ---
>  Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index b2d6893..0c08acb 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -419,7 +419,7 @@ weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
>  
>  weston_multi_resource_SOURCES = clients/multi-resource.c
>  weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
> -weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
> +weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
>  endif
>  
>  if BUILD_SIMPLE_EGL_CLIENTS

If -lrt is required, you may want to also add an appropriate test to
configure.ac, so if it's missing it'll be flagged at configure time
rather than at link time.

Bryce
On Wed, 29 Oct 2014 12:10:49 -0700
Bryce Harrington <bryce@osg.samsung.com> wrote:

> On Mon, Oct 27, 2014 at 03:13:19PM +0000, Javier Jardón wrote:
> > This fixes this build failure:
> > 
> > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
> > clients/weston_multi_resource-multi-resource.o: undefined reference to
> > symbol 'clock_gettime@@GLIBC_2.2.5'
> > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
> > note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1
> > so try adding it to the linker command line
> > /lib64/librt.so.1: could not read symbols: Invalid operation
> > ---
> >  Makefile.am | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index b2d6893..0c08acb 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -419,7 +419,7 @@ weston_simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
> >  
> >  weston_multi_resource_SOURCES = clients/multi-resource.c
> >  weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
> > -weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm
> > +weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm
> >  endif
> >  
> >  if BUILD_SIMPLE_EGL_CLIENTS
> 
> If -lrt is required, you may want to also add an appropriate test to
> configure.ac, so if it's missing it'll be flagged at configure time
> rather than at link time.

Unfortunately the v2 patches were going a wrong way, so I'm taking this
as an immediate fix. The testing can be fixed later.

Pushed.


Thanks,
pq