Code Monkey home page Code Monkey logo

Comments (5)

MkfsSion avatar MkfsSion commented on June 10, 2024 1

Add "-rpath=/system/lib"(in aarch64 add -rpath=/system/lib64) to LDFLAGS would fix this problem.

from play-audio.

 avatar commented on June 10, 2024 1

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.

nonnymoose avatar nonnymoose commented on June 10, 2024

Here are the errors on my device:

script.txt

from play-audio.

SDRausty avatar SDRausty commented on June 10, 2024

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
$

screenshot_20170826-191916

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.

PaulBatchelor avatar PaulBatchelor commented on June 10, 2024

Thanks for all the help folks! Will try this out in a few days.

from play-audio.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.