1

I am trying to run an OpenGL example from here: https://github.com/robclark/kmscube on Hummingboard running Debian Wheezy.

I have all necessary libraries except libgbm. Installing libgbm-dev that was on aptitude left me with some errors such as "undefined reference to `gbm_surface_release_buffer' "

Looking at libgbm sources here: https://github.com/robclark/libgbm I noticed there functions were added to the latest version, so I understand that I need to rebuild this library from source.

This library uses autoconfig tools,

So I ran the following

libtoolize
aclocal
autoconf
autoheader
automake --force-missing --add-missing

libtoolize returns the following:

libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Remember to add `LT_INIT' to configure.ac.
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

Automake returns the following

Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
Makefile.am:1:   The usual way to define `LIBTOOL' is to add `LT_INIT'
Makefile.am:1:   to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am:1:   If `LT_INIT' is in `configure.ac', make sure
Makefile.am:1:   its definition is in aclocal's search path.

The output of libtoollize is not very descriptive, what do I need to do in order to make it the contents of those files?

In addition I also had to make changes to configure.ac file with AC_INIT(gbm, 2.69, test@gmail.com) AM_INIT_AUTOMAKE(gbm, 2.69)

And add files NEWS, AUTHORS, and ChangeLog

This seems like an incorrect process, isn't there an automated way to do this?

Can someone guide me through building this library?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Mich
  • 3,188
  • 4
  • 37
  • 85
  • Based on what I've read about automake, you have to add NEWS, AUTHORS and CHANGELOG everytime unless you add some flag in configure.ac. The reasoning behind adding these files is to follow the guidelines set by open source projects. Here's more info [GNU guideline](https://www.gnu.org/prep/standards/standards.html#Documentation) – macmania314 Apr 20 '15 at 00:26

1 Answers1

1

So I had a similar error as yours when trying to build a project - albeit, I didn't build the exact OpenGL project. Here are the steps I've done to remove these errors:

  1. libtoolize: You should add the contents of the following files to aclocal.m4 ...

    • brew install automake, aclocal is a package part of aclocal.
  2. Makefile.am:1: Libtool library used but `LIBTOOL' is undefined, here is a post that may help you:

Let me know if the errors went away. Best of luck.

Community
  • 1
  • 1
macmania314
  • 457
  • 2
  • 18