gst on gentoo

Tagged:  •    •  

The latest ebuild available on gentoo targets GNU Smalltalk 3.0.2. 3.1 has been out for quite some time and there are several improvements available via git. This post describes what I did to make things work on my Gentoo amd64 system.

The Way of the Ebuild

I started by copying the contents of /usr/portage/dev-lang/gnu-smalltalk to my local overlay and copied the most recent ebuild to match the current stable release tag 3.1.

# mkdir -p /usr/local/portage/dev-lang/
# cp -pR /usr/portage/dev-lang/gnu-smalltalk !$
# cd !$
# cp gnu-smalltalk-3.0.2.ebuild gnu-smalltalk-3.1.ebuild
# ebuild gnu-smalltalk-3.1.ebuild digest compile install qmerge

There is a problem with the build trying to overwrite libsigsegv files, which are supplied by their own package on gentoo. I noticed that gst's configure has an option to use the system's libsigsegv, so I replaced one function in the ebuild file:

src_compile() {
	replace-flags '-O3' '-O2'
	econf \
		$(use_with emacs emacs) \
		$(use_with readline readline) \
		$(use_with gmp gmp) \
		$(use_with tk tcl) \
		$(use_with tk tk) \
		$(use_enable gtk gtk) \
		--with-system-libsigsegv \
		|| die
	emake || die "emake failed"
	use emacs && elisp-compile *.el

And then a "plain" emerge gnu-smalltalk installed gst 3.1 as expected.

Git going

Next I tried building from git HEAD. Well, a few hours later I still have a working system (hehe) and a gst installation based on git HEAD. Gentoo suffers from the same problem as OS X did back in January, when Alexey Zakhlestin posted to the mailing list about "Problems while configuring and compilation (mac os x)". Here's what I did to make it work on my x86_64 system:

git clone git://
cd smalltalk
LIBTOOLIZE=`which true` autoreconf -vi
./configure --with-emacs --with-readline --with-gmp --with-tcl --with-tk --enable-gtk --with-system-libsigsegv
make pdf html
sudo make install

All test run fine, although DBD-MySQL was skipped (as I did not supply configuration options for it to run).

Paolo has attacked and fixed the libtool problem, so the current build procedure is less surprising:

autoreconf -vi
./configure --with-emacs --with-readline --with-gmp --with-tcl --with-tk --enable-gtk --with-system-libsigsegv
sudo make install

User login