libavg 64-bit

Asked by Nick Couchman

I'm trying to compile the libavg code for the 64-bit Ubuntu platform. There are a variety of reasons for this, but the main reason boils down to the fact that the Intel platform I'm using only boots UEFI, and Ubuntu 32-bit 12.04 doesn't seem to support UEFI boot. So, I'm forced into using a 64-bit O/S, therefore I need 64-bit libraries. When I do the install, downloading the prebuilt libavg tarball, I get the "wrong ELF class " error when trying to launch the client, because Python is 64-bit but the avg.so and browsernode.so files are 32-bit.

I've got most of the stuff compiled correctly, but am struggling with the instructions for manually compiling the libavg source:

-Download libbrowsernode patches [3]
-Copy the browsernode release files in to src/test/plugin folder.
-Copy the Berkelium header files in to src/test/plugin (ie src/test/plugin/berkelium)
-Copy /usr/local/lib/liblibberkelium.so in to src/test/plugin
-Build libavg as normal:

When I got to the site referenced for the "libbrowsernode patches", I don't see any patches - just the bzr info for downloading the browsernode release files. I'm guessing that's what I really need, or am I missing the patches? I also have the following questions:
- Copy the browsernode release files in to src/test/plugin folder: Do I copy the browsernode/plugin/* files into that exact directory, or should I be creating a src/test/plugin/browsernode folder that contains the files?
- Copy the Berkelium header files... which ones? The ones in /usr/local/include/berkelium? Or some other ones?

Also, when I compare the resulting avg.so.0.0.0 file to the tarball provided on the web site, there are a significant number of differences - the one I compiled is linked against many, many more libraries.

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Nick Couchman
Solved:
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

I've never tried to build a 64 bit binary. The patches you need are
included in the repository. Beyond that I'm afraid you're on your own. Note
however of you're using something like the NUC platform then there's no
hardware acceleration for video playback so you'll very likely be
disappointed.

Revision history for this message
Nick Couchman (nick-couchman) said :
#2

Alex,
Thanks for the quick response and the hints. I'll let you know if I'm successful getting it to compile and run. A few follow-ups:
- Are the patches .diff files, or just files I should copy over the existing ones?
- Any hints on the Berkelium header files - which ones I need, where to get them from, etc.?

I got a little further, I think, but have run into the following make error, now:
make[4]: Entering directory `/home/devuser/libavg/src/test/plugin'
  CXX BrowserNode.lo
BrowserNode.cpp:11:45: fatal error: ../../graphics/GLContextManager.h: No such file or directory
compilation terminated.

I would guess this means I don't have all of the right header files.

Revision history for this message
Nick Couchman (nick-couchman) said :
#3

I was able to get all of the necessary libraries compiled for 64-bit Ubuntu, and the player seems to be working fine. The following web page was very helpful:
http://samarthparikh.blogspot.com/2014/05/compile-libbrowsernode-on-64-bit-ubuntu.html

Revision history for this message
Paweł Będź (pawel-bedz) said :
#4

Also be aware that you can use 32bit architecture libraries and applications under 64bit OS. I dont know about *buntu, but under debian you just add desired extra architectures using dpkg add-architecture i386 (for 32bit) or something like that and when you install package from repository just install "package_name:i386" (it will then install 32bit version). No need for compiling i suppose.

Revision history for this message
Nick Couchman (nick-couchman) said :
#5

Generally speaking you are correct, you can run 32-bit applications on 64-bit platforms. However, the challenge in this case is that the client is Python-based, and the system-level Python that is installed is 64-bit, which generates a mis-match between the 32-bit libavg libraries and the 64-bit Python binary that is trying to use those libraries. This is what drives the requirement to have the libavg libraries match the system bitness, or at least the Python bitness.

I did look into installing the python:i386 package, but, unfortunately, that conflicts with the 64-bit python package, and python isn't just something you can rip and replace without significant impacts to system functionality. I also tried to compile 32-bit Python into a separate install location (/opt/python-x86), but ran into significant issues with the compile to the point where, even if I got Python compiled and installed, some of the basic Python libraries/functions were broken and I could not get it working fully enough to actually run the Xibo client using 32-bit libavg stuff.

So, surprisingly, working through the challenge of the libavg compile on a 64-bit platform was the quickest/easiest route to getting a working Xibo client on 64-bit Ubuntu. If I get some time in the near-future I can do some more thorough documentation on the Xibo Wiki about how to do the 64-bit compile on Ubuntu.