[self-interest] problems compiling on 64-bit linux

Tobias Pape Das.Linux at gmx.de
Mon Sep 9 19:56:39 UTC 2013


Am 08.09.2013 um 02:01 schrieb Jonathan Mukai <johnnymukai at gmail.com>:

> 
> Hi there!
> 
> I'm trying to compile Self on Debian Wheezy 64-bit but I'm running into a few issues.
> 
> I can run `cmake .` in the self dir and get:
> 
> -- The C compiler identification is GNU 4.7.2
> -- The CXX compiler identification is GNU 4.7.2
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- The ASM compiler identification is GNU
> -- Found assembler: /usr/bin/gcc
> -- Preparing for Linux on i386
> -- Preparing Self VM 4.1.13 (build 4.4-258-g06e7869)
> -- Looking for include file pthread.h
> -- Looking for include file pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - not found.
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE  
> -- Using X11 plaform windows.
> -- Configuring for build level optimized
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/johnny/self
> 
> But then when I run `cmake --build .` I get...
> 
> Scanning dependencies of target makeDeps
> [  1%] Building CXX object vm/CMakeFiles/makeDeps.dir/build_support/makeDeps.cpp.o
> Linking CXX executable makeDeps
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.so when searching for -lstdc++
> /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.a when searching for -lstdc++
> /usr/bin/ld: cannot find -lstdc++
> collect2: error: ld returned 1 exit status
> make[2]: *** [vm/makeDeps] Error 1
> make[1]: *** [vm/CMakeFiles/makeDeps.dir/all] Error 2
> make: *** [all] Error 2
> 
> It seems like ld is not getting the -m32 flag and is looking for libstdc++ in the wrong place, but I'm totally new to C++ so this is just my guess from poking around.

see https://github.com/krono/self/tree/cmake

 On 64bit Linux, you may want to explicitely use 32bit compilation:

    CC="gcc -m32" CXX="g++ -m32" cmake $YOUR_IDR
    cmake --build $YOUR_DIR

> 
> I also tried running the binary from selflanguage.org but I get the following error:
> 
> Self: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory
> 
> I have the packages libxext6 and libxext6-dbg installed, so I assume this is another 32-bit/64-bit mismatch, but again, I'm not really sure.

Yes, that is likely the problem. You might try to install libxext6:i386 (on debian/ubuntu for example)


Best
	-Tobias




More information about the Self-interest mailing list