Hi Philip,<br><br>    yes, those undefined warnings are the things to attack.  Things like<br><br>        warning: undefined reference to `xcb_get_file_descriptor&#39;<br>        /lib32/libpthread.so.0: warning: undefined reference to<br>
        `_dl_deallocate_tls@GLIBC_PRIVATE&#39;<br>        /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>        warning: undefined reference to `xcb_connect&#39;<br><br>I think indicate that both the 32-bit xcb library is wrong or not installed, and perhaps that the 32-bit C library is wrong (_dl_deallocate_tls@GLIBC_PRIVATE).  Unfortunately how to fix this, e.g. by installing the right libraries is not something I can help with; I only have a 32-bit VM to experiment with.<br>
<br>One thing that might get you going is to use vm-display-X11 from my site, e.g. from <a href="http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz">http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz</a>.<div>
<br></div><div>By the way, why are you compiling your own VM instead of using one from my site?  Sounds interesting!!</div><div><br></div><div>Cheers</div><div>Eliot<br><br>On Mon, Feb 25, 2013 at 7:26 AM, Philipp Tessenow &lt;<a href="mailto:philipp@tessenow.org">philipp@tessenow.org</a>&gt; wrote:<br>
&gt;<br>&gt; Hi,<br>&gt;<br>&gt; I am trying to compile the Newspeak Cog VM on Ubuntu (12.10) 64bit, but<br>&gt; fate is not on my side ;) I&#39;d higly appreciate any help, so here is my<br>&gt; story:<br>&gt;<br>&gt; The VM seems to compile correctly, but the newly build nsvm binary<br>
&gt; complains about a missing vm-display-X11 plugin.<br>&gt;<br>&gt; Using strace, as suggested here<br>&gt; (<a href="http://forum.world.st/Cannot-load-vm-display-X11-module-after-build-from-latest-SVN-and-VMM-td104726.html">http://forum.world.st/Cannot-load-vm-display-X11-module-after-build-from-latest-SVN-and-VMM-td104726.html</a>)<br>
&gt; shows, that nsvm actually finds vm-display-X11:<br>&gt;<br>&gt; &lt;code&gt;<br>&gt; ...<br>&gt; open(&quot;/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11&quot;,<br>
&gt; O_RDONLY|O_CLOEXEC) = 3<br>&gt; ...<br>&gt; open(&quot;/usr/lib/i386-linux-gnu/libX11.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3<br>&gt; ...<br>&gt; open(&quot;/usr/lib/i386-linux-gnu/libxcb.so.1&quot;, O_RDONLY|O_CLOEXEC) = 3<br>
&gt; ...<br>&gt; open(&quot;/usr/lib/i386-linux-gnu/libXau.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3<br>&gt; ...<br>&gt; open(&quot;/usr/lib/i386-linux-gnu/libXdmcp.so.6&quot;, O_RDONLY|O_CLOEXEC) = 3<br>&gt; read(3,<br>&gt; &quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\16\0\0004\0\0\0&quot;..., 512)<br>
&gt; = 512<br>&gt; fstat64(3, {st_mode=S_IFREG|0644, st_size=21888, ...}) = 0<br>&gt; mmap2(NULL, 24692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)<br>&gt; = 0xfffffffff7198000<br>&gt; mmap2(0xf719d000, 8192, PROT_READ|PROT_WRITE,<br>
&gt; MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xfffffffff719d000<br>&gt; close(3)                                = 0<br>&gt; mprotect(0xf719d000, 4096, PROT_READ)   = 0<br>&gt; mprotect(0xf71a1000, 4096, PROT_READ)   = 0<br>
&gt; mprotect(0xf71c3000, 4096, PROT_READ)   = 0<br>&gt; mprotect(0xf72f7000, 4096, PROT_READ)   = 0<br>&gt; munmap(0xf72fb000, 108384)              = 0<br>&gt; munmap(0xf71c5000, 1268568)             = 0<br>&gt; munmap(0xf71a3000, 135468)              = 0<br>
&gt; munmap(0xf719f000, 12424)               = 0<br>&gt; munmap(0xf7198000, 24692)               = 0<br>&gt; stat64(&quot;/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11.so&quot;,<br>
&gt; 0xffe7562c) = -1 ENOENT (No such file or dir<br>&gt; ectory)<br>&gt; ...<br>&gt; &lt;/code&gt;<br>&gt;<br>&gt; Unfortunately, after finding vm-display-X11 and loading some additional<br>&gt; libraries nsvm aborts and continues searching for other vm-disply-X11<br>
&gt; plugins elsewhere.<br>&gt;<br>&gt; ldd gives the following output (which seems to be OK for me):<br>&gt; &lt;code&gt;<br>&gt; ldd<br>&gt; /home/philipp/stud/masterarbeit/build/squeak/nsvmlinux/lib/nsvm/4.0-//vm-display-X11<br>
&gt;         linux-gate.so.1 =&gt;  (0xf77d0000)<br>&gt;         libpthread.so.0 =&gt; /lib/i386-linux-gnu/libpthread.so.0 (0xf776d000)<br>&gt;         libX11.so.6 =&gt; /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7637000)<br>
&gt;         libc.so.6 =&gt; /lib/i386-linux-gnu/libc.so.6 (0xf748c000)<br>&gt;         /lib/ld-linux.so.2 (0xf77d1000)<br>&gt;         libxcb.so.1 =&gt; /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf746a000)<br>&gt;         libdl.so.2 =&gt; /lib/i386-linux-gnu/libdl.so.2 (0xf7465000)<br>
&gt;         libXau.so.6 =&gt; /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7461000)<br>&gt;         libXdmcp.so.6 =&gt; /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf745a000)<br>&gt; &lt;/code&gt;<br>&gt;<br>&gt; Reading the unixbuild/HowToBuild file I found the following:<br>
&gt; &lt;cite&gt;<br>&gt; Testing an external plugin has completely linked<br>&gt; -------------------------------<br>&gt; You may find that an external plugin compiles and links but does not load.<br>&gt; This is usually because it contans undefined symbols.  To find undefined<br>
&gt; symbols, remake the plugin, capturing the link step and then supply<br>&gt;         -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined<br>&gt; when manually repeating the link command<br>&gt; &lt;/cite&gt;<br>
&gt;<br>&gt; So I tried to link vm-display-X11 again with warnings enabled:<br>&gt;<br>&gt; &lt;code&gt;<br>&gt; gcc -m32 -shared  sqUnixX11.lo sqUnixMozilla.lo  -ldl -lpthread -lm<br>&gt; -lnsl -lX11 -lxcb -lpthread -lc -L/usr/lib32<br>
&gt; -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname<br>&gt; -Wl,vm-display-X11 -o .libs/vm-display-X11<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_get_file_descriptor&#39;<br>
&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_dl_deallocate_tls@GLIBC_PRIVATE&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_connect&#39;<br>
&gt; /lib32/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_generate_id&#39;<br>
&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_dl_allocate_tls@GLIBC_PRIVATE&#39;<br>&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_dl_get_tls_static_info@GLIBC_PRIVATE&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_connect_to_display_with_auth_info&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>
&gt; warning: undefined reference to `xcb_writev&#39;<br>&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `__libc_stack_end@GLIBC_2.1&#39;<br>&gt; /lib32/libc.so.6: warning: undefined reference to<br>&gt; `__libc_enable_secure@GLIBC_PRIVATE&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `dlsym@GLIBC_2.0&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `dlopen@GLIBC_2.1&#39;<br>
&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_dl_make_stack_executable@GLIBC_PRIVATE&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_wait_for_reply&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_poll_for_event&#39;<br>&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_dl_allocate_tls_init@GLIBC_PRIVATE&#39;<br>
&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `_rtld_global@GLIBC_PRIVATE&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_get_maximum_request_length&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_poll_for_reply&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_take_socket&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_wait_for_event&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_disconnect&#39;<br>
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_connection_has_error&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>
&gt; warning: undefined reference to `xcb_get_setup&#39;<br>&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>&gt; `___tls_get_addr@GLIBC_2.3&#39;<br>&gt; /lib32/libpthread.so.0: warning: undefined reference to<br>
&gt; `_rtld_global_ro@GLIBC_PRIVATE&#39;<br>&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>&gt; warning: undefined reference to `xcb_parse_display&#39;<br>&gt; &lt;/code&gt;<br>&gt;<br>&gt; That is a lot of warnings. For my unexperienced eyes this looks like<br>
&gt; libX11.so cannot find xcb, albeit I installed every x11/xcb library I<br>&gt; can think of (to name them: libx11-xcb-dev:i386, libx11-xcb1:i386,<br>&gt; libx11-6:i386, libx11-dev:i386, xcb-proto:i386, xcb:i386, libxcb1:i386,<br>
&gt; libxcb1-dev:i386).<br>&gt;<br>&gt; I also tried the above steps on a Ubuntu 12.10 32bit VM with similar<br>&gt; results. Am I missing something? Do I need a special setup to compile a<br>&gt; CogVM? Any other ideas?<br>
&gt;<br>&gt; Thanks,<br>&gt; Philipp<br><br><br><br>-- <br>best,<br>Eliot<br></div>