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)
- Prevent video from unloading after end HOT 1
- 仿照WindowsStore Example在WinUI3上初始化SwapChain失败 HOT 40
- 去掉不必要的解码器 HOT 1
- Dead lock HOT 2
- 是否有接口可以传入h264数据解码播放 HOT 12
- 请教一个问题,onFrame 在窗口最小化时就没有回调了,导致窗口最小化时视频相当于就被暂停了,有什么好的解决方法吗 HOT 12
- Optimize seek(0, mdk::SeekFlag::FromStart) HOT 1
- App crashes onFrame during seek HOT 4
- OpenCV Support HOT 4
- Get current timestamp to update Slider HOT 1
- 建议写一个positionChanged的信号 HOT 4
- seek(-1LL, SeekFlag::FromNow|SeekFlag::Frame) 似乎退了几帧之后就无法再继续后退了 HOT 5
- rtsp内存泄露 HOT 17
- The video is not displayed when using QUdpSocket HOT 11
- WAV not playing HOT 1
- Audio synchronization with external sync callback and audio stream HOT 1
- mdk支持安卓上打开本地摄像头吗? HOT 5
- qt+macos上如何引入文件? HOT 3
- Unable to get pixel aspect ratio of a video HOT 3
- Video stuttering when rendering to SFML texture HOT 21
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.