I am attempting to learn Qt and am attempting to use the QGraphicsView but when I compile I get this error:
:-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL
:-1: error: cannot find -lGL
:-1: error: collect2: error: ld returned 1 exit status
I searched around and it seems to have something to do with 64bit/32bit packages, I have gcc which is 64bit and I installed mesa-devel which I assume is also 64bit. The only 32bit thing I can think of is perhaps the 32 bit libraries the nvidia installer asks to add tot he system (which I said yes to). Any guidance would be appreciated.
ps: It is probably some simple problem but its 3 am here so I am feeling a bit tired, hopefully when I wake up someone will have left the answer to my problem here
you seem to have the i586 version of Mesa-libGL-devel installed. This won’t work!
You need to install the x86_64 version.
Use “rpm -q Mesa-libGL-devel” to check, or the “Versions” tab in YaST.
If you want to build a 32bit application, you should additionally install Mesa-libGL-devel-32bit, this is co-installable with the 64bit Mesa-libGL-devel.
How exactly are you trying to compile that application?
It seems like your linker path is set wrong.
But I still find it strange that you would get “skipping incompatible /usr/lib/libGL.so when searching for -lGL” when /usr/lib/libGL.so isn’t installed, but “cannot find -lGL” when it is…
Its just some tutorial I am following, nothing complicated.
I initially attempted to install qtcreator from the repos but that was causing issues so i just downloaded and installed it from the qt community site.
There is no such package as Mesa-libGL-32bit
> se Mesa-libGL1-32bit
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+-------------------+---------+--------------+--------+---------------------
i | Mesa-libGL1-32bit | package | 9.2.3-61.9.1 | x86_64 | openSUSE-13.1-Update
v | Mesa-libGL1-32bit | package | 9.2.2-61.6.1 | x86_64 | openSUSE-13.1-Oss
~> se Mesa-libGL-devel
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+------------------------+---------+--------------+--------+---------------------
i | Mesa-libGL-devel | package | 9.2.3-61.9.1 | x86_64 | openSUSE-13.1-Update
v | Mesa-libGL-devel | package | 9.2.2-61.6.1 | x86_64 | openSUSE-13.1-Oss
v | Mesa-libGL-devel | package | 9.2.3-61.9.1 | i586 | openSUSE-13.1-Update
v | Mesa-libGL-devel | package | 9.2.2-61.6.1 | i586 | openSUSE-13.1-Oss
i | Mesa-libGL-devel-32bit | package | 9.2.3-61.9.1 | x86_64 | openSUSE-13.1-Update
v | Mesa-libGL-devel-32bit | package | 9.2.2-61.6.1 | x86_64 | openSUSE-13.1-Oss
Maybe “QT_INSTALL_LIBS” is set to /usr/lib in your case? Try to change all of them to the values above, those are the defaults of the openSUSE package.
Oh.
I did have this in mind at first, but then I really thought you should be able to compile libGL applications with the nvidia driver installed.
Hm.
As I don’t have an nvidia system, I cannot really help you there, sorry.
But another question. How did you actually install the nvidia driver?
If it was by “the hard way”, it just overwrites libGL with its own version, so that might explain it.
As the blacklist is about the kernel module, it would be in /etc/modprobe.d/.
Also check that you don’t have “nomodeset” amongst your kernel boot options.
And /etc/sysconfig/kernel should contain NO_KMS_IN_INITRD=“no”. You have to run mkinitrd after you change that though.