swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Trying to build Swarm on windows: got far, hit libtool t


From: Paul Johnson
Subject: [Swarm-Support] Trying to build Swarm on windows: got far, hit libtool trouble. Now it is your turn
Date: Wed, 26 Mar 2003 14:57:48 -0600
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

Maybe one of you will do me the favor of picking up the ball here and seeing this to completion.

Enough people asked about rebuilding current Swarm with the current Windows/Cygwin that I got serious and did some trying for the past 3 days. Coming out of it, I have found a few things that need fixing in the Swarm source, and I can make the changes available. The build, however, dies after building most of the individual files. The last part of the error message from "make" is pasted below [footnote 1]. I believe it is a libtool issue

Now, maybe some of you Windows guys are eager to try this yourself and finish it up. Unless somebody who cares enough about Windows steps up and makes at least as much effort as I have made for the platform, I will conclude it is no longer worthwhile to have Swarm for Windows and I'll start acting accordingly.

Here are the notes I wrote about what I did:

First update Cygwin, make sure you have libpng-devel, intltool, gperf,
various others from the devel department.  Don't need gcc from Cygwin.

install Swarm-2.2 as directed in SwarmOnlineFaq.  Make sure Swarm-2.2
directory is mounted on /Swarm-2.2 and also be sure that Swarm-2.2/bin
is in the path ahead of the cygwin stuff. I ended up making those changes in in .bash_login to do that. Swarm-2.2 includes versions
of gcc and libtool that can be used to build swarm, so the plan is to
get a new swarm snapshot, and rebuild and install it "on top of" the
exising Swarm. If you just want a "quick and dirty" test of your cygwin install, consider getting the old tcltk from the Cygwin distribution and use the cygwin setup program to install it. That will remove the new one and Swarm does indeed work. I keep a snap of the cywin tcltk package here:

http://lark.cc.ku.edu/~pauljohn/software/Cygwin/tcltk-20001125-1.tar.gz

I have verified that, if I log in as administrator and put that tcltk in a separate directory and point the cygwin setup at it, and make sure the actually setup runs, then Swarm does work.

Now, about making Swarm work in the current tcl/tk 8.4. I expect the changes I have found will end up fixing Swarm on other platforms. But I did not check them into CVS yet. But I did make a snapshot. This has about a dozen little fixups in Swarm's tcl/tk interface to satisfy the new tougher type checking.[footnote 2] I am dumping that tarball here:

http://lark.cc.ku.edu/~pauljohn/Swarm/Windoze/swarm-2.1.142.20030325.tar.gz

And when I tried to build Swarm, I was in an Emacs Shell, and that whole ugly experience is up here (ending disaster pasted in below to save the feint of heart):

http://lark.cc.ku.edu/~pauljohn/Swarm/Windoze/buildSwarmDLLFails.txt

That tarball includes the fixes already, some problems discussed below have to be dealt with in your system.

If I don't catch a lot of crap from y'all, I will check in the changes to CVS. I created the tarball on my Linux system after running ./autogen.sh. I don't know how else I could do it. Please note I've reinstated the -Werror flag in the configure file, and so I've actually made a lot of progress.

You can follow along like this

$tar xzvf swarm-2.1.142.20030325.tar.gz
$cd src/swarm-2.1.142.20030325
$mkdir build
$cd build
$ export PATH=/Swarm-2.2/bin:$PATH
$JAVAC=jikes ../configure --prefix=/Swarm-2.2 --with-defaultdir=/Swarm-2.2 --with-tclscriptdir=/usr/share/tcl8.4 --with-tkscriptdir=/usr/share/tk8.4 --with-jdkdir=/Swarm-2.2 --with-pngdir=/usr --with-xpmdir=/usr
$make

The path is just to be totally sure the Swarm versions are in the path first.

Note the configure statement uses the java kit (Kaffe) that is distributed with Swarm-2.2pre and also the defaultdir for programs is Swarm-2.2/bin, so that when programs exist, it finds the Swarm ones (like gcc). Note I have to specify the tk and tcl script directories.

There are some build related problems I have not yet solved, but I
have work arounds and maybe some of you have fixes to recommend.


Problem 1. A file from Cygwin's tcl/tk package has declarations that
make the swarm build fail.  The file is /usr/include/tclDecls.h. The
problem is that they used the variable name "id" and in Objective-C
that is against the rules.  So I temporarily commented out two items
in tclDecls.h. They were:

line 1309
/* pjpjpjpjpjpjpj
EXTERN int              Tcl_JoinThread _ANSI_ARGS_((Tcl_ThreadId id,
                                int* result));
*/

