Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/exp/audio/al: cannot load libopenal.so on android/arm64 #13911

Closed
rakyll opened this issue Jan 11, 2016 · 5 comments
Closed

x/mobile/exp/audio/al: cannot load libopenal.so on android/arm64 #13911

rakyll opened this issue Jan 11, 2016 · 5 comments

Comments

@rakyll
Copy link
Contributor

rakyll commented Jan 11, 2016

The audio example crashes on launch on Nexus 5x because libopenal.so is not loadable.

go version
go version devel +4b0bc7c Tue Jan 5 04:39:11 2016 +0000 darwin/amd64

gomobile version
gomobile version +c2e9cff Mon Jan 11 11:15:55 2016 -0800 (android,ios); androidSDK=

gomobile build -target=android golang.org/x/mobile/example/audio
adb install audio.apk

01-11 12:47:03.660  2140  3326 I ActivityManager: Start proc 8501:org.golang.todo.audio/u0a78 for activity org.golang.todo.audio/org.golang.app.GoNativeActivity
01-11 12:47:03.696  8501  8501 W linker  : /data/app/org.golang.todo.audio-2/lib/arm/libaudio.so: is missing DT_SONAME will use basename as a replacement: "libaudio.so"
01-11 12:47:03.725  8501  8501 I GoLog   : android device reports unknown density: 420
01-11 12:47:03.778  3615  3615 I Keyboard.Facilitator: onFinishInput()
01-11 12:47:03.792  8501  8519 I Adreno  : QUALCOMM build                   : 63c06b2, I8366cd0437
01-11 12:47:03.792  8501  8519 I Adreno  : Build Date                       : 10/21/15
01-11 12:47:03.792  8501  8519 I Adreno  : OpenGL ES Shader Compiler Version: XE031.05.13.02
01-11 12:47:03.792  8501  8519 I Adreno  : Local Branch                     :
01-11 12:47:03.792  8501  8519 I Adreno  : Remote Branch                    : quic/LA.BF64.1.2.9_v2
01-11 12:47:03.792  8501  8519 I Adreno  : Remote Branch                    : NONE
01-11 12:47:03.792  8501  8519 I Adreno  : Reconstruct Branch               : NOTHING
01-11 12:47:03.883  8501  8522 I GoLog   : al: al: cannot load libopenal.so
01-11 12:47:03.908  2140  3321 I WindowState: WIN DEATH: Window{38de486 u0 org.golang.todo.audio/org.golang.app.GoNativeActivity}
01-11 12:47:03.913   531   531 I Zygote  : Process 8501 exited cleanly (1)
01-11 12:47:03.914  2140  6318 I ActivityManager: Process org.golang.todo.audio (pid 8501) has died
01-11 12:47:03.915  2140  6318 W ActivityManager: Force removing ActivityRecord{95cab75 u0 org.golang.todo.audio/org.golang.app.GoNativeActivity t14}: app died, no saved state
01-11 12:47:03.955  2140  3818 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 8501 uid 10078
01-11 12:47:03.956  3615  3615 I Keyboard.Facilitator: onFinishInput()
01-11 12:47:04.046  2140  2261 W WindowAnimator: Failed to dispatch window animation state change.
01-11 12:47:04.046  2140  2261 W WindowAnimator: android.os.DeadObjectException
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.BinderProxy.transactNative(Native Method)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.BinderProxy.transact(Binder.java:503)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.view.Choreographer.doCallbacks(Choreographer.java:670)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.view.Choreographer.doFrame(Choreographer.java:603)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.Handler.handleCallback(Handler.java:739)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.Handler.dispatchMessage(Handler.java:95)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.Looper.loop(Looper.java:148)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at android.os.HandlerThread.run(HandlerThread.java:61)
01-11 12:47:04.046  2140  2261 W WindowAnimator:    at com.android.server.ServiceThread.run(ServiceThread.java:46)
01-11 12:47:04.191   505  2785 D audio_hw_primary: disable_audio_route: reset and update mixer path: low-latency-playback headphones
@rakyll rakyll added this to the Unreleased milestone Jan 11, 2016
@hyangah
Copy link
Contributor

hyangah commented Jan 15, 2016

Can you provide what's included in the .apk file (unzip -l)?
The gomobile tool currently doesn't build for arm64, so I guess the phone loaded the apk built for arm. I thought I fixed the location of arm's libaudio.so location but maybe I was wrong.

@rakyll
Copy link
Contributor Author

rakyll commented Jan 19, 2016

$ unzip -l audio.apk
Archive:  audio.apk
  Length     Date   Time    Name
 --------    ----   ----    ----
     1772  00-00-80 00:00   AndroidManifest.xml
     2192  00-00-80 00:00   classes.dex
  3825132  00-00-80 00:00   lib/armeabi-v7a/libaudio.so
  1604748  00-00-80 00:00   lib/arm/libopenal.so
   176444  00-00-80 00:00   assets/boing.wav
    48028  00-00-80 00:00   assets/gopher.jpeg
  1024817  00-00-80 00:00   assets/test.png
      546  00-00-80 00:00   META-INF/MANIFEST.MF
      572  00-00-80 00:00   META-INF/CERT.SF
     1064  00-00-80 00:00   META-INF/CERT.RSA
 --------                   -------
  6685315                   10 files


