[DOC] Step by step guide to make a debian package for GNU Guile 1.8.8

Step 1: Prepare your build environment.

sudo apt install devscripts

Step 2: Clone the texmacs branch of guile.

git clone --depth 10 -b texmacs --single-branch  git@github.com:texmacs/guile.git

Step 3: Make your own debs.

cd guile
dpkg-buildpackage -us -uc -b

Great! Now the wanted debs has been generated:

$ ls ../*deb
../guile-1.8_1.8.8+1-10_amd64.deb         ../guile-1.8-dev_1.8.8+1-10_amd64.deb  ../guile-1.8-libs_1.8.8+1-10_amd64.deb
../guile-1.8-dbgsym_1.8.8+1-10_amd64.deb  ../guile-1.8-doc_1.8.8+1-10_all.deb    ../guile-1.8-libs-dbgsym_1.8.8+1-10_amd64.deb

Install guile-1.8, guile-1.8-dev, guile-1.8-libs via dpkg.

References

1 Like

I try in ubuntu 20.04 and I got
git clone --depth 10 -b texmacs --single-branch git@github.com:texmacs/guile.git
dpkg-buildpackage -us -uc -b
dpkg-buildpackage: info: source package guile-1.8
dpkg-buildpackage: info: source version 1.8.8+1-10
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Rob Browning rlb@defaultvalue.org
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-Change-guile-tut-to-guile-tut-1.8.patch
dpkg-source: info: applying 0002-Handle-the-DFSG-package-split.patch
dpkg-source: info: applying 0003-Fix-the-SRFI-60-copy-bit-documentation.patch
dpkg-source: info: applying 0004-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch
dpkg-source: info: applying 0005-Don-t-access-uninitialised-memory-in-scm_to_sockaddr.patch
dpkg-source: info: applying 0006-Make-sockets.test-more-robust.patch
dpkg-source: info: applying 0007-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
dpkg-source: info: applying 0008-Fix-problems-in-guile-tut.texi-that-cause-makeinfo-t.patch
dpkg-source: info: applying 0009-Fix-r5rs.texi-makeinfo-failure-by-applying-changes-f.patch
dpkg-source: info: applying 0010-Fix-test-suite-failure-caused-by-formfeed-difference.patch
dpkg-source: info: applying 0011-Fix-incompatibility-with-automake-1.13-specify-seria.patch
dpkg-source: info: applying 0012-remove-spurious-declarations-in-c-tokenize.lex.patch
dpkg-checkbuilddeps: error: Unmet build dependencies: texinfo flex
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)

It might be better to add another extra step to automatically install the build dependencies:

Step 2.5: Install build dependencies from APT:

mk-build-deps --install --root-cmd sudo --remove

And it seems to me that dpkg-buildpackage could be replaced by automatic debuild. See this answer and Debian manual.

1 Like

I tried to follow all instructions to compile guile 1.8.8. on Debian 11.4 (bullseye) and I get a segmentation fault:


libtool: link: x86_64-linux-gnu-ar cr .libs/libguile.a  libguile_la-alist.o libguile_la-arbiters.o libguile_la-async.o libguile_la-backtrace.o libguile_la-boolean.o libguile_la-chars.o libguile_la-continuations.o libguile_la-convert.o libguile_la-debug.o libguile_la-deprecation.o libguile_la-deprecated.o libguile_la-discouraged.o libguile_la-dynwind.o libguile_la-environments.o libguile_la-eq.o libguile_la-error.o libguile_la-eval.o libguile_la-evalext.o libguile_la-extensions.o libguile_la-feature.o libguile_la-fluids.o libguile_la-fports.o libguile_la-futures.o libguile_la-gc.o libguile_la-gc-mark.o libguile_la-gc-segment.o libguile_la-gc-malloc.o libguile_la-gc-card.o libguile_la-gc-freelist.o libguile_la-gc_os_dep.o libguile_la-gdbint.o libguile_la-gh_data.o libguile_la-gh_eval.o libguile_la-gh_funcs.o libguile_la-gh_init.o libguile_la-gh_io.o libguile_la-gh_list.o libguile_la-gh_predicates.o libguile_la-goops.o libguile_la-gsubr.o libguile_la-guardians.o libguile_la-hash.o libguile_la-hashtab.o libguile_la-hooks.o libguile_la-i18n.o libguile_la-init.o libguile_la-inline.o libguile_la-ioext.o libguile_la-keywords.o libguile_la-lang.o libguile_la-list.o libguile_la-load.o libguile_la-macros.o libguile_la-mallocs.o libguile_la-modules.o libguile_la-numbers.o libguile_la-objects.o libguile_la-objprop.o libguile_la-options.o libguile_la-pairs.o libguile_la-ports.o libguile_la-print.o libguile_la-procprop.o libguile_la-procs.o libguile_la-properties.o libguile_la-random.o libguile_la-rdelim.o libguile_la-read.o libguile_la-root.o libguile_la-rw.o libguile_la-scmsigs.o libguile_la-script.o libguile_la-simpos.o libguile_la-smob.o libguile_la-sort.o libguile_la-srcprop.o libguile_la-stackchk.o libguile_la-stacks.o libguile_la-stime.o libguile_la-strings.o libguile_la-srfi-4.o libguile_la-srfi-13.o libguile_la-srfi-14.o libguile_la-strorder.o libguile_la-strports.o libguile_la-struct.o libguile_la-symbols.o libguile_la-threads.o libguile_la-null-threads.o libguile_la-throw.o libguile_la-values.o libguile_la-variable.o libguile_la-vectors.o libguile_la-version.o libguile_la-vports.o libguile_la-weaks.o libguile_la-ramap.o libguile_la-unif.o dynl.o filesys.o posix.o net_db.o socket.o regex-posix.o
libtool: link: x86_64-linux-gnu-ranlib .libs/libguile.a
libtool: link: ( cd ".libs" && rm -f "libguile.la" && ln -s "../libguile.la" "libguile.la" )
/bin/bash ../libtool  --tag=CC   --mode=link x86_64-linux-gnu-gcc  -O2 -g -Wall -Wmissing-prototypes   -o guile guile-guile.o libguile.la -lgmp -lcrypt -lm -lltdl
libtool: link: x86_64-linux-gnu-gcc -O2 -g -Wall -Wmissing-prototypes -o .libs/guile guile-guile.o  ./.libs/libguile.so -lgmp -lcrypt -lm -lltdl
cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc continuations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srfi-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-posix.doc | GUILE="/home/guraltsev/Documents/devel/texmacs/guile/pre-inst-guile" ../scripts/snarf-check-and-output-texi          > guile-procedures.texi || { rm guile-procedures.texi; false; }
/bin/bash: line 1:  6487 Broken pipe             cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc continuations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc
srfi-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc throw.doc values.doc variable.doc vectors.doc version.doc vports.doc weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc socket.doc regex-posix.doc
      6488 Segmentation fault      | GUILE="/home/guraltsev/Documents/devel/texmacs/guile/pre-inst-guile" ../scripts/snarf-check-and-output-texi > guile-procedures.texi
make[4]: *** [Makefile:2690: guile-procedures.texi] Error 1
make[4]: Leaving directory '/home/guraltsev/Documents/devel/texmacs/guile/libguile'
make[3]: *** [Makefile:799: all] Error 2
make[3]: Leaving directory '/home/guraltsev/Documents/devel/texmacs/guile/libguile'
make[2]: *** [Makefile:670: all-recursive] Error 1
make[2]: Leaving directory '/home/guraltsev/Documents/devel/texmacs/guile'
make[1]: *** [Makefile:513: all] Error 2
make[1]: Leaving directory '/home/guraltsev/Documents/devel/texmacs/guile'
dh_auto_build: error: make -j12 returned exit code 2
make: *** [debian/rules:79: build] Error 255
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

I am on WSL2 under Windows 10 so it might have to do with that. Has anyone recently managed to compile the above?

There’s probably a patch for this in @pjoyez’s repository:
https://build.opensuse.org/package/show/home:slowphil:texmacs-devel/guile-1.8

You can of course also forego building guile-1.8 yourself and install it from that repo.

1 Like

git@github.com:texmacs/guile.git seems to lead to permission error. Replace it by https://github.com/texmacs/guile.git could prevent errors.

I also encountered the same segfault (under termux). How did you solve it?

1.8.8 does not compile for me too (on MacOSX 13.2 M2). I use 1.8.7 which is just fine.