Comments (5)
Add "-rpath=/system/lib"(in aarch64 add -rpath=/system/lib64) to LDFLAGS would fix this problem.
from play-audio.
As written above, thats fixable by linker flag "-rpath=/system/lib". That's because play-audio requires complete NDK sysroot which is not available in Termux.
Just change makefile LDFLAGS to:
LDFLAGS += -lOpenSLES -Wl,-rpath=/system/lib
Samsung devices may require different line:
LDFLAGS += -lOpenSLES -Wl,-rpath=/system/lib -Wl,-rpath=/system/vendor/lib
Of course, if device is 64-bit, you will have to use /system/lib64
and /system/vendor/lib64
.
Another problem you can encounter is that you can't use "play-audio" without wrapper. See how Termux package does it: https://github.com/termux/termux-packages/blob/master/packages/play-audio/build.sh.
#!/data/data/com.termux/files/usr/bin/sh
# Avoid linker errors due to libOpenSLES.so:
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libc++_shared.so LD_LIBRARY_PATH= exec /data/data/com.termux/files/usr/bin/play-audio "$@"
from play-audio.
Here are the errors on my device:
from play-audio.
Trying to build play-audio
in Termux:💪
$ gcl https://github.com/termux/play-audio
Cloning into 'play-audio'...
remote: Counting objects: 23, done.
remote: Total 23 (delta 0), reused 0 (delta 0), pack-reused 23
Unpacking objects: 100% (23/23), done.
$ cd play-audio/
$ l
total 40
drwx------ 3 u0_a93 u0_a93 4096 Aug 26 18:33 .
drwx------ 12 u0_a93 u0_a93 4096 Aug 26 18:33 ..
drwx------ 7 u0_a93 u0_a93 4096 Aug 26 18:33 .git
-rw------- 1 u0_a93 u0_a93 11 Aug 26 18:33 .gitignore
-rw------- 1 u0_a93 u0_a93 448 Aug 26 18:33 Makefile
-rw------- 1 u0_a93 u0_a93 244 Aug 26 18:33 README.md
-rw------- 1 u0_a93 u0_a93 689 Aug 26 18:33 play-audio.1
-rw------- 1 u0_a93 u0_a93 9189 Aug 26 18:33 play-audio.cpp
$ make
g++ -Wall -Wextra -Werror -std=c++14 -fno-exceptions -lOpenSLES play-audio.cpp -o play-audio
/data/data/com.termux/files/usr/bin/ld: warning: libqc-opt.so, needed by /system/lib64/libskia.so, not found (try using -rpath or -rpath-link)
.
.
.
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [<builtin>: play-audio] Error 1
$
Complete make
output👍 at https://sdrausty.github.io/logs/make-play-audio.txt
and at https://github.com/sdrausty/sdrausty.github.io/blob/master/logs/make-play-audio.md
also at https://sdrausty.github.io/logs/make-play-audio.html
and https://sdrausty.github.io/logs/make-play-audio
Numbering the lines has almost always failed, even though numerous attempts connected to a few of the above links with cat -n
in Termux, with GitHub... Locally the files are numbered 'till tail, upon consecutive attempt. Uploading cuts file numbering at 99 once published? Is anyone else having problems with cat -n
in Termux, and/or subsequently uploading numbered files to github.com or any other Termux anomalies?
from play-audio.
Thanks for all the help folks! Will try this out in a few days.
from play-audio.
Related Issues (12)
- allow piped input from stdin HOT 3
- SL_PREFETCHSTATUS_UNDERFLOW after playing sounds HOT 1
- CANNOT LINK EXECUTABLE "play-audio": cannot locate symbol "EVP_MD_CTX_init" referenced by "/system/lib64/libsqlite.so"... HOT 11
- HOW TO CONTROL HOT 1
- Package is compiled for arm64 HOT 2
- play opus file get the error: underflow when prefetching data HOT 1
- how to have play-audio play lazy 8 loop? HOT 3
- Library not found HOT 3
- Start at time request HOT 2
- how to change volume HOT 2
- Play audio from a file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-audio.