$ gobjdump -p lib/arm/libopenal.so

lib/arm/libopenal.so:     file format elf32-littlearm

@hyangah hyangah self-assigned this Jan 21, 2016
@gopherbot
Copy link

CL https://golang.org/cl/18820 mentions this issue.

@hajimehoshi
Copy link
Member

hajimehoshi commented May 3, 2016

This still happens on my Nexus 5x with c435d0bad59e2b7ed945e49fed8547deb8cdcd19:

05-03 23:12:40.511 27902 27902 W linker  : /data/app/org.golang.todo.audio-1/lib/arm64/libaudio.so: is missing DT_SONAME will use basename as a replacement: "libaudio.so"
05-03 23:12:40.518 27902 27902 E libsigchain: Warning: Unexpected sigaction action found 0x7f783124f8
05-03 23:12:40.558 27902 27902 I GoLog   : android device reports unknown density: 420
05-03 23:12:40.595 15942 15942 I Keyboard.Facilitator: onFinishInput()
05-03 23:12:40.604 27902 27917 I Adreno  : QUALCOMM build                   : 63c06b2, I8366cd0437
05-03 23:12:40.604 27902 27917 I Adreno  : Build Date                       : 12/06/15
05-03 23:12:40.604 27902 27917 I Adreno  : OpenGL ES Shader Compiler Version: XE031.05.13.02
05-03 23:12:40.604 27902 27917 I Adreno  : Local Branch                     : mybranch17112971
05-03 23:12:40.604 27902 27917 I Adreno  : Remote Branch                    : quic/LA.BF64.1.2.9_v2
05-03 23:12:40.604 27902 27917 I Adreno  : Remote Branch                    : NONE
05-03 23:12:40.604 27902 27917 I Adreno  : Reconstruct Branch               : NOTHING
05-03 23:12:40.670 27902 27922 I GoLog   : al: al: cannot load libopenal.so
05-03 23:12:40.686  4177  5680 I WindowState: WIN DEATH: Window{7581a48 u0 org.golang.todo.audio/org.golang.app.GoNativeActivity}
05-03 23:12:40.687  4177  5327 W InputDispatcher: channel '7581a48 org.golang.todo.audio/org.golang.app.GoNativeActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
05-03 23:12:40.687  4177  5327 E InputDispatcher: channel '7581a48 org.golang.todo.audio/org.golang.app.GoNativeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
05-03 23:12:40.688  4177  5680 W InputDispatcher: Attempted to unregister already unregistered input channel '7581a48 org.golang.todo.audio/org.golang.app.GoNativeActivity (server)'
05-03 23:12:40.689  3085  3085 I Zygote  : Process 27902 exited cleanly (1)
05-03 23:12:40.691  4177  5679 I ActivityManager: Process org.golang.todo.audio (pid 27902) has died
05-03 23:12:40.692  4177  5679 W ActivityManager: Force removing ActivityRecord{e0852f5 u0 org.golang.todo.audio/org.golang.app.GoNativeActivity t4643}: app died, no saved state
05-03 23:12:40.746  4177  5679 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 27902 uid 10101
05-03 23:12:40.748 15942 15942 I Keyboard.Facilitator: onFinishInput()
05-03 23:12:40.871  4177  4195 W WindowAnimator: Failed to dispatch window animation state change.
05-03 23:12:40.871  4177  4195 W WindowAnimator: android.os.DeadObjectException
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.BinderProxy.transactNative(Native Method)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.BinderProxy.transact(Binder.java:503)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.view.Choreographer.doFrame(Choreographer.java:603)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.Handler.handleCallback(Handler.java:739)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.Handler.dispatchMessage(Handler.java:95)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.Looper.loop(Looper.java:148)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at android.os.HandlerThread.run(HandlerThread.java:61)
05-03 23:12:40.871  4177  4195 W WindowAnimator:        at com.android.server.ServiceThread.run(ServiceThread.java:46)

@hajimehoshi
Copy link
Member

hajimehoshi commented May 3, 2016

There was not /data/data/org.golang.todo.audio/lib directory, where libopenal.so should be.

@golang golang locked and limited conversation to collaborators May 3, 2017
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
where compiled go shared library is located. Android expects
all shared libraries to be in the same directory.

Missing from https://go-review.googlesource.com/17860

Fixes golang/go#13911

Change-Id: I832c6571c2655d4114e0a0c93e663a6b4be702e3
Reviewed-on: https://go-review.googlesource.com/18820
Reviewed-by: Burcu Dogan <jbd@google.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
where compiled go shared library is located. Android expects
all shared libraries to be in the same directory.

Missing from https://go-review.googlesource.com/17860

Fixes golang/go#13911

Change-Id: I832c6571c2655d4114e0a0c93e663a6b4be702e3
Reviewed-on: https://go-review.googlesource.com/18820
Reviewed-by: Burcu Dogan <jbd@google.com>
@rsc rsc unassigned hyangah Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants