<div dir="ltr"><div>Hi Tom,</div><div><br></div><div>the OGLUnix class is used for all Unixen, and  'GL' is a good default for that. We simply special-case Linux.</div><div><br></div><div>This could be highlighted by rewriting it as</div><div></div><div><br></div><div>    openGLLibraryName</div><div>        Smalltalk osVersion = 'linux' ifTrue: [^'libGL.so.1'].      </div><div>        ^'GL'</div><div><br></div><div>If someone knows the specific conventions on the BSDs or Solaris or whatever, we can add special-cases for them, too, if needed.</div><div><br></div><div>- Vanessa -</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 9, 2020 at 11:17 PM Beckmann, Tom <<a href="mailto:Tom.Beckmann@student.hpi.uni-potsdam.de" target="_blank">Tom.Beckmann@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Vanessa,<br>
<br>
thank you for clarifying! Do you know if there's any reason to keep the conditional asking for the osVersion to either return 'GL' or 'libgl.so.1'? In its current state it is broken on most linux systems I tested on (mainly Ubuntu-based), but I was wondering whether the correct fix would be to adapt it to the correct matching string 'linux-gnu' or just have it return 'libgl.so.1' always.<br>
<br>
Best,<br>
Tom<br>
________________________________________<br>
From: Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> on behalf of Vanessa Freudenberg <<a href="mailto:vanessa@codefrau.net" target="_blank">vanessa@codefrau.net</a>><br>
Sent: Sunday, May 10, 2020 3:19:00 AM<br>
To: The general-purpose Squeak developers list<br>
Subject: Re: [squeak-dev] OGLUnixX11LE >> glPixelStorei: with:<br>
<br>
On Sat, May 9, 2020 at 12:05 AM Beckmann, Tom <<a href="mailto:Tom.Beckmann@student.hpi.uni-potsdam.de" target="_blank">Tom.Beckmann@student.hpi.uni-potsdam.de</a><mailto:<a href="mailto:Tom.Beckmann@student.hpi.uni-potsdam.de" target="_blank">Tom.Beckmann@student.hpi.uni-potsdam.de</a>>> wrote:<br>
Hi there!<br>
<br>
Replacing the whole #openGLLibraryName method with a simple<br>
^ 'GL'<br>
should work, as long as you adapt your LD_LIBRARY_PATH to include the arch specific libraries. For example adding<br>
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/"<br>
in your squeak.sh before the vm gets started should make sure that the image finds libgl*. Of course, if your libgl.so.1 is not found under that path, adjust accordingly.<br>
<br>
Alternatively, you can also specify the absolute path to the library, e.g.<br>
^ '/usr/lib/x86_64-linux-gnu/libGL.so'<br>
which may be a safer option to start from if you're having troubles getting it to run.<br>
<br>
'libGL.so' typically is installed by the opengl dev package as a symlink to 'libGL.so.1'. The user package installs 'libGL.so.1' and will *not* be found by the VM if you just specify 'GL' because the VM will only automatically try the '.so' suffix but not '.so.1'.<br>
<br>
That is why 'libGL.so.1' is indeed the correct value to be returned from openGLLibraryName on Linux.<br>
<br>
For the apicall:'s, if you inspect the byte codes of the method, you will in fact notice that is has already been replaced for you. This happens in OpenGL>>#privateInstallLibrary:, but only updates the method's bytecode, not its source code (which is good, because otherwise this would end up in commits or your changes file).<br>
<br>
Yep. As Levente mentioned, you need to switch your browser to show decompiled code to see the actual methods being executed.<br>
<br>
You will also see that apicall has been replaced by cdecl which is the right calling convention on Linux.<br>
<br>
- Vanessa -<br>
<br>
<br>
Best,<br>
Tom<br>
<br>
<br>
</blockquote></div></div>