build failure, clock_gettime undefined, linking libavmedialo.so

classic Classic list List threaded Threaded
8 messages Options
Terrence Enger Terrence Enger
Reply | Threaded
Open this post in threaded view
|

build failure, clock_gettime undefined, linking libavmedialo.so

Zolnai,

My build of commit 48eccfb, fetched around 2014-05-16 00:57 UTC, is
failing with messages:

    [build LNK] Library/libavmedialo.so
    /home/terry/lo_hacking/git/libo2/workdir/LinkTarget/StaticLibrary/libcollada2gltf.a(GLTF-Open3DGC.o): In function `o3dgc::Timer::Tic()':
    /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
    /home/terry/lo_hacking/git/libo2/workdir/LinkTarget/StaticLibrary/libcollada2gltf.a(GLTF-Open3DGC.o): In function `o3dgc::Timer::Toc()':
    /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:119: undefined reference to `clock_gettime'

I notice that the files downloaded by `make fetch` were:

    collada2gltf-master-6258611a6a.tar.bz2
    libpng-1.5.18.tar.gz
    OpenCOLLADA-master-6509aa13af.tar.bz2

If I am reading things correctly, the first of these was introduced
by:

    commit d575917016f65a7322817a8e13ec25c52d18a600
    Author: Zolnai Tamás <[hidden email]>
    Date:   Thu Apr 10 13:37:38 2014 +0200

        Introduce Collada2gltf external library
   
        Change-Id: I157f175ee6ea719e98ba45133f53cb4d2c3045bb


Suggestions welcome.

Thanks,
Terry.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Tamas Zolnai Tamas Zolnai
Reply | Threaded
Open this post in threaded view
|

Re: build failure, clock_gettime undefined, linking libavmedialo.so

 
On Friday, May 16, 2014 15:00 BST, Terrence Enger <[hidden email]> wrote:
 

> Zolnai,
>
> My build of commit 48eccfb, fetched around 2014-05-16 00:57 UTC, is
> failing with messages:
>
>     [build LNK] Library/libavmedialo.so
>     /home/terry/lo_hacking/git/libo2/workdir/LinkTarget/StaticLibrary/libcollada2gltf.a(GLTF-Open3DGC.o): In function `o3dgc::Timer::Tic()':
>     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
>     /home/terry/lo_hacking/git/libo2/workdir/LinkTarget/StaticLibrary/libcollada2gltf.a(GLTF-Open3DGC.o): In function `o3dgc::Timer::Toc()':
>     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:119: undefined reference to `clock_gettime'
>
> I notice that the files downloaded by `make fetch` were:
>
>     collada2gltf-master-6258611a6a.tar.bz2
>     libpng-1.5.18.tar.gz
>     OpenCOLLADA-master-6509aa13af.tar.bz2
>
> If I am reading things correctly, the first of these was introduced
> by:
>
>     commit d575917016f65a7322817a8e13ec25c52d18a600
>     Author: Zolnai Tamás <[hidden email]>
>     Date:   Thu Apr 10 13:37:38 2014 +0200
>
>         Introduce Collada2gltf external library
>    
>         Change-Id: I157f175ee6ea719e98ba45133f53cb4d2c3045bb
>
>
> Suggestions welcome.

Hi Terry,

I didn't get the same error while building.
I google it and find that:
http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim
It suggests to link -lrt library.
So you can try to add these lines:
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,collada2gltf,\
        -lrt \
))
endif
to the external/collada2gltf/StaticLibrary_collada2gltf.mk file.

I hope it helps.

Best regards,
Tamás
 
 
 

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Terrence Enger Terrence Enger
Reply | Threaded
Open this post in threaded view
|

Re: [solved] build failure, clock_gettime undefined, linking libavmedialo.so

On Fri, 2014-05-16 at 15:19 +0100, Tamas Zolnai wrote:
> On Friday, May 16, 2014 15:00 BST, Terrence Enger <[hidden email]> wrote:
[snip]
> >     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
[snip]

> Hi Terry,
>
> I didn't get the same error while building.

Hmm.  My system is debian-wheezy, which perhaps is more conservative
than most Linux distros.

> I google it and find that:
> http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim
> It suggests to link -lrt library.
> So you can try to add these lines:
> ifeq ($(OS),LINUX)
> $(eval $(call gb_Library_add_libs,collada2gltf,\
> -lrt \
> ))
> endif
> to the external/collada2gltf/StaticLibrary_collada2gltf.mk file.
>
> I hope it helps.

That did the job.  My build is continuing.

Thank you for your help.
Terry.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Tamas Zolnai Tamas Zolnai
Reply | Threaded
Open this post in threaded view
|

Re: [solved] build failure, clock_gettime undefined, linking libavmedialo.so

 
On Friday, May 16, 2014 20:38 BST, Terrence Enger <[hidden email]> wrote:
 

> On Fri, 2014-05-16 at 15:19 +0100, Tamas Zolnai wrote:
> > On Friday, May 16, 2014 15:00 BST, Terrence Enger <[hidden email]> wrote:
> [snip]
> > >     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
> [snip]
>
> > Hi Terry,
> >
> > I didn't get the same error while building.
>
> Hmm.  My system is debian-wheezy, which perhaps is more conservative
> than most Linux distros.
>
> > I google it and find that:
> > http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim
> > It suggests to link -lrt library.
> > So you can try to add these lines:
> > ifeq ($(OS),LINUX)
> > $(eval $(call gb_Library_add_libs,collada2gltf,\
> > -lrt \
> > ))
> > endif
> > to the external/collada2gltf/StaticLibrary_collada2gltf.mk file.
> >
> > I hope it helps.
>
> That did the job.  My build is continuing.

