mwitmer / guile-wm

A Window Manager Toolkit for Guile Scheme
GNU General Public License v3.0
223 stars 13 forks source link

Allow parallel installs of guile 2.0 and 2.2 #7

Open stefanhusmann opened 7 years ago

stefanhusmann commented 7 years ago

Under Arch Linux, we now have guile, guile2.0 and guile1.8 (for Lilypond). /usr/bin/guile has effective version 2.2, and guiles binary in version 2.0 is named /usr/bin/guile2.0

By this, the build system of both guile-xcb and guile-wm gets puzzled.

checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for pkg-config... (cached) /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes configure: checking for guile 2.0 configure: checking for guile 2.2 configure: found guile 2.2 checking for Guile site directory... /usr/share/guile/site/2.0 checking for guile... /usr/bin/guile configure: error: found development files for Guile 2.0, but /usr/bin/guile has effective version 2.2

mwitmer commented 7 years ago

I use Arch too and have this problem; I just removed 2.0 from the list of accepted versions in configure.ac, did make clean, and ran autoreconf to get a fresh configure script.

I think this is an issue with the GUILE_PROGS M4 macro provided in Guile 2.2 or in how Arch is doing parallel installations, but I haven't investigated too much yet.

Someone found a similar issue in Fedora and put a patch out to fix it: https://lists.gnu.org/archive/html/bug-guile/2016-10/msg00005.html

Also be sure to pull the latest commits from the repo, as I've made a couple changes to both guile-xcb and guile-wm to make them compatible with Guile 2.2.

stefanhusmann commented 7 years ago

I tried to fix this with a simple sed command being applied in my PKGBUILDs in AUR.

prepare() {
  cd "$_gitname"
  sed -i 's+2.0 2.2+2.2+' configure.ac
}

This makes both guile-xcb and guile-wm compile again, but the fix leads to a rather unstable WM (crashes quite often).

ghost commented 5 years ago

I was able to build guile-wm and guile-xcb using guile 2.0 in Arch Linux by doing the following:

  1. Apply the sed command listed above, but with 2.0 instead of 2.2 sed -i 's/2.0 2.2/2.0/' configure.ac
  2. Call configure with the following parameters:
    ./configure --prefix=/usr \
              GUILE=/usr/bin/guile2.0 \
              GUILD=/usr/bin/guild2.0 \
              GUILE_CONFIG=/usr/bin/guile-config2.0 \
              GUILE_TOOLS=/usr/bin/guile-tools2.0
  3. Run make
  4. To run guile-wm the following command should be applied sed -i '1s/guile/guile2.0/' guile-wm in order to run it using guile 2.0

That said, guile-wm seems fairly stable using tinywm and guile 2.2. Also, apparent bugs I've noticed are reproducible with both versions.