Forums - GLES 3 library error

5 posts / 0 new
Last post
GLES 3 library error
wd40bomber7
Join Date: 24 Feb 14
Posts: 5
Posted: Mon, 2014-02-24 01:28

I've written a program in C++ for android which uses GLESv3. I am attempting to run this on a Samsung S4 Active, with Android 4.3

Supposidly the phone supports GLES3 

 

However, when attempting to run my application, the program fails to load my library with this error:

Quote:
java.lang.UnsatisfiedLinkError: dlopen failed: empty/mssing DT_HASH in "libGLESv3.so" (built with --hash-style=gnu?)

This seems to indicate the library file itself was compiled wrong, and of course there's no way for me to change that. Am I missing something obvious here, or is GLES v3 broken on the S4 Active?

 

 

Edit 5/5/2014 - Success

I can't figure out how to edit the below posts, so I'm going to edit this one for anyone else with the same problem.

My phone for whatever reason doesn't have the GLES3 library, but, I can still use the GLES3 features. I can't link to them directly, doing so produces the errors that I detailed in these posts. Instead the secret is to use eglGetProcAddress in a matter similar to how GLEW works on windows. That allowed me to use GLES3 functions on my phone without linking to them directly. eglGetProcAddresseeglGetProcAddressglGetProcAddress"

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Wed, 2014-02-26 08:35

I haven't heard of any issues with the S4 Active, and we do extensive testing with OpenGL ES 3 content for all of the commercial drivers that we provide to customers, so I'd be really surprised if this is a matter of OpenGL ES 3 not working at all.

Are you sure you're building correctly?

  • Up0
  • Down0
wd40bomber7
Join Date: 24 Feb 14
Posts: 5
Posted: Tue, 2014-03-04 18:30

I apologize for my delay getting back to you. Here's the build files:

 

Application.mk:

APP_PLATFORM := android-18
# use this to select gcc instead of clang
NDK_TOOLCHAIN_VERSION := 4.8
 
# then enable c++11 extentions in source code
APP_CPPFLAGS += -std=c++11
# or use APP_CPPFLAGS := -std=gnu++11
 
APP_STL:=gnustl_static
#need exceptions for libnoise
APP_CPPFLAGS += -fexceptions
 
Android.mk:
LOCAL_PATH := $(call my-dir)
 
include $(CLEAR_VARS)
 
LOCAL_LDLIBS    := -llog -lGLESv3
 
LOCAL_SHARED_LIBRARIES := SDL2 SDL2_ttf SDL2_mixer
 
LOCAL_MODULE    := main
 
FILE_LIST := $(wildcard $(LOCAL_PATH)/../../../source/*.cpp)
#Added libnoise to the FILE_LIST
FILE_LIST += $(wildcard $(LOCAL_PATH)/noise/*.cpp)
FILE_LIST += $(wildcard $(LOCAL_PATH)/noise/model/*.cpp)
FILE_LIST += $(wildcard $(LOCAL_PATH)/noise/module/*.cpp)
 
LOCAL_SRC_FILES := SDL_android_main.cpp $(FILE_LIST:$(LOCAL_PATH)/%=%)
 
include $(BUILD_SHARED_LIBRARY)

Note that SDL does not natively support GLESv3, but I'm working on that. For now I can't even get the program to link at runtime properly. (But build complets correctly)

Here's some screenshots of the error. The second indicates the exact error when loading libMain.so (compiled by the above) 

http://imgur.com/a/3rRQV

  • Up0
  • Down0
wd40bomber7
Join Date: 24 Feb 14
Posts: 5
Posted: Tue, 2014-03-04 19:16

Sorry for the double post (there's no edit that I can find?) but the program links correctly on an android emulator and runs.

 

The only conclusion I can arrive at is that Qualcomm provided incorrectly compiled libraries for the Samsung S4 Active, which would be rediculous if true, so I hope you have another explanation.

  • Up0
  • Down0
wd40bomber7
Join Date: 24 Feb 14
Posts: 5
Posted: Tue, 2014-03-04 21:00

Super sorry about the triple post but I felt this was important information:

the Android NDK r9c comes with a GLESv3 sample. This sample crashes on my s4 active and logcat spits out exactly the same error.

Just some background I think I should have provided earlier:

Phone: Samsung S4 Active (SGH-I537)

Android Version: 4.3

 

Upon running the compiled sample (compiled using the command specified in the sample readme, nothing more nothing less) the app crashes and logcat says:

FATAL EXCEPTION: GLThread 33090

java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libGLESv3.so" needed by "libgles3jni.so"; caused by empty/missing DT_HASH in "libGLESv3.so" (built with --hash-style=gnu?)

at java.lang.Runtime.loadLibrary(Runtime.java:362)

at java.lang.System.loadLibrary(System.java.525)

at com.android.gles3jni.GLES3JNILib.<clinit>(GLES3JNILib.java:24)

at com.android.gles3jni.GLES3JINView$Render.onSurfaceCreated(GLES3JNIView.java:56)

Looks like my phone has an incorrectly compiled library for GLES v3, so much for "extensive testing" Is there any way to make this work? I bought this phone as my only test platform and now it's too late to return it and get a device which actually works.... Very frustrating

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.