32 bit opengl linux

Войти

347 people online

Follow us

Реклама

Партнёры

Форум

PlayOnLinux is unable to find 32bits OpenGL libraries in Ubuntu 14.04 64bit

Автор Replies
myromance123 Friday 2 May 2014 at 16:33
myromance123

I have managed to solve this problem. Please scroll down to see how I resolved it. This only applies to 64bit Ubuntu systems AFTER 13.04. The fix is not noob or beginner friendly, you will have to step outside your comfort zone.

Hi there,
first off the important information as per sticky requirements:

1. Ubuntu 14.04 64bit
2. PlayOnLinux 4.2.2
3. Unity 7
4. POL throws the following «PlayOnLinux is unable to find 32bits OpenGL libraries».
5. I am running an Nvidia GTX 680 with the proprietary Nvidia drivers 337.21 for 64bit systems.

As far as I know, ia32-libs no longer exist for Ubuntu 13.10 and onwards [which means the multiarch solution no longer works]. I have tried reinstalling my drivers, which worked for Steam (as it was complaining about the 32bits OpenGL issue as well). Only PlayOnLinux is still requesting this. I believe I solved this in Ubuntu 13.10, but I cannot recall what it was I installed to solve it.

Any and all help is greatly appreciated!

Edited by myromance123

myromance123 Friday 2 May 2014 at 18:50 myromance123

Alright, I did the following commands in a terminal:

sudo dpkg —add-architecture i386
sudo apt-get update

I then restarted Ubuntu, and the error message is gone. Yet, not a single game is runnable in PlayOnLinux. The debug spits out the following information:

err:wgl:has_opengl Failed to load libGL: libGL.so.1: wrong ELF class: ELFCLASS64
err:wgl:has_opengl OpenGL support is disabled.

Is there any solution to this? Note that native Linux games work, and my Steam library is fine. Only POL and Wine are giving me trouble.

Edited by myromance123

err:wgl:has_opengl Failed to load libGL: libGL.so.1: wrong ELF class: ELFCLASS64
err:wgl:has_opengl OpenGL support is disabled.

In other words: «while the system was looking for a 32bit version of libGL.so.1, all it found is a 64bit library».
So you still need to install a 32bit version of the accelerated display libraries that come with your video driver.

Edited by petch

myromance123 Friday 2 May 2014 at 19:51 myromance123

How would I go about installing the necessary files?

As far as I know, when manually installing the Nvidia driver, it will ask me if I want to install the 32bit libraries for it as well. I always make sure to say yes and let it do it. I even reinstalled it once more just now to make sure it did exactly that.

Is it looking for libgl1-nvidia-glx:i386? If it is, then I assume I’m screwed. That package isn’t within the repositories. I really wish I remembered what that one item was that I installed in 13.10 that solved this for me.

