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'<br> /lib32/libpthread.so.0: warning: undefined reference to<br>
`_dl_deallocate_tls@GLIBC_PRIVATE'<br> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br> warning: undefined reference to `xcb_connect'<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 <<a href="mailto:philipp@tessenow.org">philipp@tessenow.org</a>> wrote:<br>
><br>> Hi,<br>><br>> I am trying to compile the Newspeak Cog VM on Ubuntu (12.10) 64bit, but<br>> fate is not on my side ;) I'd higly appreciate any help, so here is my<br>> story:<br>><br>> The VM seems to compile correctly, but the newly build nsvm binary<br>
> complains about a missing vm-display-X11 plugin.<br>><br>> Using strace, as suggested here<br>> (<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>
> shows, that nsvm actually finds vm-display-X11:<br>><br>> <code><br>> ...<br>> open("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11",<br>
> O_RDONLY|O_CLOEXEC) = 3<br>> ...<br>> open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3<br>> ...<br>> open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3<br>
> ...<br>> open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3<br>> ...<br>> open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3<br>> read(3,<br>> "\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"..., 512)<br>
> = 512<br>> fstat64(3, {st_mode=S_IFREG|0644, st_size=21888, ...}) = 0<br>> mmap2(NULL, 24692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)<br>> = 0xfffffffff7198000<br>> mmap2(0xf719d000, 8192, PROT_READ|PROT_WRITE,<br>
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xfffffffff719d000<br>> close(3) = 0<br>> mprotect(0xf719d000, 4096, PROT_READ) = 0<br>> mprotect(0xf71a1000, 4096, PROT_READ) = 0<br>
> mprotect(0xf71c3000, 4096, PROT_READ) = 0<br>> mprotect(0xf72f7000, 4096, PROT_READ) = 0<br>> munmap(0xf72fb000, 108384) = 0<br>> munmap(0xf71c5000, 1268568) = 0<br>> munmap(0xf71a3000, 135468) = 0<br>
> munmap(0xf719f000, 12424) = 0<br>> munmap(0xf7198000, 24692) = 0<br>> stat64("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11.so",<br>
> 0xffe7562c) = -1 ENOENT (No such file or dir<br>> ectory)<br>> ...<br>> </code><br>><br>> Unfortunately, after finding vm-display-X11 and loading some additional<br>> libraries nsvm aborts and continues searching for other vm-disply-X11<br>
> plugins elsewhere.<br>><br>> ldd gives the following output (which seems to be OK for me):<br>> <code><br>> ldd<br>> /home/philipp/stud/masterarbeit/build/squeak/nsvmlinux/lib/nsvm/4.0-//vm-display-X11<br>
> linux-gate.so.1 => (0xf77d0000)<br>> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf776d000)<br>> libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7637000)<br>
> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf748c000)<br>> /lib/ld-linux.so.2 (0xf77d1000)<br>> libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf746a000)<br>> libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7465000)<br>
> libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7461000)<br>> libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf745a000)<br>> </code><br>><br>> Reading the unixbuild/HowToBuild file I found the following:<br>
> <cite><br>> Testing an external plugin has completely linked<br>> -------------------------------<br>> You may find that an external plugin compiles and links but does not load.<br>> This is usually because it contans undefined symbols. To find undefined<br>
> symbols, remake the plugin, capturing the link step and then supply<br>> -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined<br>> when manually repeating the link command<br>> </cite><br>
><br>> So I tried to link vm-display-X11 again with warnings enabled:<br>><br>> <code><br>> gcc -m32 -shared sqUnixX11.lo sqUnixMozilla.lo -ldl -lpthread -lm<br>> -lnsl -lX11 -lxcb -lpthread -lc -L/usr/lib32<br>
> -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname<br>> -Wl,vm-display-X11 -o .libs/vm-display-X11<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_get_file_descriptor'<br>
> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_dl_deallocate_tls@GLIBC_PRIVATE'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_connect'<br>
> /lib32/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_generate_id'<br>
> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_dl_allocate_tls@GLIBC_PRIVATE'<br>> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_dl_get_tls_static_info@GLIBC_PRIVATE'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_connect_to_display_with_auth_info'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>
> warning: undefined reference to `xcb_writev'<br>> /lib32/libpthread.so.0: warning: undefined reference to<br>> `__libc_stack_end@GLIBC_2.1'<br>> /lib32/libc.so.6: warning: undefined reference to<br>> `__libc_enable_secure@GLIBC_PRIVATE'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `dlsym@GLIBC_2.0'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `dlopen@GLIBC_2.1'<br>
> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_dl_make_stack_executable@GLIBC_PRIVATE'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_wait_for_reply'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_poll_for_event'<br>> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_dl_allocate_tls_init@GLIBC_PRIVATE'<br>
> /lib32/libpthread.so.0: warning: undefined reference to<br>> `_rtld_global@GLIBC_PRIVATE'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_get_maximum_request_length'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_poll_for_reply'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_take_socket'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_wait_for_event'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_disconnect'<br>
> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_connection_has_error'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>
> warning: undefined reference to `xcb_get_setup'<br>> /lib32/libpthread.so.0: warning: undefined reference to<br>> `___tls_get_addr@GLIBC_2.3'<br>> /lib32/libpthread.so.0: warning: undefined reference to<br>
> `_rtld_global_ro@GLIBC_PRIVATE'<br>> /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so:<br>> warning: undefined reference to `xcb_parse_display'<br>> </code><br>><br>> That is a lot of warnings. For my unexperienced eyes this looks like<br>
> libX11.so cannot find xcb, albeit I installed every x11/xcb library I<br>> can think of (to name them: libx11-xcb-dev:i386, libx11-xcb1:i386,<br>> libx11-6:i386, libx11-dev:i386, xcb-proto:i386, xcb:i386, libxcb1:i386,<br>
> libxcb1-dev:i386).<br>><br>> I also tried the above steps on a Ubuntu 12.10 32bit VM with similar<br>> results. Am I missing something? Do I need a special setup to compile a<br>> CogVM? Any other ideas?<br>
><br>> Thanks,<br>> Philipp<br><br><br><br>-- <br>best,<br>Eliot<br></div>