<br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 6:27 AM, Hans-Martin Mosner <span dir="ltr">&lt;<a href="mailto:hmm@heeg.de">hmm@heeg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
after some wasted hours tracking down why my OpenGL code does not work at all, I found that Squeak probably loaded the<br>
wrong GL.so library - instead of /usr/lib/nvidia-current/libGL.so it loaded /usr/lib/i386-linux-gnu/mesa/libGL.so.<br>
<br>
C programs compiled with -lGL use the correct library, of course. Does anyone have an idea what causes this confusing<br>
behavior, and what can be done to fix it? BTW, my VM is the Cog 3.9-7 VM - when I try the 4.0-2522 Cog VM, the module<br>
&quot;X11&quot; can&#39;t be found, possibly because naming conventions changed somewhere?<br></blockquote><div><br></div><div>All I can say is that one must set LD_LIBRARY_PATH appropriately so that the VM will pick things up from the right places.  You can use ldd to find out what the VM is linked against.  e.g.</div>
<div><br></div><div>bash-2.05b$ ldd cogvm/4.0-2518/vm-display-X11 </div><div>        libGL.so.1 =&gt; /usr/lib/libGL.so.1 (0x4002e000)</div><div>        libXext.so.6 =&gt; /usr/X11R6/lib/libXext.so.6 (0x40093000)</div><div>
        libSM.so.6 =&gt; /usr/X11R6/lib/libSM.so.6 (0x400a1000)</div><div>        libICE.so.6 =&gt; /usr/X11R6/lib/libICE.so.6 (0x400a9000)</div><div>        libdl.so.2 =&gt; /lib/libdl.so.2 (0x400c0000)</div><div>        libpthread.so.0 =&gt; /lib/tls/libpthread.so.0 (0x400c3000)</div>
<div>        libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400d4000)</div><div>        libnsl.so.1 =&gt; /lib/libnsl.so.1 (0x400f6000)</div><div>        libuuid.so.1 =&gt; /lib/libuuid.so.1 (0x4010b000)</div><div>        libX11.so.6 =&gt; /usr/X11R6/lib/libX11.so.6 (0x4010e000)</div>
<div>        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x401ed000)</div><div>        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x40000000)</div><div><br></div><div>Then from the libGL info one can craft a suitable LD_LIBRARY_PATH, e.g. one with the directory containing the libGL.so.N the VM is linked against first.  So in your example above</div>
<div><br></div><div>LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH cogvm/squeak <a href="http://myimage.im">myimage.im</a></div><div><br></div><div>HTH</div><div>Eliot</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Cheers,<br>
<font color="#888888">Hans-Martin<br>
<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>