PlayOnLinux checks by emulation what a 32bit Wine would typically do when it needs accelerated display;
It starts a small C program, that opens an OpenGL context, then asks for direct rendering support (https://github.com/PlayOnLinux/POL-POM-4/blob/master/src/check_direct_rendering.c)

It’s not looking for a specific library, as long as some library provides the features it should be ok.

Edited by petch

myromance123 Friday 2 May 2014 at 23:26 myromance123

If it isn’t a dependency issue on any specific library, then does that mean the Nvidia driver or Wine/POL are bugged? Could the issue be with how Ubuntu 14.04 is storing the libraries?

From the command glxinfo | grep -i render:
direct rendering: Yes
OpenGL renderer string: GeForce GTX 680/PCIe/SSE2
GL_KHR_debug, GL_KTX_buffer_region, GL_NVX_conditional_render,
GL_NV_compute_program5, GL_NV_conditional_render,
GL_NV_parameter_buffer_object2, GL_NV_path_rendering,
GL_KHR_debug, GL_KTX_buffer_region, GL_NVX_conditional_render,
GL_NV_compute_program5, GL_NV_conditional_render,
GL_NV_parameter_buffer_object2, GL_NV_path_rendering,

I believe I do have direct rendering support, so the question is why it isn’t sufficient?

myromance123 Saturday 3 May 2014 at 18:04 myromance123

I’ve managed to solve the issue. For other Ubuntu 14.04 or even 13.10 64bit users who use the Nvidia proprietary drivers, basically Wine/POL are asking for libGL, but aren’t pointed to the right location.

To check if you’re experiencing this as well, first open a terminal and enter:
[code]ldconfig -p | grep libGL.so.1[/code]
Which should return something similar to:
[code]libGL.so.1 (libc6,x86-64) => /usr/lib/libGL.so.1[/code]

That folder it’s pointed to is not where the Nvidia driver’s 32bit library is. So, let’s fix that. Open a terminal and type:
[code]sudo gedit[/code]

A text editor will open up. In it, type:
[code]/usr/lib32[/code]

Now, save this text file as local.conf. You’re going to want to save it in the directory called /etc/ld.so.conf.d (yes that is a folder).

Not sure where it is? When opening the Home window, on your left is the Computer directory. Click that, and you will see a whole bunch of folders. Among them is the /etc folder.

Alright, we’ve written the text file and saved it. Now, open a new terminal and type the following:
[code]sudo ldconfig[/code]

This will update Ubuntu to tell it to look in that new directory we saved in the text file. To check that you did it right, in any terminal, type this again:
[code]ldconfig -p | grep libGL.so.1[/code]

Now, what should appear is something along the lines of:
[code]libGL.so.1 (libc6,x86-64) => /usr/lib/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/libGL.so.1[/code]

So, now if you run any 3D game or application in Wine via POL it should be able to run. It should no longer say it can’t find libGL.so.1 in the debug window either.

NOTE: This fix only applies to Ubuntu 13.10 and 14.04 64bit! I believe this issue only pops up for the Nvidia proprietary driver, but if this occurs with AMD ‘s proprietary driver then this fix may not work. Intel graphics should not experience this issue.

Источник

Getting Started

So you want to take advantage of the power of the OpenGL API? If you are visiting this page because a game or software uses the OpenGL API, you need to install the appropriate graphic driver which enables usage of the functionality provided.

To program using the OpenGL API, you need the driver and the development package (depends on platform and programming language). More platform-specific details are described in the sections below.

Contents

This Wiki maintains a FAQ page for OpenGL.

Downloading OpenGL

In all three major desktop platforms (Linux, macOS, and Windows), OpenGL more or less comes with the system. However, you will need to ensure that you have downloaded and installed a recent driver for your graphics hardware.

Windows

Appropriate Windows driver websites:

Some sites also distribute beta versions of graphics drivers, which may give you access to bug fixes or new functionality before an official driver release from the manufacturer:

Without drivers, you will default to a software version of OpenGL 1.1 (on Win98, ME, and 2000), a Direct3D wrapper that supports OpenGL 1.1 (WinXP), or a Direct3D wrapper that supports OpenGL 1.1 (Windows Vista and Windows 7). None of these options are particularly fast, so installing drivers is always a good idea.

If your system does not contain a GPU, or the GPU vendor delivers graphics drivers providing OpenGL support that’s so old as to be useless to you, you might want to consider installing the Mesa3D OpenGL library on your system. See this wiki link for details:

Linux

Graphics on Linux is almost exclusively implemented using the X Window system. Supporting OpenGL on Linux involves using GLX extensions to the X Server. There is a standard Application Binary Interface defined for OpenGL on Linux that gives application compatibility for OpenGL for a range of drivers. In addition the Direct Rendering Infrastructure (DRI) is a driver framework that allows drivers to be written and interoperate within a standard framework to easily support hardware acceleration, the DRI is included in of XFree86 4.0 but may need a card specific driver to be configured after installation. These days, XFree86 has been rejected in favor of XOrg due to the change in the license of XFree86, so many developers left Xfree86 and joined the XOrg group. Popular Linux distros come with XOrg now.

Vendors have different approaches to drivers on Linux, some support Open Source efforts using the DRI, and others support closed source frameworks but all methods support the standard ABI that will allow correctly written OpenGL applications to run on Linux.

For more information on developing OpenGL applications on Linux, see Platform specifics: Linux

macOS

Unlike other platforms, where the Operating System and OpenGL implementations are often updated separately, OpenGL updates are included as part of macOS system updates. To obtain the latest OpenGL on macOS, users should upgrade to the latest OS release, which can be found at Apple.com.

For developers, a default installation of macOS does not include any OpenGL headers, nor does it include other necessary development tools. These are installed by a separate developer tools package called Xcode. This installer includes the OpenGL headers, compilers (gcc), debuggers (gdb), Apple’s Xcode IDE, and a number of performance tools useful for OpenGL application development.

For more information on developing OpenGL applications on macOS, see Platform specifics: macOS.

Writing an OpenGL Application

The first step is to pick your language. Bindings for OpenGL exist in many languages, from C# and Java to Python and Lua. Some languages have multiple sets of OpenGL bindings, none of them being official. All of them are ultimately based on the C/C++ bindings.

If you are not using C/C++, you must download and install a package or library for your chosen language that includes the OpenGL bindings. Some come pre-installed, but others have separate downloads.

If you are using C/C++, then you must first set up a build environment (Visual Studio project, GNU makefile, CMake file, etc) that can link to OpenGL. Under Windows, you need to statically link to a library called OpenGL32.lib (note that you still link to OpenGL32.lib if you’re building a 64-bit executable. The «32» part is meaningless). Visual Studio, and most Windows compilers, come with this library.

On Linux, you need to link to libGL. This is done with a command-line parameter of «-lGL».

Initialization

Before you can actually use OpenGL in a program, you must first initialize it. Because OpenGL is platform-independent, there is not a standard way to initialize OpenGL; each platform handles it differently. Non-C/C++ language bindings can also handle these differently.

There are two phases of OpenGL initialization. The first phase is the creation of an OpenGL Context; the second phase is to load all of the necessary functions to use OpenGL. Some non-C/C++ language bindings merge these into one.

OpenGL Context Creation

An OpenGL context represents all of OpenGL. Creating one is very platform-specific, as well as language-binding specific.

If you are using the C/C++ language binding for OpenGL, then you are strongly advised to use a window toolkit for managing this task. These libraries create a window, attach an OpenGL context to this window, and manage basic input for that window. Once you are comfortable with OpenGL, you can then start learning how to do this manually.

Most non-C/C++ language bindings will provide you with a language-specific mechanism for creating a context.

Getting Functions

If you are using a non-C/C++ language binding, then the maintainer of that binding will already handle this as part of context creation. If you are using C/C++, read on.

In order to use OpenGL, you must get OpenGL API functions. For most libraries you are familiar with, you simply #include a header file, make sure a library is linked into your project or makefile, and it all works. OpenGL doesn’t work that way.

For reasons that are ultimately irrelevant to this discussion, you must manually load functions via a platform-specific API call. This boilerplate work is done with various OpenGL loading libraries; these make this process smooth. You are strongly advised to use one.

If you want to do it manually however, there is a guide as to how to load functions manually. You still should use an extension loader.

Using OpenGL

OpenGL is a rendering library. What OpenGL does not do is retain information about an «object». All OpenGL sees is a ball of triangles and a bag of state with which to render them. It does not remember that you drew a line in one location and a sphere in another.

Because of that, the general way to use OpenGL is to draw everything you need to draw, then show this image with a platform-dependent buffer swapping command. If you need to update the image, you draw everything again, even if you only need to update part of the image. If you want to animate objects moving on the screen, you need a loop that constantly clears and redraws the screen.

There are techniques for only updating a portion of the screen. And you can use OpenGL with these techniques. But OpenGL itself doesn’t do it internally; you must remember where you drew everything. You must figure out what needs updating and clear only that part of the screen. And so forth

There are many tutorials and other materials available for learning how to use OpenGL, both on this wiki and online.

OpenGL Viewers

These are programs that you install and run, and they give you information specific to the OpenGL API your system implements, like the version offered by your system, the vendor, the renderer, the extension list, supported viewport size, line size, point size, plus many other details. Some might include a benchmark. Some are standalone benchmarks.

Tutorials and How To Guides

User contributed tutorials and getting started guides

Источник

Читайте также:  Как запустить mesa linux
Оцените статью