-
Notifications
You must be signed in to change notification settings - Fork 101
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
mmal_component_create_core: could not find component 'vc.ril.camera - again #92
Comments
Does raspivid work? If not, you haven't enabled the camera in the boot config. |
Yeah, would be nice if it would be that easy. Raspivd works like a champ |
This seems similar to a problem that some other people have reported then, but I don't think anyone has yet come back with a solution, and I've never come across it. I build and test on raspbian, so it may be a difference in how the Xenial distro ships the raspberry pi support libs |
Sure. |
Thanks. Very much appreciated. Basically this is the build chain:
|
@thaytan Any comments on this? |
That's how I do it. I suspect Ubuntu must package / link the libs differently somehow. Can you attach the config.log file from the build dir? |
Here you are: |
That looks OK. There's one difference in the generated LDFLAGS (yours is empty, raspbian produces LDFLAGS="-Wl,-z,relro". I don't think that should break anything. Maybe the ubuntu libbcm_host.so doesn't link to everything the same way? Here's what I have: ldd -r /opt/vc/lib/libbcm_host.so |
|
Seems, this is missing in my log:
and this is there instead:
|
I don't know what to make of that either :-/ Here's a couple more things we could compare - ldd output of libgstrpicamsrc.so vs raspivid on raspbian: ldd -r gst-rpicamsrc/src/.libs/libgstrpicamsrc.so ldd -r /usr/bin/raspivid |
libmmal_vc_client is missing in the first dump EDIT: There are a lot more differences...
|
Aha! I think the missing libmmal_vc_client.so is key - it's supposed to be there. Is it in the LIBADD line in src/Makefile.am?
|
Seems so:
|
I think I see - seems Ubuntu might add --as-needed to the linker flags by default. https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition. Let me make a patch for you to test. |
OK. Will be out for an hour or so. Take your time |
It turns out this is a whole rabbit hole. Adding -Wl,--no-as-needed doesn't work because libtool reorders the linker arguments and puts it in the wrong place. There's been a bug open about that since 2006 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650 I'm not sure how to get that done, or why things work when they build the raspivid binary. https://launchpad.net/~ubuntu-pi-flavour-makers/+archive/ubuntu/ppa/+sourcepub/7476907/+listing-archive-extra is the raspberrypi-firmware deb source (sticking a link here so I can find it again later) |
Stupid question: What if your code references a harmless function from mmal_vc_client? Wouldn't that force the linkage? |
one thing that would be easy to try: install meson and build using that. sudo apt-get install meson |
Looks good, doesn't work :) First problem:
Solved:
Then:
|
OK, could work around by installing meson via pip3:
ninja did run, and there is a
|
Oh dear. Seems like your ubuntu has an even older meson than I do (My Raspbian has 0.37.1) and then the newer one pip3 installs might be adding --as-needed by default too. |
:) No, I guess, 0.29 is default for 16.04 LTS. There is a backport of 0.40, but I didn't want to start messing with this. Here is a related bug Motion-Project/motion#351 I couldn't see that linker flag at the first glance, but I might have overseen it.
|
Thanks for finding the motion bug. The same solution doesn't work here because of an annoying wrinkle - libtool will reorder -Wl,--no-as-needed and ruin everything when linking a .so, but leaves them alone when linking a final binary like motion. I also just discovered that I explicitly fixed this in the meson build in 2016 (commit f5416eb) - which is why the flag isn't in the ninja output. However the lib still gets dumped from the output, so I suspect Ubuntu really have made --as-needed the default in ld I've just pushed a patch for the meson build to the no-as-needed branch to explicitly add --no-as-needed. Can you please test that? |
...and tadaaa: Here we are :)
Where to copy the resulting .so? |
If you build with 'meson --prefix=/usr' then ninja install should do the right thing, but you can just copy to /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/ is the easiest way You can also do 'GST_PLUGIN_DIR= |
Yepp. Did it all from scratch again. Works. I had to run The test command produced a test.h264 file. Checking validity right now, but I'm confident. Good job, thanks. Will your merge that change to master? |
I will, and I'll think about what to do with the autotools build here. |
Cool. Thanks for your efforts. Have a nice weekend! |
Thanks for running that down! Meson build fix merged in 79860a0 |
I could just delete the autotools build... |
RPI OS is Xenial 16.04, distribution
https://downloads.ubiquityrobotics.com/pi.html
Build and install fine:
At runtime:
Local test is also not working:
This project seems to be not maintained anymore, but I wanted to try at least
The text was updated successfully, but these errors were encountered: