Bug 1177

Summary: libnewt.so: undefined symbol: bcm_host_init" when Screen is initialized before OpenGL, commonly seen on Raspberry Pi using Processing 3
Product: [JogAmp] Newt Reporter: Xerxes Rånby <xerxes>
Component: embeddedAssignee: Sven Gothel <sgothel>
Severity: enhancement    
Priority: ---    
Version: 2.3.2   
Hardware: embedded_arm   
OS: all   
Type: --- SCM Refs:
Workaround: ---
Attachments: commit-5667e43-Fix1177.patch

Description Xerxes Rånby 2015-07-17 14:47:11 CEST
Processing 3 codebase initializes the NEWT Screen before OpenGL

On Raspberry Pi NEWT initialization of
display = NewtFactory.createDisplay(null);
fail with the error
"symbol lookup error: ../path/to/processing_sketch/libnewt.so: undefined symbol: bcm_host_init"
Comment 1 Xerxes Rånby 2015-07-17 14:51:51 CEST
Created attachment 707 [details]

Fixes the issue by adding a
GLProfile.initSingleton() to bcm/vc/iv/DisplayDriver static initialization
this will preload libEGL and indirect load libbcm_host.so that contain the missing symbol.

ldd /opt/vc/lib/libEGL.so
libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x76eb4000)

as discussed on IRC:
Comment 2 Xerxes Rånby 2015-07-17 22:40:55 CEST
commit 5667e4320443289a1c0bd02f54bf466bfc2c5895

    bcm/vc/iv/DisplayDriver depend on libEGL, pre-load it using GLProfile

    Fixes libnewt.so: undefined symbol: bcm_host_init"
    when the NEWT Screen is initialized before OpenGL ES.