Problem compiling OLA
Ronny Nilsson
rln-nard at arbetsmyra.dyndns.org
Thu May 5 20:32:35 CEST 2016
Hi Rui
This is looks like a tough one! I don't blame you for having problems... I'll
try to find some time next week to help.
/Ronny
-----------------------------------------
> Hi,
>
> I've been trying to compile OLA (https://www.openlighting.org) but been
> having so many problems I'm melting my brains out !!
>
> To build OLA without any plugins, and all superfluous stuff disabled
> (doc, examples, etc) requires protobuf and uuid, I managed successfully
> to build and install this libraries (uuid is provided by util-linux), I
> just make a plain DESTDIR=$(PATH_FS) make install for uuid and protobuf.
>
> OLA relies on either pkg-config or env variables to find protobuf and
> uuid, I tried both and the problem I have happens on any.
>
> My problem is, OLA binaries have the lib path hardcoded and when I run
> them on the raspberry pi, it just hangs forever, an strace reveals:
>
> root at tridmx_raspi_b_rev2-952bbb2c:~> strace olad
> execve("/usr/bin/olad", ["olad"], [/* 15 vars */]) = 0
> brk(0) = 0x15000
> uname({sys="Linux", node="tridmx_raspi_b_rev2-952bbb2c", ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xa6ffc000
> access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
> directory)
> open("/home/rbarreiros/Projectos/RaspberryPi/nard/nard-git/intermediate/fs/
>usr/lib/tls/v6l/vfp/libolaserver.so.0", O_RDONLY|O_CLOEXEC) = -1 ELOOP (Too
> many levels of symbolic links)
> stat64("/home/rbarreiros/Projectos/RaspberryPi/nard/nard-git/intermediate/f
>s/usr/lib/tls/v6l/vfp",
>
> Everytime an open/stat call is made, it takes a long long time, until it
> receives the ELOOP error and attempts another path to try and open
> libolaserver.so.0
>
>
> Here is the configure/build section for ola Makefile
>
> To properly build ola for another system, one needs to build
> ola_protoc_plugin natively first, as it's used by the protoc (which
> needs to be built natively first also) to parse from protobuf message
> files during build, then the cross compilation is done.
>
> # Need to build a native ola-protoc-plugin first
> if [ ! -e native/protoc/ola_protoc_plugin ]; then \
> cd native && env CFLAGS="" CPPFLAGS="" LDFLAGS=""
> PKG_CONFIG="/usr/bin/pkg-config" \
> ./configure \
> --disable-all-plugins \
> --disable-osc \
> --disable-uart \
> --disable-libusb \
> --disable-libftdi \
> --disable-http \
> --disable-examples \
> --disable-unittests \
> --disable-doxygen-html \
> --disable-doxygen-doc \
> --without-dns-sd \
> && $(MAKE) -j "$(CPUS)" protoc/ola_protoc_plugin; fi
>
> cd $(dir $@) && env PKG_CONFIG_DIR=""
> PKG_CONFIG_LIBDIR="$(PATH_FS)/usr/lib/pkgconfig:$(PATH_FS)/usr/share/pkgcon
>fig" PKG_CONFIG_SYSROOT_DIR="$(PATH_FS)" \
> CFLAGS="$(CROSS_CFLAGS)" \
> CPPFLAGS="$(CROSS_CFLAGS)" \
> LDFLAGS="-Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link
> -Wl,$(PATH_FS)/usr/lib -L$(PATH_FS)/lib -L$(PATH_FS)/usr/lib" \
> PKG_CONFIG="/usr/bin/pkg-config" \
> ./configure \
> ac_cv_func_malloc_0_nonnull=yes
> ac_cv_func_realloc_0_nonnull=yes \
> libprotobuf_CFLAGS="-I$(PATH_FS)/usr/include
> -L$(PATH_FS)/usr/lib -Wl,-rpath-link,$(PATH_FS)/usr/lib" \
> libprotobuf_LIBS="-L$(PATH_FS)/usr/lib -lprotobuf
> -lprotoc" \
> base_uuid_CFLAGS="-I$(PATH_FS)/usr/include
> -L$(PATH_FS)/usr/lib -Wl,-rpath-link,$(PATH_FS)/usr/lib" \
> base_uuid_LIBS="-L$(PATH_FS)/usr/lib -luuid" \
> --prefix=/usr \
> --host=$(CROSS_TUPLE) \
> --target=$(CROSS_TUPLE) \
> --disable-dependency-tracking \
> --without-dns-sd \
> --with-protoc=$(PATH_APPS)/protobuf/native/src/protoc \
> --with-ola-protoc-plugin=$(PATH_APPS)/ola/native/protoc/ola_protoc_plugin \
> --disable-unittests \
> --disable-examples \
> --disable-rdm-tests \
> --disable-doxygen-doc \
> --disable-gcov \
> --disable-tcmalloc \
> --disable-root-check \
> --disable-java-libs \
> --disable-python-libs \
> --disable-fatal-warnings \
> --disable-all-plugins
> $(MAKE) -C "$(PKG_VER)" -j $(CPUS)
>
> Worthy of note, I couldn't finish OLA compilation because I kept getting
> an error where libtool couldn't find it's libraries (OLA libraries) and
> suggested using rpath or rpath-link, I managed to fix this issue by
> implementing a fix found here http://bugs.lttng.org/issues/321 in which
> the configure script goes through all occurrences of link_all_deplibs in
> config/libtool.m4 and replace all 'no|yes' to unknown.
>
> Does anyone have any idea what I'm doing wrong ? or where the bug is ?
>
> Best regards.
More information about the Nard
mailing list