-
Notifications
You must be signed in to change notification settings - Fork 1.7k
raspberry pi 3: startx crash on openbox and lxde after latest upgrade #625
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
Comments
If you are wanting to use the experimental arm side GL driver, then make sure it is on the ld library patch before /opt/vc/lib. See: anholt/mesa#24 |
I think the problem is that by putting the SONAME on those GL libs, you are now going to run into problems where userland progs that have been compiled with mesa version and linked against symbols that don't exist in the RPi version. |
I have confirmed that kodi linked with previous /opt/vc/lib libraries will still run after the update. However our position is that /opt/vc/lib should be before /usr/lib/* in the ld library path if you want to use the firmware side GL driver and it should be after if you want to use the arm side GL driver. raspi-config will support this behaviour. |
Clue: #110 |
It also affects me on Raspberry Pi 2 |
@tesfabpel No me too reports please. |
This has nothing to do with the "experimental arm side GL driver", AFAICT. Surely anything linked against EGL but not GLESv2 is going to have issues with undefined symbols, if it is forced to use the RPi supplied libEGL? |
@clivem we are trying to discover if the only issue is the ld library path ordering. |
@popcornmix ArchLinux ARM. |
Well, either I'm doing a bad job at explaining or you are not listening. Have fun! |
@clivem, What kind of comment/attitude is that? Please respect others free contribution |
@tesfabpel What are the exact symptoms you see? Posy any error messages you see. In raspbian the desktop manager and typical apps do not use EGL. |
I use LXDM as the display manager... In its logs there is a line saying the same as above (/opt/vc/lib/libEGL.so.1: undefined symbol: glDiscardFramebufferEXT) I tried spawning a blank X server with this command: Then I commented the line in /etc/ld.so.conf.d/00-raspberry-firmware.conf (/opt/vc/lib), then ran |
Almost everything. You won't be able to run apps using firmware side 3D or camera or video decode. |
@tesfabpel Does renaming (still not a perfect solution, but may allow camera/video to work, but not firmware side 3d). |
@popcornmix I'm not at home at the moment, but the kludge I implemented this morning, following a Fedora build that included that userland SONAME patch, when anything I had linked to libEGL stopped working, was to add -lGLESv2 to the CMakefile.txt EGL target_libraries and rebuild userland. Cant just add GLESv2, because then you have a recursive build dependency, GLESv2 has EGL as a target lib. |
@clivem do you mean:
That's not something that works in my cross compile environment (presumably as there is no GLESv2 installed when this runs). |
@popcornmix I don't think it changes anything at all...
That's because
And in the .d directory there are only these two files: |
On raspbian the mesa libs come from |
Yep, that's it. (For me it worked, compiling on a Pi with the Fedora system mesa-libGLES-devel package installed, so /usr/lib/libGLESv2.so was there to satisfy ld at link time.) I wasn't saying this was the "right" way to sort this, but just a quick band-aid, for me to get on with doing productive things this morning. Re-compiling every app to explicitly link against libGLESv2 additionally, (that had previously been compiled against system/mesa EGL), isn't the answer. If the Rpi libEGL needs libGLESv2 to avoid unsatisifed symbols with apps that have been compiled against system EGL without needing a specific -lGLESv2, it needs sorting there, IMHO.
(My RPi vc stuff lives in /usr/lib/vc, not under /opt/vc like you do it with Raspbian. Not that this matters.) |
I've done an raspberrypi-firmware-20160703-1* update now. System is ALARM (Arch Linux on Raspbery 3) /etc/ld.so.conf.d/00-raspberrypi-firmware.conf
So the
is gone. Problem is, kodi wants libs in /opt/vc/lib/
My workaround is:
|
With the firmware update "raspberrypi-firmware-20160704-1" kodi is crashing. |
If you are having problems with the update then: We are working on an alternative solution to this. It may be pushed out tomorrow. |
Do you want me to be the crash test dummy, before you push it to firmware? ;) |
I think the new scheme should be safe for the next update. The real issue to avoid the wrong libEGL.so / libGLESv2.so being picked up in the different use cases (firmware GL driver/experimental arm GL driver/mesa software GL driver). We've decided ld library path ordering can handle the first two cases but not the third (where both firmware GL driver and mesa software GL driver may both be wanted in same session). We've got to go for the more disruptive (but probably more correct) scheme. The libs in /opt/vc/lib will be renamed to avoid the collision. e.g. We'll announce the change that is happening and encourage applications that use the firmware GL driver to rebuild with the new names. In a subsequent raspbian release we'll remove the old named firmware GL libs. |
I'm probably being dim, but why on earth would anyone want to use (software) mesa when there is a drop-in replacement (hardware) accelerated GL driver available? What am I missing? I mean, anyone who has used an nvidia card in Linux for years, with their binary drivers, ends up using their replacement GL lib at runtime, (typically by having it first in ld path before any other copy), and doesn't need to fallback to using mesa. I don't get why, if there is a hardware accelerated libEGL available, you'd want to use mesa version in same session..... |
The firmware driver doesn't integrate with X, and is GLES only (most X apps are desktop GL). Currently the hardware mesa driver is experimental and stops the use of gpu facilities like camera and video decode. There will be new schemes for these but they will take time. So all 3 drivers have their uses. Maybe there will come a day when everyone uses the one true driver, but it's not today. |
Thanks for the explanation. That makes more sense now. (And you're probably figuring out about now, that 95% of my Pi usage is headless, and that I don't use camera or video decode.) |
…with mesa lib firmware: makefile: Switch to building and using GL libs with custom names See: #625 firmware: platform: Fix avoid_lcd=2 firmware: dt-blob: Enable pullups on Pi3 SDIO pins
…with mesa lib firmware: makefile: Switch to building and using GL libs with custom names See: raspberrypi/firmware#625 firmware: platform: Fix avoid_lcd=2 firmware: dt-blob: Enable pullups on Pi3 SDIO pins
I've pushed a firmware update. Does this resolve the issue? |
@popcornmix This is just reverting the SONAME patch, not what you proposed above with libbrcmEGL and libbrcmGLESv2 naming, right? |
No it is both. |
@popcornmix Can you please check the update into userland repo? |
Ah yes. Done. |
Ta. I'll spin a re-build of my Fedora packages..... |
On ALARM (Arch Linux) everything seems fine now. Thanks! |
@enricoT is it okay for you now? |
@popcornmix Seems fine to me... Thanks! :) |
…with mesa lib firmware: makefile: Switch to building and using GL libs with custom names See: raspberrypi#625 firmware: platform: Fix avoid_lcd=2 firmware: dt-blob: Enable pullups on Pi3 SDIO pins
Where was this announced? Nobody seems to know about it at all. |
Set LDFLAGS to use -lbrcmEGL and -lbrcmGLESv2 if these files exist: /opt/vc/lib/libbcrmEGL.so /opt/vc/lib/libbcrmGLESv2.so Otherwise set LDFLAGS to use -lEGL and -lGLESv2 for older versions of Raspbian. raspberrypi/firmware#625 Thank you to @jdonald for reporting this issue.
openbox: symbol lookup error: /opt/vc/lib/libEGL.so.1: undefined symbol: glDiscardFramebufferEXT
To open openbox or lxde downgrade was necessary:
[2016-07-03 14:04] [PACMAN] Running 'pacman -U linux-raspberrypi-4.4.14-1-armv7h.pkg.tar.xz raspberrypi-firmware-bootloader-20160627-1-any.pkg.tar.xz raspberrypi-firmware-bootloader-x-20160627-1-any.pkg.tar.xz raspberrypi-firmware-tools-20160627-1-any.pkg.tar.xz raspberrypi-firmware-examples-20160627-1-any.pkg.tar.xz raspberrypi-firmware-20160627-1-any.pkg.tar.xz'
[2016-07-03 14:04] [ALPM] transaction started
[2016-07-03 14:04] [ALPM] downgraded linux-raspberrypi (4.4.14-2 -> 4.4.14-1)
[2016-07-03 14:04] [ALPM-SCRIPTLET] >>> Updating module dependencies. Please wait ...
[2016-07-03 14:04] [ALPM] downgraded raspberrypi-firmware-bootloader (20160702-1 -> 20160627-1)
[2016-07-03 14:04] [ALPM] downgraded raspberrypi-firmware-bootloader-x (20160702-1 -> 20160627-1)
[2016-07-03 14:04] [ALPM] downgraded raspberrypi-firmware-tools (20160702-1 -> 20160627-1)
[2016-07-03 14:06] [ALPM] downgraded raspberrypi-firmware-examples (20160702-1 -> 20160627-1)
[2016-07-03 14:06] [ALPM] downgraded raspberrypi-firmware (20160702-1 -> 20160627-1)
The text was updated successfully, but these errors were encountered: