ofAppGLFWWindow: 65542: EGL: Failed to get EGL display: Success

Hello, I have a project that needs to run computer vision program on Ubuntu Mate 16.04.2 LTS (Raspberry Pi 3).
My project is based on of_v0.9.8_linuxarmv7l and it uses the addon called ofxCvPiCam.
It could build successfully, but it occurred some errors and crashed when I ran the application.

The error messages are below:
[ error ] ofAppGLFWWindow: 65542: EGL: Failed to get EGL display: Success
[ error ] ofAppGLFWWindow: couldn’t init GLFW
[ error ] ofAppGLFWWindow: 65537: The GLFW library is not initialized
[ error ] ofAppGLFWWindow: 65537: The GLFW library is not initialized
[ error ] ofAppGLFWWindow: 65537: The GLFW library is not initialized

Does anyone know how to solve this problem?
I need some suggestions T_T

I have the same issue with a BeagleBone Black. I installed the SGX (omaplfb). Any help would be appreciated,

My system is:

BleagleBone Black
Debian 8.7
uname: Linux beaglebone 4.4.102-bone21 #1 Sat Nov 25 19:21:55 UTC 2017 armv7l GNU/Linux
lsmod is
omaplfb 12718 0
tilcdc 27989 1 omaplfb
snd_soc_davinci_mcasp 16463 0
snd_soc_edma 1482 1 snd_soc_davinci_mcasp
snd_soc_omap 3314 1 snd_soc_davinci_mcasp
snd_soc_core 157504 3 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap
snd_pcm_dmaengine 5401 2 snd_soc_core,snd_soc_omap
snd_pcm 81242 4 snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
snd_timer 18513 1 snd_pcm
snd 58786 3 snd_soc_core,snd_timer,snd_pcm
soundcore 7321 1 snd
evdev 10611 1
tda998x 11086 0
uio_pdrv_genirq 3629 0
uio 9062 1 uio_pdrv_genirq
8021q 19014 0
garp 6172 1 8021q
mrp 7540 1 8021q
stp 2309 1 garp
llc 5277 2 stp,garp
usb_f_mass_storage 41986 2
usb_f_acm 7351 2
u_serial 10564 3 usb_f_acm
usb_f_ecm 9784 2
usb_f_rndis 22675 2
u_ether 11397 2 usb_f_ecm,usb_f_rndis
libcomposite 43799 16 usb_f_acm,usb_f_ecm,usb_f_rndis,usb_f_mass_storage
pvrsrvkm 159759 1 omaplfb
spidev 7691 0
tieqep 9206 0

The command I run is:
sudo xinit $(pwd)/polygonExample

The output is
[ error ] ofAppGLFWWindow: 65542: EGL: Failed to get EGL display: Success
[ error ] ofAppGLFWWindow: couldn’t init GLFW
[ error ] ofAppGLFWWindow: 65537: The GLFW library is not initialized

ldd output
linux-vdso.so.1 (0xbed01000)
libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0xb6f23000)
libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0xb6eae000)
libssl.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0 (0xb6e65000)
libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0 (0xb6d3f000)
libcairo.so.2 => /usr/lib/arm-linux-gnueabihf/libcairo.so.2 (0xb6c86000)
libGLESv1_CM.so.1 => /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1 (0xb6c72000)
libGLESv2.so => /usr/lib/arm-linux-gnueabihf/libGLESv2.so (0xb6c07000)
libEGL.so => /usr/lib/arm-linux-gnueabihf/libEGL.so (0xb6f8b000)
libX11.so.6 => /usr/lib/arm-linux-gnueabihf/libX11.so.6 (0xb6b12000)
libXrandr.so.2 => /usr/lib/arm-linux-gnueabihf/libXrandr.so.2 (0xb6afc000)
libXxf86vm.so.1 => /usr/lib/arm-linux-gnueabihf/libXxf86vm.so.1 (0xb6ae8000)
libXi.so.6 => /usr/lib/arm-linux-gnueabihf/libXi.so.6 (0xb6acd000)
libXcursor.so.1 => /usr/lib/arm-linux-gnueabihf/libXcursor.so.1 (0xb6ab6000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6aa3000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6a80000)
libfreeimage.so.3 => /usr/lib/libfreeimage.so.3 (0xb6a08000)
libboost_filesystem.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_filesystem.so.1.55.0 (0xb69e6000)
libboost_system.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_system.so.1.55.0 (0xb69d3000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb691c000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb68a8000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb687f000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb678e000)
/lib/ld-linux-armhf.so.3 (0xb6f74000)
libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0xb6766000)
libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6744000)
libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0xb671b000)
libpixman-1.so.0 => /usr/lib/arm-linux-gnueabihf/libpixman-1.so.0 (0xb6693000)
libxcb-shm.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-shm.so.0 (0xb667f000)
libxcb-render.so.0 => /usr/lib/arm-linux-gnueabihf/libxcb-render.so.0 (0xb6668000)
libxcb.so.1 => /usr/lib/arm-linux-gnueabihf/libxcb.so.1 (0xb6643000)
libXrender.so.1 => /usr/lib/arm-linux-gnueabihf/libXrender.so.1 (0xb662c000)
libXext.so.6 => /usr/lib/arm-linux-gnueabihf/libXext.so.6 (0xb6611000)
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb65fa000)
libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0xb65df000)
libglapi.so.0 => /usr/lib/arm-linux-gnueabihf/libglapi.so.0 (0xb65bb000)
libsrv_um.so => /usr/lib/libsrv_um.so (0xb6589000)
libIMGegl.so => /usr/lib/libIMGegl.so (0xb656f000)
libXfixes.so.3 => /usr/lib/arm-linux-gnueabihf/libXfixes.so.3 (0xb655a000)
libjpeg.so.62 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.62 (0xb6511000)
libmng.so.1 => /usr/lib/arm-linux-gnueabihf/libmng.so.1 (0xb64b2000)
libopenjpeg.so.5 => /usr/lib/arm-linux-gnueabihf/libopenjpeg.so.5 (0xb648b000)
libIlmImf.so.6 => /usr/lib/arm-linux-gnueabihf/libIlmImf.so.6 (0xb63ec000)
libImath.so.6 => /usr/lib/arm-linux-gnueabihf/libImath.so.6 (0xb63d7000)
libHalf.so.6 => /usr/lib/arm-linux-gnueabihf/libHalf.so.6 (0xb6384000)
libIex.so.6 => /usr/lib/arm-linux-gnueabihf/libIex.so.6 (0xb6360000)
libIlmThread.so.6 => /usr/lib/arm-linux-gnueabihf/libIlmThread.so.6 (0xb634b000)
libraw.so.10 => /usr/lib/arm-linux-gnueabihf/libraw.so.10 (0xb62b2000)
liblcms2.so.2 => /usr/lib/arm-linux-gnueabihf/liblcms2.so.2 (0xb6269000)
libtiff.so.5 => /usr/lib/arm-linux-gnueabihf/libtiff.so.5 (0xb6202000)
libgomp.so.1 => /usr/lib/arm-linux-gnueabihf/libgomp.so.1 (0xb61e2000)
libXau.so.6 => /usr/lib/arm-linux-gnueabihf/libXau.so.6 (0xb61d7000)
libXdmcp.so.6 => /usr/lib/arm-linux-gnueabihf/libXdmcp.so.6 (0xb61c3000)
libjasper.so.1 => /usr/lib/arm-linux-gnueabihf/libjasper.so.1 (0xb6179000)
liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0xb6151000)
libjbig.so.0 => /usr/lib/arm-linux-gnueabihf/libjbig.so.0 (0xb6136000)