line 2042
/* pjpjpjpjpj
int (*tcl_JoinThread) _ANSI_ARGS_((Tcl_ThreadId id, int* result)); *//* 412 */


Problem 2. Backwards slashes in Makefiles.

WHen you build Swarm, you get errors like this:


elc
Done
mv ./_getters.elc getters.elc
rm -f ./_getters.el
TOP_BUILDDIR='/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build' BUILDDIR='/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src' SWARMSRCDIR='../..' /usr/bin/emacs -batch -l '/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src\getters.elc' -f generate-SwarmEnvironment-getters Cannot open load file: /cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src\getters.elc
make[2]: *** [../../src/SwarmEnvironment_getters.m] Error 255
make[2]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build'
make: *** [all] Error 2
address@hidden



To fix that, you have to edit the Makefile in swarm/src. There it has:

$(srcdir)/SwarmEnvironment_getters.m: swarm.h getters.elc
$(ENVEMACS) -batch -l '$(dos_abs_builddir)\getters.elc' -f generate-SwarmEnvironment-getters

just change the \ to a / and run "make" again.


Here's another one like that:


mv ./_modulemap.elc modulemap.elc
rm -f ./_modulemap.el
MODULES="defobj collections activity objectbase random simtools gui simtoolsgui space analysis" TOP_BUILDDIR='/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build' BUILDDIR='/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src/defobj' SWARMSRCDIR='../../..' /usr/bin/emacs -batch -l '/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src/defobj\modulemap.elc' -f generate-module-map Cannot open load file: /cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src/defobj\modulemap.elc

Fix the \ to / in the end of
src/defobj/Makefile

So the big problem is

Problem 3: libtool failure to make swarm.dll. I hope you have an idea about that.



footnote 1
gcc -DHAVE_CONFIG_H -I. -I../../../src/space -I../.. -I../.. -I../../libobjc -I../../../libobjc -I../../../src/space/../collections -I../../../src/space/../defobj -I../../../src/space/../activity -I../../../src/space/../objectbase -I../../../src/space/../random -I../../../src/space/../gui -I../../../src/space/../simtools -I../../../src/space/../simtoolsgui -I../../../src/space/../misc -I.. -I../../../src/space/.. -I/Swarm-2.2/include/kaffe -D_GNU_SOURCE -DBUILDING_SWARM -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -c ../../../src/space/Value2dDisplay.m -MT Value2dDisplay.lo -MD -MP -MF .deps/Value2dDisplay.TPlo -o Value2dDisplay.o >/dev/null 2>&1
mv -f .libs/Value2dDisplay.lo Value2dDisplay.lo
/bin/sh ../../libtool --mode=link gcc -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -o libspace.la -static Ca2d.lo ConwayLife2d.lo DblBuffer2d.lo Diffuse2d.lo Discrete2d.lo Grid2d.lo Int2dFiler.lo Object2dDisplay.lo Value2dDisplay.lo
rm -fr .libs/libspace.la .libs/libspace.* .libs/libspace.*
ar cru .libs/libspace.a Ca2d.o ConwayLife2d.o DblBuffer2d.o Diffuse2d.o Discrete2d.o Grid2d.o Int2dFiler.o Object2dDisplay.o Value2dDisplay.o
ranlib .libs/libspace.a
creating libspace.la
(cd .libs && rm -f libspace.la && ln -s ../libspace.la libspace.la)
make[3]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src/space' make[3]: Entering directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src' source='../../src/SwarmEnvironment.m' object='SwarmEnvironment.lo' libtool=yes \ depfile='.deps/SwarmEnvironment.Plo' tmpdepfile='.deps/SwarmEnvironment.TPlo' \
depmode=gcc3 /bin/sh ../../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -I.. -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -I../../src -I/Swarm-2.2/include/kaffe -D_GNU_SOURCE -DBUILDING_SWARM -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -c -o SwarmEnvironment.lo `test -f ../../src/SwarmEnvironment.m || echo '../../src/'`../../src/SwarmEnvironment.m
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -I.. -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -I../../src -I/Swarm-2.2/include/kaffe -D_GNU_SOURCE -DBUILDING_SWARM -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -c ../../src/SwarmEnvironment.m -MT SwarmEnvironment.lo -MD -MP -MF .deps/SwarmEnvironment.TPlo -DDLL_EXPORT -DPIC -o .libs/SwarmEnvironment.lo gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -I.. -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -I../../src -I/Swarm-2.2/include/kaffe -D_GNU_SOURCE -DBUILDING_SWARM -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -c ../../src/SwarmEnvironment.m -MT SwarmEnvironment.lo -MD -MP -MF .deps/SwarmEnvironment.TPlo -o SwarmEnvironment.o >/dev/null 2>&1
mv -f .libs/SwarmEnvironment.lo SwarmEnvironment.lo
/bin/sh ../libtool --mode=link gcc -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -Wno-unknown-pragmas -o libswarm.la -version-info 0:0:0 -rpath /Swarm-2.2/lib -Lspace -Lanalysis -Lsimtoolsgui -Lsimtools -Lrandom -Ltkobjc -Ltclobjc -Lobjectbase -Lactivity -Ldefobj -Lcollections -Lmisc -L../libobjc -L/Swarm-2.2/lib -L/usr/lib -L/usr/lib -L/Swarm-2.2/lib -LC:/cygwin/usr/lib -L/usr/X11R6/lib -LC:/cygwin/usr/lib -L/usr/X11R6/lib SwarmEnvironment.lo -lspace -lanalysis -lsimtoolsgui -lsimtools -lrandom -ltkobjc -ltclobjc -lobjectbase -lactivity -ldefobj -lcollections -lmisc -lobjc -lBLT24 -ltk80 -ltcl80 -lXpm -lpng -lhdf5 -lz -luser32 -lgdi32 -lm

*** Warning: This system can not link to static lib archive /cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/libobjc/libobjc.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This system can not link to static lib archive /Swarm-2.2/lib/libhdf5.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
rm -fr .libs/libswarm.la .libs/libswarm.* .libs/libswarm.*
ar cru .libs/libswarm.a  SwarmEnvironment.o
ranlib .libs/libswarm.a
creating libswarm.la
(cd .libs && rm -f libswarm.la && ln -s ../libswarm.la libswarm.la)
make[3]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src' make[2]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src'
Making all in tools
make[2]: Entering directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/tools'
source='../../tools/findImp.m' object='findImp.lo' libtool=yes \
depfile='.deps/findImp.Plo' tmpdepfile='.deps/findImp.TPlo' \
depmode=gcc3 /bin/sh ../../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../tools -I.. -I.. -I../src -I../../src -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -D_GNU_SOURCE -DDLL_EXPORT -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -c -o findImp.lo `test -f ../../tools/findImp.m || echo '../../tools/'`../../tools/findImp.m
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I../../tools -I.. -I.. -I../src -I../../src -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -D_GNU_SOURCE -DDLL_EXPORT -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -c ../../tools/findImp.m -MT findImp.lo -MD -MP -MF .deps/findImp.TPlo -DDLL_EXPORT -DPIC -o .libs/findImp.lo gcc -DHAVE_CONFIG_H -I. -I../../tools -I.. -I.. -I../src -I../../src -I../libobjc -I../../libobjc -I../../src/collections -I../../src/defobj -I../../src/activity -I../../src/objectbase -I../../src/random -I../../src/simtools -I../../src/gui -I../../src/simtoolsgui -I../../src/misc -I. -D_GNU_SOURCE -DDLL_EXPORT -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -c ../../tools/findImp.m -MT findImp.lo -MD -MP -MF .deps/findImp.TPlo -o findImp.o >/dev/null 2>&1
mv -f .libs/findImp.lo findImp.lo
/bin/sh ../libtool --mode=link gcc -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -o findImp.exe -L../src -L../libobjc/.libs findImp.lo -lswarmdll -lobjcdll gcc -g -O2 -fgnu-runtime -fno-strict-aliasing -Wall -Wno-import -Wno-protocol -Werror -Wno-long-long -o findImp.exe findImp.o -L/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/src -L/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/libobjc/.libs -lswarmdll -lobjcdll
/usr/bin/ld: cannot find -lswarmdll
collect2: ld returned 1 exit status
make[2]: *** [findImp.exe] Error 1
make[2]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/home/pjohnson/src/swarm-2.1.142.20030325/build'
make: *** [all] Error 2
address@hidden


footnote 2
1obj: warnings being treated as errors
../../../src/tclobjc/tclObjc.m: In function `tclObjc_registerObjectWithName': ../../../src/tclobjc/tclObjc.m:428: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type
../../../src/tclobjc/tclObjc.m: In function `-[TclObject performv::]':
../../../src/tclobjc/tclObjc.m:538: warning: assignment discards qualifiers from pointer target type
../../../src/tclobjc/tclObjc.m: In function `TclObjc_Init':
../../../src/tclobjc/tclObjc.m:691: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type
make[3]: *** [tclObjc.lo] Error 1
make[3]: Leaving directory `/cygdrive/d/home/pj


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700



reply via email to

[Prev in Thread] Current Thread [Next in Thread]