Fedora 19 using rpmfussion's NVIDIA driver: libGL error: failed to load driver: swrast - opengl

When running an app that uses Qt 4.7 on my Fedora 19 box I am getting the following errors from the application:
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/Matthew.Hoggan/.drirc: No such file or directory.
libGL error: failed to load driver: swrast ERROR: Error failed to create progam.
I do not see these errors in a stock X11 application where the context is configured using glx. I am assuming this is because Qt uses egl underneath. The same thing happens when using the EGL 3 emulator from http://malideveloper.arm.com/develop-for-mali/tools/opengl-es-3-0-emulator/ while running their cube example.
I have already verified that both xorg-x11-drv-nvidia-libs.i686 and yum install xorg-x11-drv-nvidia-libs.x86_64 rpms are installed.
My system information is:
Linux localhost.localdomain 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20 21:22:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
And glxinfo is:
[Matthew.Hoggan#localhost QtTest]$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
Any suggestions here or is more information needed?

We were able to get rid of the same error messages for octave-4.0.0-rc1 which also use Qt. The bug hunting history can be found here.
It turned out to be an incorrect runpath in a shared library (.so). The runpath contained /usr/lib64. Hence at runtime the /usr/lib64/libGL.so was loaded, instead of the right nvidia /usr/X11R6/lib64/libGL.so.
Workaround
Find the lib or executable which has the incorrect runpath with ldd <app or lib> and chrpath -l <app or lib>
Replace the wrong path with the correct one (without the offending /usr/lib64) using chrpath -r <correct path> <app or lib>
The following one-liner did this for liboctgui.so. Just replace "liboctgui.so" by your value.
chrpath -r $(chrpath -l liboctgui.so | cut -d '=' -f '2' | awk '{gsub(/\/usr\/lib64/, "")}; 1') liboctgui.so
Origin
The incorrect runpath was picked up at compilation time from an irrelevant
-L/usr/lib64 in libQt*.la files located in /usr/lib64.
The comment #18 explains why it is wrong.
And indeed, lib*.la files should not be packaged, according to OpenSUSE own recommendations
Avoid packaging libtool config files (.la files). If you do not
package a static library, and if you are also placing the shared
library in a standard search directory (i.e. %_lib, /usr/%_lib), they
will not be needed.
Removing lib*.la from /usr/lib64 and rebuilding fixed the problem for good.

Related

not recognized as a supported file format ECW gdal api

I'm trying to use ECW files in my application. I've built GDAL Library whit this command:
./configure --with-ecw:/usr/local/hexagon
after completion of build process, when I Entered:
gdalinfo --formats | grep ECW
I got:
ECW -raster- (rw+): ERDAS Compressed Wavelets (SDK 5.5)
JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 5.5)
also when I've used
gdalinfo map.ecw
it returns all metadata of ECW files.
but when I compile my C++ program, it returns:
Error: GDAL Dataset returned null from read
ERROR 4: `map.ecw' not recognized as a supported file format.
Dose anyone know why I can't use ECW files in C++ program?
By the way, I use
Cmake
,GDAL 3.3.0
,Erdas-ECW SDK 5.5 hexagon
for building the program.
I found the answer. This problem occurs if the gdal_bin binary package is installed before creating GDAL.
Just make sure gdal_bin is deleted before installing the version you created.

dpdk-pdump "no driver found for net_pcap_rx_0"

Ubuntu 16, DPDK 16
I have a couple of DPDK-based applications sending packets between two machines and want to capture them with dpdk-pdump. I'm running it with sudo ./build/app/pdump/dpdk-pdump -c 0x00f -- --pdump 'port=0,queue=*,rx-dev=/tmp/rx.pcap', and I see this output and a crash:
EAL: no driver found for eth_pcap_rx_0
EAL: Driver, cannot attach the device
EAL: Error - exiting with code: 1
Cause: vdev creation failed:create_mp_ring_vdev:736
My DPDK was compiled like this: hostname:~/dpdk-stable-16.07.1/x86_64-native-linuxapp-gcc# CONFIG_RTE_LIBRTE_PMD_PCAP=y make (also did export CONFIG_RTE_LIBRTE_PMD_PCAP=y before) so that it builds with libpcap support, as the documentation said to do. And my system has libpcap installed. The make script output shows == Build lib/librte_pdump. Looking around online, I've only found one person with a similar issue, and the suggested fix was what I tried. Is there something else I have to do?
I tried installing the DPDK Ubuntu package's version of the tool and using the dpdk-pdump command, same result.
Unfortunately, setting CONFIG_RTE_LIBRTE_PMD_PCAP=y in command line does not work, so the compiled dpdk-pdump have no pcap support.
In config/common_base set CONFIG_RTE_LIBRTE_PMD_PCAP=y, remove your build directory and recompile the DPDK.
Make sure the .config file you your build directory has CONFIG_RTE_LIBRTE_PMD_PCAP=y
Also if you get following error:
Error: missing pcap.h
rte_eth_pcap.c:19:18: fatal error: pcap.h: No such file or directory
while compiling with option CONFIG_RTE_LIBRTE_PMD_PCAP=y
Install libpcap-dev* package. Eg:
yum install libpcap-devel

Makefile error raspberry-pi 3

I have an issue with Codelite compilation, running on raspbian jessie - these are the (known) steps I have taken to produce it.
First I installed Codelite with apt-get install Codelite, then produced a c++ project.
When running build project I get the error:
/bin/sh -c ' -j 4 -e -f Makefile'
/bin/sh: 1: -j: not found
0 errors, 0 warnings
I note that this error has been found and corrected previously, through running a different version of Codelite from 6.1.1 (that which apt-get installs). I therefore found the updated version of armhf .deb codelite from the rasbian archive with gdebi-gtk. However the updated version (9.1.1) produces the following error (install attempt with the graphical debian):
Error: Dependency is not satisfiable: libclang 1-3.8 (>=3.2)
I do not understand why the package manager cannot update these packages - do they not exist for the pi? I ran the manager as root, so I do not think it is a permissions issue.
EDIT 1:
Thank you for that Fabre. My Enviromental Variables file now looks like this:
CodeLiteDir=/usr/share/codelite
export MAKE=make
I still get the same error however.

Running OpenGL + SDL2 on AWS EC2

I'm using AWS EC2 Ubuntu 14.04 to test my OpenGL + SDL2 application. I am using SDL version 2.0.2. Because AWS EC2 is headless, I am using xvfb and use this script in /etc/init.d/xvfb:
XVFB=/usr/bin/Xvfb
XVFBARGS=":99 -ac -screen 0 1024x768x24"
PIDFILE=/tmp/cucumber_xvfb_99.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)
echo -n "Stopping virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE
rm -f $PIDFILE
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
exit 1
esac
exit 0
These are the linux command before i run the app :
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
But I got "Failed to connect to the Mir Server" error from calling SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)
I am actually doing this because I follow instruction from https://docs.travis-ci.com/user/gui-and-headless-browsers/ and want to do the same in my AWS machine. I tried it also with travis, and The xvfb script is also taken from travis ci setup.
Not sure if this is gonna help but these are the output from glxinfo | grep OpenGL :
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
So, I guess essentially my question is : how to setup OpenGL (preferably version 3) + SDL2 in headless Ubuntu 14.04 ?
Thanks in advance
You have two options.
Use a real X11 server. Headless OpenGL is not supported by most OpenGL implementations. This will allow you to use hardware acceleration. You will need to choose an EC2 instance with the right hardware support.
Use OSMesa. This will give you a software-only implementation that does not require X11 or any other window server at all.
It is normal / expected to get Gallium + llvmpipe as the implementation when hardware acceleration is not available. This is fine. If you need a newer version of OpenGL, you will want to install a newer version of Mesa. Mesa 10.1.3 is more than two years old at this point (it's from May 2014). Getting a newer version of Mesa either means using an alternate repo, installing a different version of Ubuntu, or compiling Mesa yourself.
If you compile Mesa yourself, you can configure it for OSMesa ("off-screen Mesa") which means it will have no dependencies on X11. See Off-screen Rendering for more details.
So, It turns out I need to put this into ~/.bashrc :
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb stop
sh -e /etc/init.d/xvfb start
sleep 3
so that the above script will be run everytime I connect to the machine.
But then, I got a different error saying that the SDL_GL_CreateContext failed. Like #dietrich-app said, I need to update my mesa. The oibaf's graphic drivers ppa are no longer working (every google searches seem to suggest to use that) because it does not support ubuntu 14.04 anymore. I tried to compile mesa on my own but compiling dependencies are very time consuming and cumbersome. Finally, after hours of searching, I found this https://wiki.ubuntu.com/Kernel/LTSEnablementStack and copy paste the following command from that link :
sudo apt-get install --install-recommends linux-generic-lts-wily xserver-xorg-core-lts-wily xserver-xorg-lts-wily xserver-xorg-video-all-lts-wily xserver-xorg-input-all-lts-wily libwayland-egl1-mesa-lts-wily
And I got my mesa updated, and can now run OpenGL + SDL2 on AWS EC2 headless
Thank you for all the helpo

Cross Building From Mac (OS X Capitan) For Raspberry Pi3 (Jessie)

I'm failing to compile a database on my pi therefore I want to compile it on my mac.
I follow mostly this tutorial to build my cross compiler.
System
Mac
My Mac is running with OS X El Capitan 10.11.3
uname -a gives me:
Darwin Andreass-MacBook-Air-2.local 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Pi
uname -a:
Linux raspberrypi 4.1.14-v7+ #4 SMP PREEMPT Wed Mar 23 15:30:13 UTC 2016 armv7l GNU/Linux
Running ./configure --with-system-malloc --allow-fetch in the folder of the db I want to install, gives me the additional info:
* Detecting system configuration
Bash: 4.3.30(1)-release
Use ccache: no
C++ Compiler: GCC 4.9.2 (/usr/bin/c++)
Host System: arm-linux-gnueabihf
Build System: Linux 4.1.14-v7+ armv7l
Cross-compiling: no
Host Operating System: Linux
Build Architecture: armv7l
C++11: ok
Precompiled web assets: yes
Protobuf compiler: /usr/bin/protoc
python: python 2.7.9
Node.js package manager: /usr/local/bin/npm
coffee: external/coffee-script_1.10.0
Browserify: external/browserify_12.0.1
bluebird: external/bluebird_2.9.32
web UI dependencies: external/admin-deps_2.0.3
wget: /usr/bin/wget
curl: /usr/bin/curl
Google Test: external/gtest_1.7.0
termcap: no
boost_system: external/boost_1.56.0
protobuf: -lprotobuf
v8 javascript engine: external/v8_3.30.33.16
RE2: external/re2_20140111
z: -lz
crypto: external/openssl_1.0.1i
ssl: external/openssl_1.0.1i
curl: external/curl_7.40.0
malloc: system
Test protobuf: ok
Test boost: external/boost_1.56.0
Test OpenSSL: external/openssl_1.0.1i
Installation prefix: /usr/local
Configuration prefix: /usr/local/etc
Runtime data prefix: /usr/local/var
Compiler Setup
I installed all the required packages from the tutorial and downloaded
- binutils-2.26.51
- gcc-5.3.0
I set the export variables as following:
export CC=gcc-4.9
export CXX=g++-4.9
export CPP=cpp-4.9
export LD=gcc-4.9
export PREFIX="$HOME/opt/cross"
export TARGET="Linux 4.1.14-v7+"
export PATH="$PREFIX/bin:$PATH"
Error
checking build system type... Invalid configuration `4.1.14-v7+': machine `4.1.14' not recognized
configure: error: /bin/sh ../binutils-2.26.51/config.sub 4.1.14-v7+ failed
Before I had this error, there was also the requirement to specify a host.
Questions
1) What to specifiy for the target?
2) What else needs to be adjusted, from the tutorial, to get it working?
EDIT:
As suggested is the target on the cross compiling machine the target machine: arm-linux-gnueabihf
I guess ./bfd is from this folder /Users/MasterG/opt/cross => /Users/MasterG/opt/cross/bfd which does not exist, because the whole folder did not exist before.