Comments (13)
It was a problem with symlinks, apparently. I've removed libmdk.so.0 and recreated symlinks as follows:
libmdk.so -> libmdk.so.0
libmdk.so.0 -> libmdk.so.0.10.0.dsym
Please tell me if this is correct.
update:
renaming libmdk.so.0.10.0.dsym
to libmdk.so.0
and linking libmdk.so -> libmdk.so.0
also works
from mdk-sdk.
which sdk do you use? it should be mdk-sdk-linux for rpi4. and what's you os arch? armhf or arm64?
dsym is debug symbol file. usually you don't need it. I use lld as linker, maybe some linker flags are not compatible with gnu ld. Please wait a few days because now i have no device to test.
from mdk-sdk.
Tried both, same thing happens. I can test for you anytime you leave a note.
from mdk-sdk.
It seems only dsym is not throwing errors. I use G++ linker standard ld, tried versions from 6 to 8
from mdk-sdk.
Armhf
from mdk-sdk.
This is weird: on PI4 the above relinking method works, but only for raspberry-pi binaries, for linux libraries (armhf) I get this after ldconfig:
/usr/local/lib/libmdk.so.0: symbolic link to lib.mdk.so
and a message that object file has no dynamic section.
from mdk-sdk.
I found that the same error appears when you press F3 on libmdk.so.0 in Midnight Commabder
from mdk-sdk.
Can you try lld? What about old mdk binaries?
/usr/local/lib/libmdk.so.0: symbolic link to lib.mdk.so and a message that object file has no dynamic section.
If it's a warning, you can ignore it.
from mdk-sdk.
I find the same issue on stack overflow, but no answer. You can try the follow script on rpi to generate a stub so file for ld
build_stub_so(){
cc -shared $1 -o $2 -Wl,-soname,$3
}
build_stub_so_1(){
# --no-weak
local so=$1
local STUB_C=/tmp/${so##*\/}.c
local STUB_SO=${so##*\/}
local SYMS=/tmp/${so##*\/}.txt
nm -gD --defined-only $so >$SYMS
funcs=($(cat $SYMS |grep " T " |grep -vE 'T _fini|T _init' |awk '{print $3}' |uniq))
funcs=(${funcs[@]/%/()\{\}})
echo ${funcs[@]/#/void } >$STUB_C
wfuncs=($(cat $SYMS |grep " W " |awk '{print $3}' |uniq))
[[ ${#wfuncs} > 0 ]] && {
wfuncs=(${wfuncs[@]/%/()\{\}})
echo ${wfuncs[@]/#/void __attribute__((weak))} >>$STUB_C
}
#vars=($(cat $SYMS |grep " B " |grep -vE 'B _bss|B __bss_|B _end|B __end' |awk '{print $3}' |uniq))
[[ ${#vars} > 0 ]] && {
echo ${vars[@]/#/;int } >> $STUB_C
echo ';' >> $STUB_C
}
soname=`objdump -x $so |grep SONAME |awk '{print $2}'`
build_stub_so $STUB_C $STUB_SO $soname
rm $STUB_C
rm $SYMS
}
build_stub_so_1 $1
Save it as build_stub.sh, and run ./build_stub.sh path_to_so_file
, then the generated so can be used by linker when build your programs. The original libmdk.so.0 is used at runtime.
from mdk-sdk.
Can you try lld? What about old mdk binaries?
/usr/local/lib/libmdk.so.0: symbolic link to lib.mdk.so and a message that object file has no dynamic section.
If it's a warning, you can ignore it.
Tried lld. The invalid offset flood is gone, but got this instead:
ld.lld: warning: lld uses extended branch encoding, no object with architecture supporting feature detected.
ld.lld: warning: lld may use movt/movw, no object with architecture supporting feature detected.
But it compiles as before.
Which version should I try next? I can see in old folder max 0.4.1 version
Edit: I'm gonna try your script in a moment.
from mdk-sdk.
Confirmed on my rpi4. Don't know the reason yet. The warnings can be ignored.
The script works perfectly. Remove the old libmdk.so, run
rm mdk-sdk/lib/armhf/libmdk.so
./build_stub.sh mdk-sdk/lib/armhf/libmdk.so.0
mv libmdk.so.0 mdk-sdk/lib/armhf/libmdk.so
from mdk-sdk.
ld.lld: warning: lld uses extended branch encoding, no object with architecture supporting feature detected.
ld.lld: warning: lld may use movt/movw, no object with architecture supporting feature detected.
lld-8 or later is fine. I guess it's an lld bug.
from mdk-sdk.
Sorry for late reply. Your script works great with standard linker. The final so file is rather small though, but that's to be expected I believe.
from mdk-sdk.
Related Issues (20)
- QR Code watermark showing HOT 7
- qt android mdk播放mp3,切换音乐时大概率出现杂音 HOT 2
- Changing decoders on Player make others turn blank [open source reproducer] HOT 8
- set FPS for multiple player? HOT 4
- How to get a list of current active tracks HOT 1
- Set Bitrate HOT 1
- 视频中间显示了一个二维码 HOT 1
- [Android]: SetGlobalOption("subtitles.fonts.dir", ...) does not work HOT 2
- setMedia("avdevice://gdigrab:desktop") HOT 2
- 关于RTMP延迟问题 HOT 1
- mdk中可以设置加密解密参数吗? HOT 19
- mdk的倍速setPlaybackRate不支持264/265裸流文件? HOT 3
- mdk支持大分辨率的MP4文件硬解码吗 HOT 5
- Customize subtitles apprearance HOT 2
- Improving the example of Android java wrapper
- Multi audio channels support HOT 7
- .ts h265 HOT 2
- ffmpeg 7 support HOT 2
- record方法录制的文件在哪里?Flutter+Windows11 HOT 14
- video playing problem HOT 1
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 mdk-sdk.