I've been banging my head against building Cog on the primary new Squeak
server off and on now for a couple of weeks. This server is 64bit
Debian. Note that I don't need and am not trying to build a 64bit VM, a
32bit VM is fine, at least for the time being.
I did of course read unixbuild/HowToBuild and the notes about building
on 64bit. Unfortunately that doesn't work, in fact it fails quite early
during the configure step (details in a moment). So after looking
around a bit I decided that it was all wrong and instead '-m32' should
be in CFLAGS. Well that certainly got me a lot farther but then I run
into issues linking where gcc is used but without CFLAGS and it goes all
pear shaped.
So with my tail between my legs I go back today and try the original
suggestion again and to see if I can fix/workaround it. And in fact I'm
doing that right now. But then I also decided that I should ask for
help, so here I am.
Details:
kencausey@squeak-box4:~/source/cog/svn/Cog/unixbuild/bld$ \
../../platforms/unix/config/configure CC="gcc -m32" CXX="g++ -m32"\
--without-npsqueak CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE \
-D_FILE^J_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 \
-DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread \
> myconf.log 2>&1 &
...
checking for gcc... gcc -m32
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
excerpt from config.log:
configure:1862: checking for gcc
configure:1888: result: gcc -m32
configure:2132: checking for C compiler version
configure:2135: gcc -m32 --version </dev/null >&5
gcc (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2138: $? = 0
configure:2140: gcc -m32 -v </dev/null >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)
configure:2143: $? = 0
configure:2145: gcc -m32 -V </dev/null >&5
gcc: '-V' must come at the start of the command line
configure:2148: $? = 1
configure:2171: checking for C compiler default output file name
configure:2174: gcc -m32 -g -O2 -msse2 -D_GNU_SOURCE -D_FILE
_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1
-DCOGMTVM=0 -DDEBUGVM=0 conftest.c -lpthread >&5
gcc: _OFFSET_BITS=64: No such file or directory
configure:2177: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define SQ_VERSION "4.2-0"
| #define VM_VERSION "4.0-2673"
| #define OS_TYPE "unix"
| #define VM_HOST "x86_64-linux-gnu"
| #define VM_HOST_OS "linux-gnu"
| #define VM_HOST_CPU "x86_64"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2216: error: C compiler cannot create executables
See `config.log' for more details.
Ken