Hi,
I am trying to compile the Newspeak Cog VM on Ubuntu (12.10) 64bit, but fate is not on my side ;) I'd higly appreciate any help, so here is my story:
The VM seems to compile correctly, but the newly build nsvm binary complains about a missing vm-display-X11 plugin.
Using strace, as suggested here (http://forum.world.st/Cannot-load-vm-display-X11-module-after-build-from-lat...) shows, that nsvm actually finds vm-display-X11:
<code> ... open("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\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) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=21888, ...}) = 0 mmap2(NULL, 24692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7198000 mmap2(0xf719d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xfffffffff719d000 close(3) = 0 mprotect(0xf719d000, 4096, PROT_READ) = 0 mprotect(0xf71a1000, 4096, PROT_READ) = 0 mprotect(0xf71c3000, 4096, PROT_READ) = 0 mprotect(0xf72f7000, 4096, PROT_READ) = 0 munmap(0xf72fb000, 108384) = 0 munmap(0xf71c5000, 1268568) = 0 munmap(0xf71a3000, 135468) = 0 munmap(0xf719f000, 12424) = 0 munmap(0xf7198000, 24692) = 0 stat64("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11.so", 0xffe7562c) = -1 ENOENT (No such file or dir ectory) ... </code>
Unfortunately, after finding vm-display-X11 and loading some additional libraries nsvm aborts and continues searching for other vm-disply-X11 plugins elsewhere.
ldd gives the following output (which seems to be OK for me): <code> ldd /home/philipp/stud/masterarbeit/build/squeak/nsvmlinux/lib/nsvm/4.0-//vm-display-X11 linux-gate.so.1 => (0xf77d0000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf776d000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7637000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf748c000) /lib/ld-linux.so.2 (0xf77d1000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf746a000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7465000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7461000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf745a000) </code>
Reading the unixbuild/HowToBuild file I found the following: <cite> Testing an external plugin has completely linked ------------------------------- You may find that an external plugin compiles and links but does not load. This is usually because it contans undefined symbols. To find undefined symbols, remake the plugin, capturing the link step and then supply -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined when manually repeating the link command </cite>
So I tried to link vm-display-X11 again with warnings enabled:
<code> gcc -m32 -shared sqUnixX11.lo sqUnixMozilla.lo -ldl -lpthread -lm -lnsl -lX11 -lxcb -lpthread -lc -L/usr/lib32 -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname -Wl,vm-display-X11 -o .libs/vm-display-X11 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect' /lib32/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_generate_id' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_dl_get_tls_static_info@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect_to_display_with_auth_info' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_writev' /lib32/libpthread.so.0: warning: undefined reference to `__libc_stack_end@GLIBC_2.1' /lib32/libc.so.6: warning: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlsym@GLIBC_2.0' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlopen@GLIBC_2.1' /lib32/libpthread.so.0: warning: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_event' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls_init@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_maximum_request_length' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_take_socket' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_event' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_disconnect' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connection_has_error' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_setup' /lib32/libpthread.so.0: warning: undefined reference to `___tls_get_addr@GLIBC_2.3' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_parse_display' </code>
That is a lot of warnings. For my unexperienced eyes this looks like libX11.so cannot find xcb, albeit I installed every x11/xcb library I can think of (to name them: libx11-xcb-dev:i386, libx11-xcb1:i386, libx11-6:i386, libx11-dev:i386, xcb-proto:i386, xcb:i386, libxcb1:i386, libxcb1-dev:i386).
I also tried the above steps on a Ubuntu 12.10 32bit VM with similar results. Am I missing something? Do I need a special setup to compile a CogVM? Any other ideas?
Thanks, Philipp
Hi Philip,
yes, those undefined warnings are the things to attack. Things like
warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect'
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.
One thing that might get you going is to use vm-display-X11 from my site, e.g. from http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz.
By the way, why are you compiling your own VM instead of using one from my site? Sounds interesting!!
Cheers Eliot
On Mon, Feb 25, 2013 at 7:26 AM, Philipp Tessenow philipp@tessenow.org wrote:
Hi,
I am trying to compile the Newspeak Cog VM on Ubuntu (12.10) 64bit, but fate is not on my side ;) I'd higly appreciate any help, so here is my story:
The VM seems to compile correctly, but the newly build nsvm binary complains about a missing vm-display-X11 plugin.
Using strace, as suggested here (
http://forum.world.st/Cannot-load-vm-display-X11-module-after-build-from-lat... )
shows, that nsvm actually finds vm-display-X11:
<code> ...
open("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11",
O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\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)
= 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=21888, ...}) = 0 mmap2(NULL, 24692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7198000 mmap2(0xf719d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xfffffffff719d000 close(3) = 0 mprotect(0xf719d000, 4096, PROT_READ) = 0 mprotect(0xf71a1000, 4096, PROT_READ) = 0 mprotect(0xf71c3000, 4096, PROT_READ) = 0 mprotect(0xf72f7000, 4096, PROT_READ) = 0 munmap(0xf72fb000, 108384) = 0 munmap(0xf71c5000, 1268568) = 0 munmap(0xf71a3000, 135468) = 0 munmap(0xf719f000, 12424) = 0 munmap(0xf7198000, 24692) = 0
stat64("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11.so",
0xffe7562c) = -1 ENOENT (No such file or dir ectory) ...
</code>
Unfortunately, after finding vm-display-X11 and loading some additional libraries nsvm aborts and continues searching for other vm-disply-X11 plugins elsewhere.
ldd gives the following output (which seems to be OK for me):
<code> ldd
/home/philipp/stud/masterarbeit/build/squeak/nsvmlinux/lib/nsvm/4.0-//vm-display-X11
linux-gate.so.1 => (0xf77d0000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0
(0xf776d000)
libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7637000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf748c000) /lib/ld-linux.so.2 (0xf77d1000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf746a000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7465000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7461000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6
(0xf745a000)
</code>
Reading the unixbuild/HowToBuild file I found the following:
<cite> Testing an external plugin has completely linked ------------------------------- You may find that an external plugin compiles and links but does not load. This is usually because it contans undefined symbols. To find undefined symbols, remake the plugin, capturing the link step and then supply -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined when manually repeating the link command </cite>
So I tried to link vm-display-X11 again with warnings enabled:
<code> gcc -m32 -shared sqUnixX11.lo sqUnixMozilla.lo -ldl -lpthread -lm -lnsl -lX11 -lxcb -lpthread -lc -L/usr/lib32 -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname -Wl,vm-display-X11 -o .libs/vm-display-X11 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect' /lib32/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_generate_id' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_dl_get_tls_static_info@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect_to_display_with_auth_info' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_writev' /lib32/libpthread.so.0: warning: undefined reference to `__libc_stack_end@GLIBC_2.1' /lib32/libc.so.6: warning: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlsym@GLIBC_2.0' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlopen@GLIBC_2.1' /lib32/libpthread.so.0: warning: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_event' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls_init@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_maximum_request_length' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_take_socket' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_event' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_disconnect' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connection_has_error' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_setup' /lib32/libpthread.so.0: warning: undefined reference to `___tls_get_addr@GLIBC_2.3' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_parse_display' </code>
That is a lot of warnings. For my unexperienced eyes this looks like libX11.so cannot find xcb, albeit I installed every x11/xcb library I can think of (to name them: libx11-xcb-dev:i386, libx11-xcb1:i386, libx11-6:i386, libx11-dev:i386, xcb-proto:i386, xcb:i386, libxcb1:i386, libxcb1-dev:i386).
I also tried the above steps on a Ubuntu 12.10 32bit VM with similar results. Am I missing something? Do I need a special setup to compile a CogVM? Any other ideas?
Thanks, Philipp
I don't know about that VM but I got the PharoVM run on debian 6 amd64 yesterday.
Some of my findings and apt-gets + ln -s in there:
http://comments.gmane.org/gmane.comp.lang.smalltalk.pharo.devel/75198
Phil
2013/2/25 Eliot Miranda eliot.miranda@gmail.com:
Hi Philip,
yes, those undefined warnings are the things to attack. Things like warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect'
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.
One thing that might get you going is to use vm-display-X11 from my site, e.g. from http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz.
By the way, why are you compiling your own VM instead of using one from my site? Sounds interesting!!
Cheers Eliot
On Mon, Feb 25, 2013 at 7:26 AM, Philipp Tessenow philipp@tessenow.org wrote:
Hi,
I am trying to compile the Newspeak Cog VM on Ubuntu (12.10) 64bit, but fate is not on my side ;) I'd higly appreciate any help, so here is my story:
The VM seems to compile correctly, but the newly build nsvm binary complains about a missing vm-display-X11 plugin.
Using strace, as suggested here (http://forum.world.st/Cannot-load-vm-display-X11-module-after-build-from-lat...) shows, that nsvm actually finds vm-display-X11:
<code> ... open("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3 ... open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\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) = 512 fstat64(3, {st_mode=S_IFREG|0644, st_size=21888, ...}) = 0 mmap2(NULL, 24692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff7198000 mmap2(0xf719d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xfffffffff719d000 close(3) = 0 mprotect(0xf719d000, 4096, PROT_READ) = 0 mprotect(0xf71a1000, 4096, PROT_READ) = 0 mprotect(0xf71c3000, 4096, PROT_READ) = 0 mprotect(0xf72f7000, 4096, PROT_READ) = 0 munmap(0xf72fb000, 108384) = 0 munmap(0xf71c5000, 1268568) = 0 munmap(0xf71a3000, 135468) = 0 munmap(0xf719f000, 12424) = 0 munmap(0xf7198000, 24692) = 0 stat64("/home/philipp/stud/masterarbeit/build/squeak/nscogbuild/unixbuild/bld/../../../nsvmlinux/lib/nsvm/4.0-/vm-display-X11.so", 0xffe7562c) = -1 ENOENT (No such file or dir ectory) ... </code>
Unfortunately, after finding vm-display-X11 and loading some additional libraries nsvm aborts and continues searching for other vm-disply-X11 plugins elsewhere.
ldd gives the following output (which seems to be OK for me):
<code> ldd /home/philipp/stud/masterarbeit/build/squeak/nsvmlinux/lib/nsvm/4.0-//vm-display-X11 linux-gate.so.1 => (0xf77d0000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf776d000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7637000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf748c000) /lib/ld-linux.so.2 (0xf77d1000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf746a000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7465000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf7461000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf745a000) </code>
Reading the unixbuild/HowToBuild file I found the following:
<cite> Testing an external plugin has completely linked ------------------------------- You may find that an external plugin compiles and links but does not load. This is usually because it contans undefined symbols. To find undefined symbols, remake the plugin, capturing the link step and then supply -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined when manually repeating the link command </cite>
So I tried to link vm-display-X11 again with warnings enabled:
<code> gcc -m32 -shared sqUnixX11.lo sqUnixMozilla.lo -ldl -lpthread -lm -lnsl -lX11 -lxcb -lpthread -lc -L/usr/lib32 -Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname -Wl,vm-display-X11 -o .libs/vm-display-X11 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect' /lib32/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_generate_id' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_dl_get_tls_static_info@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect_to_display_with_auth_info' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_writev' /lib32/libpthread.so.0: warning: undefined reference to `__libc_stack_end@GLIBC_2.1' /lib32/libc.so.6: warning: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlsym@GLIBC_2.0' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `dlopen@GLIBC_2.1' /lib32/libpthread.so.0: warning: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_event' /lib32/libpthread.so.0: warning: undefined reference to `_dl_allocate_tls_init@GLIBC_PRIVATE' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_maximum_request_length' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_poll_for_reply' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_take_socket' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_wait_for_event' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_disconnect' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connection_has_error' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_get_setup' /lib32/libpthread.so.0: warning: undefined reference to `___tls_get_addr@GLIBC_2.3' /lib32/libpthread.so.0: warning: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_parse_display' </code>
That is a lot of warnings. For my unexperienced eyes this looks like libX11.so cannot find xcb, albeit I installed every x11/xcb library I can think of (to name them: libx11-xcb-dev:i386, libx11-xcb1:i386, libx11-6:i386, libx11-dev:i386, xcb-proto:i386, xcb:i386, libxcb1:i386, libxcb1-dev:i386).
I also tried the above steps on a Ubuntu 12.10 32bit VM with similar results. Am I missing something? Do I need a special setup to compile a CogVM? Any other ideas?
Thanks, Philipp
-- best, Eliot
Thanks Eliot, and Phil for your pointers. I'll try to compile the VM on a clean 32bit Ubuntu next - maybe it's my 64bit system (and the 32/64bit library mix) that causes problems. I'll report back, when there is progress.
To answer Eliots question to the vm-dev readers too, I'll cite Gilad from its post in the newspeak mailing list:
Philipp is working on a thesis on secure mirrors using Newspeak. As part of that, one would like to enforce access control at the VM level as has long been prophesied. Otherwise the secure mirror API would avail one little.
-- best, Philipp
On 02/25/2013 07:03 PM, phil@highoctane.be wrote:
I don't know about that VM but I got the PharoVM run on debian 6 amd64 yesterday.
Some of my findings and apt-gets + ln -s in there:
http://comments.gmane.org/gmane.comp.lang.smalltalk.pharo.devel/75198
Phil
2013/2/25 Eliot Miranda eliot.miranda@gmail.com:
Hi Philip,
yes, those undefined warnings are the things to attack. Things like warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect'
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.
One thing that might get you going is to use vm-display-X11 from my site, e.g. from http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz.
By the way, why are you compiling your own VM instead of using one from my site? Sounds interesting!!
Cheers Eliot
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
I promised to come back when things change for my compilation issues. Things changed - I can build and run a newspeak Cog VM now - on an up to date Ubuntu 64bit system.
As a reference I uploaded 'instructions' and an adapted mvm script here: https://gist.github.com/tessi/5160523
BTW: When compiling the VM with -O2 optimization and -fno-caller-saves, the VM got stuck on startup with 100% CPU utilization. Using -O1 worked. gcc --version says: "gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2". We might want to change the mvm script to use -O1 not only on gcc version 3.4, but gcc > 4.x too, if others can reproduce this behavior. See: http://smallissimo.blogspot.de/2013/02/compiling-squeak-cog-virtual-machine-...
cheers, Philipp
On 02/26/2013 09:16 AM, Philipp Tessenow wrote:
Thanks Eliot, and Phil for your pointers. I'll try to compile the VM on a clean 32bit Ubuntu next - maybe it's my 64bit system (and the 32/64bit library mix) that causes problems. I'll report back, when there is
progress.
To answer Eliots question to the vm-dev readers too, I'll cite Gilad from its post in the newspeak mailing list:
Philipp is working on a thesis on secure mirrors using Newspeak. As part of that, one would like to enforce access control at the VM level as has long been prophesied. Otherwise the secure mirror API would avail one little.
-- best, Philipp
On 02/25/2013 07:03 PM, phil@highoctane.be wrote:
I don't know about that VM but I got the PharoVM run on debian 6 amd64 yesterday.
Some of my findings and apt-gets + ln -s in there:
http://comments.gmane.org/gmane.comp.lang.smalltalk.pharo.devel/75198
Phil
2013/2/25 Eliot Miranda eliot.miranda@gmail.com:
Hi Philip,
yes, those undefined warnings are the things to attack. Things like
warning: undefined reference to `xcb_get_file_descriptor' /lib32/libpthread.so.0: warning: undefined reference to `_dl_deallocate_tls@GLIBC_PRIVATE' /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libX11.so: warning: undefined reference to `xcb_connect'
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.
One thing that might get you going is to use vm-display-X11 from my
site, e.g. from http://www.mirandabanda.org/files/Cog/VM/VM.r2693/nsvmlinux-13.07.2692.tgz.
By the way, why are you compiling your own VM instead of using one
from my site? Sounds interesting!!
Cheers Eliot
vm-dev@lists.squeakfoundation.org