Great, then I push it to master to avoid this problem.

Regards,
Tamás
 
 
 

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Terrence Enger Terrence Enger
Reply | Threaded
Open this post in threaded view
|

Re: build failure, clock_gettime undefined, linking libavmedialo.so

On Fri, 2014-05-16 at 21:12 +0100, Tamas Zolnai wrote:

>  On Friday, May 16, 2014 20:38 BST, Terrence Enger <[hidden email]> wrote:
>  
> > On Fri, 2014-05-16 at 15:19 +0100, Tamas Zolnai wrote:
> > > On Friday, May 16, 2014 15:00 BST, Terrence Enger <[hidden email]> wrote:
> > [snip]
> > > >     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
> > [snip]
> >
> > > Hi Terry,
> > >
> > > I didn't get the same error while building.
> >
> > Hmm.  My system is debian-wheezy, which perhaps is more conservative
> > than most Linux distros.
> >
> > > I google it and find that:
> > > http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim
> > > It suggests to link -lrt library.
> > > So you can try to add these lines:
> > > ifeq ($(OS),LINUX)
> > > $(eval $(call gb_Library_add_libs,collada2gltf,\
> > > -lrt \
> > > ))
> > > endif
> > > to the external/collada2gltf/StaticLibrary_collada2gltf.mk file.
> > >
> > > I hope it helps.
> >
> > That did the job.  My build is continuing.

Uh-oh.  I do not know what I was looking at when I wrote that.  The
link just failed the same way.  And that was after `make clean`.
OTOH, I see that you added those lines earlier in the file than I did

Meanwhile I accomplished the link by typing the command at the command
line, including -lrt.

I am sorry for having given you false encouragement.
Terry.
>
> Great, then I push it to master to avoid this problem.
>
> Regards,
> Tamás
>  
>
>


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
David Tardon David Tardon
Reply | Threaded
Open this post in threaded view
|

Re: build failure, clock_gettime undefined, linking libavmedialo.so

In reply to this post by Tamas Zolnai
Hi,

On Fri, May 16, 2014 at 03:19:21PM +0100, Tamas Zolnai wrote:

>  
> On Friday, May 16, 2014 15:00 BST, Terrence Enger <[hidden email]> wrote:
>  
> > My build of commit 48eccfb, fetched around 2014-05-16 00:57 UTC, is
> > failing with messages:
> >
> >     [build LNK] Library/libavmedialo.so
> >     /home/terry/lo_hacking/git/libo2/workdir/LinkTarget/StaticLibrary/libcollada2gltf.a(GLTF-Open3DGC.o): In function `o3dgc::Timer::Tic()':
> >     /home/terry/lo_hacking/git/libo2/workdir/UnpackedTarball/collada2gltf/dependencies/o3dgc/src/o3dgc_common_lib/inc/o3dgcTimer.h:115: undefined reference to `clock_gettime'
> I google it and find that:
> http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim
> It suggests to link -lrt library.
> So you can try to add these lines:
> ifeq ($(OS),LINUX)
> $(eval $(call gb_Library_add_libs,collada2gltf,\
> -lrt \
> ))
> endif
> to the external/collada2gltf/StaticLibrary_collada2gltf.mk file.
This will not work. The extra library is needed at the place(s) where
collada2gltf.a is _used_. The attached patch should do that.

D.

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

0001-fix-linking-with-collada2gltf-lib.patch (740 bytes) Download Attachment
Terrence Enger Terrence Enger
Reply | Threaded
Open this post in threaded view
|

Re: [solved] build failure, clock_gettime undefined, linking libavmedialo.so

On Sun, 2014-05-18 at 12:46 +0200, David Tardon wrote:
> Hi,
>
[snip]
> This will not work. The extra library is needed at the place(s) where
> collada2gltf.a is _used_. The attached patch should do that.

Thank you, David.  This seems to do the job.

In particular, I did:

(*) Applied your patch on top of commit 483ccfb.

(*) Renamed away workdir/Headers/Library/libavmedialo.so

(*) `make --dry-run verbose=5`.  The link command includes '-lrt'.

(*) `make`.  This did a lot, and the program runs.

Thanks,
Terry.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Tamás Zolnai Tamás Zolnai
Reply | Threaded
Open this post in threaded view
|

Re: [solved] build failure, clock_gettime undefined, linking libavmedialo.so

Great, finally it is solved, on master too. Thanks guys. :)


2014-05-18 22:05 GMT+02:00 Terrence Enger <[hidden email]>:
On Sun, 2014-05-18 at 12:46 +0200, David Tardon wrote:
> Hi,
>
[snip]
> This will not work. The extra library is needed at the place(s) where
> collada2gltf.a is _used_. The attached patch should do that.

Thank you, David.  This seems to do the job.

In particular, I did:

(*) Applied your patch on top of commit 483ccfb.

(*) Renamed away workdir/Headers/Library/libavmedialo.so

(*) `make --dry-run verbose=5`.  The link command includes '-lrt'.

(*) `make`.  This did a lot, and the program runs.

Thanks,
Terry.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice