Gareth Smith | 14 Nov 2010 21:06
Picon
Gravatar

Building Alice from CVS

Hello,

I am attempting to build Alice from CVS. This posting may be useful to
others attempting the same.

I am using:
 - Ubuntu 10.04 on x86 (32bit)
- all required dependencies are from the ubuntu repos, except for SMLNJ
- I am using SMLNJ 110.63: all (that i tested, including the latest...)
versions later than this fail to compile Alice as described here:
http://www.ps.uni-saarland.de/pipermail/alice-users/2009/000977.html
 (the next version release notes give no obvious reason for the
breaking, afaict:
http://smlnj.cs.uchicago.edu/dist/working/110.63.1/110.63.1-README.html)

Results:

- gecode fails to compile. i think this may be due to gcc changes since
it was released.
- the gtk binding fails to compile, possibly also due to gcc changes.
- i need to get the gtk binding compiling before i can compile the rest.

Cheerio

Gareth
rossberg | 15 Nov 2010 10:50
Favicon

Re: Building Alice from CVS

Gareth Smith wrote:
>
> - gecode fails to compile. i think this may be due to gcc changes since
> it was released.
> - the gtk binding fails to compile, possibly also due to gcc changes.

What kind of failures are these?

Thanks,
/Andreas
Gareth Smith | 15 Nov 2010 21:56
Picon
Gravatar

Re: Building Alice from CVS

On 15/11/10 09:50, rossberg <at> mpi-sws.org wrote:
> Gareth Smith wrote:
>   
>> - gecode fails to compile. i think this may be due to gcc changes since
>> it was released.
>> - the gtk binding fails to compile, possibly also due to gcc changes.
>>     
> What kind of failures are these?
>
> Thanks,
> /Andreas
>   

Gecode I have not yet investigated.

GTK fails, not due to GCC updates, but due to incompatibility between
the version I have installed (2.20.1-0ubuntu2) and the version that the
binding is against (the *.defs files the binding uses are for an older
version, i think).

It actually show up like this:

`pkg-config "gtk+-2.0 >= 2.6" "glib-2.0 >= 2.6" libgnomecanvas-2.0
"pango >= 1.8" --cflags` -c NativeGtk.cc -o NativeGtk.o
g++ -I. -I/home/alice/alice-build-dev/distro/include/seam
-DHAVE_LIGHTNING=1 -fno-operator-names -fPIC -ggdb -DHAVE_LOADLIBRARY=0
-DHAVE_SIGNAL=1 -DHAVE_CONSOLECTRL=0 -DHAVE_LIBLTDL=1 -DDEBUGGER=0
-fno-rtti -DPROFILE=0 -I/include
-I/home/alice/alice-build-dev/distro/include -g -pthread -D_REENTRANT
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
(Continue reading)

Guido Tack | 15 Nov 2010 22:32
Picon

Re: Building Alice from CVS

Gareth Smith wrote:

> On 15/11/10 09:50, rossberg <at> mpi-sws.org wrote:
>> Gareth Smith wrote:
>> 
>>> - gecode fails to compile. i think this may be due to gcc changes since
>>> it was released.
>>> - the gtk binding fails to compile, possibly also due to gcc changes.
>>> 
>> What kind of failures are these?
>> 
>> Thanks,
>> /Andreas
>> 
> 
> Gecode I have not yet investigated.

I just checked, you would need Gecode 1.3.1 (http://www.gecode.org/download/gecode-1.3.1.tar.gz),
and that should still compile with gcc 4 (at least it does on my Mac).  I'm not sure about the Alice binding,
though, and I can't test it right now.
But if you're not planning to use Gecode, the system will work just fine without it.

Cheers,
	Guido

--

-- 
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
Gareth Smith | 16 Nov 2010 21:52
Picon
Gravatar

Re: Building Alice from CVS

On 15/11/10 21:32, Guido Tack wrote:
> I just checked, you would need Gecode 1.3.1
> (http://www.gecode.org/download/gecode-1.3.1.tar.gz), and that should
> still compile with gcc 4 (at least it does on my Mac). 

Gecode 1.3.1 does not compile with GCC 4.4, due to the issue described
here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526675 - the
patch to fix it applies to a later version but it was easily adapted to
1.3.1, so I have that building now.

I have not tested the Alice binding, yet. I think I need the GTK binding
compiling first.

Gareth
Andreas Rossberg | 17 Nov 2010 09:13
Favicon

Re: Building Alice from CVS

On Nov 15, 2010, at 21.56 h, Gareth Smith wrote:
>
> GTK fails, not due to GCC updates, but due to incompatibility between
> the version I have installed (2.20.1-0ubuntu2) and the version that  
> the
> binding is against (the *.defs files the binding uses are for an older
> version, i think).
>
> It actually show up like this:
>
> `pkg-config "gtk+-2.0 >= 2.6" "glib-2.0 >= 2.6" libgnomecanvas-2.0
> "pango >= 1.8" --cflags` -c NativeGtk.cc -o NativeGtk.o
> g++ -I. -I/home/alice/alice-build-dev/distro/include/seam
> -DHAVE_LIGHTNING=1 -fno-operator-names -fPIC -ggdb - 
> DHAVE_LOADLIBRARY=0
> -DHAVE_SIGNAL=1 -DHAVE_CONSOLECTRL=0 -DHAVE_LIBLTDL=1 -DDEBUGGER=0
> -fno-rtti -DPROFILE=0 -I/include
> -I/home/alice/alice-build-dev/distro/include -g -pthread -D_REENTRANT
> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/ 
> atk-1.0
> -I/usr/include/cairo -I/usr/include/pango-1.0
> -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
> -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/ 
> libpng12
> -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0
> -I/usr/include/libart-2.0 -c NativeGtk.cc -o NativeGtk.o
> NativeGtk.cc: In function ‘word_s*  
> GtkPrivateFlagstToWord(GtkPrivateFlags)’:
> NativeGtk.cc:409: error: ‘PRIVATE_GTK_LEAVE_PENDING’ was not  
(Continue reading)

Gareth Smith | 21 Nov 2010 19:02
Picon
Gravatar

Re: Building Alice from CVS

On 17/11/10 08:13, Andreas Rossberg wrote:
> Hm, have you tried removing the definition of `PrivateFlags' from
> gtk-types.def? I don't think they are (nor should be) used anywhere.

After commenting out the PRIVATE_GTK_LEAVE_PENDING defintion from
gtk-types.def, it compiles. I am going to try and upgrade all the .defs
files to a consistent version, if possible, though.

I have managed to compile all of Alice now, on 64 bit Ubuntu 10.04,
since my 32 bit VM died :(. I had to make a bunch of other changes:

 - The makefiles in the `make' and `alice' modules did not seem to
identify x86_64 as a supported platform - I had to modify them so that
`make all` works on amd64.

- Gecode 1.3.1 needed a patch, as I said before.

- Occurences of  `echo -e` in the makefiles caused issues with Ubuntu,
since make doesnt use bash by default, and -e is not portable. The fix
was to replace `echo -e` with `printf`.

I have also discovered that it is possible to workaround the version
110.61.1+ SMLNJ bug [1] that prevents Alice compiling, with type
annotations. However the latest package on Ubuntu seems to also have a
bug with ML-Yacc, so I used 110.63.

[1]
http://smlnj-gforge.cs.uchicago.edu/tracker/index.php?func=detail&aid=60&group_id=33&atid=215

Gareth
(Continue reading)


Gmane