Opened 22 months ago
Closed 21 months ago
Last modified 18 months ago
New point version
Changes in 3.0.6 (since 3.0.5)
Reimplement dynamic library loading ("dlopening") without libltdl
Guile used to load dynamic libraries with libltdl, a library provided by
the Libtool project.
Libltdl provided some compatibility benefits when loading shared
libraries made with older toolchains on older operating systems.
However, no system from the last 10 years or so appears to need such a
thick compatibility layer.
Besides being an unmaintained dependency of limited utility, libltdl
also has the negative aspect that in its search for libraries to load,
it could swallow useful errors for libraries that are found but not
loadable, instead showing just errors for search path candidates that
are not found.
Guile now implements dynamic library loading directly in terms of the
standard "dlopen" interface, providing a limited shim for platforms with
similar functionality exposed under different names (MinGW).
This change has a few practical impacts to Guile users. There is a new
library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
loading a library fails now have better errors. And Guile no longer has
a libltdl dependency.
Although Guile no longer uses libltdl, for backwards compatibility Guile
still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
includes ad-hoc logic to support uninstalled dynamically loadable
libraries via also adding the ".libs" subdirectories of
`LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
documentation for a full discussion.
Fix important incompatibility with GnuTLS
Guile uses the GNU multi-precision (GMP) library to implement
arbitrary-precision integers (bignums) and fractions. Usually Guile is
built to dynamically link to libgmp. In this configuration, any other
user of GMP in the process uses the same libgmp instance, with the same
An important piece of shared state is the GMP allocator, responsible for
allocating storage for the digits of large integers. For Guile it's
most efficient to install libgc as the GMP allocator. That way Guile
doesn't need to install finalizers, which have significant overhead, to
free GMP values when Guile bignums are collected. Using libgc to
allocate digits also allows Guile's GC to adequately measure the memory
cost of these values.
However, if the Guile process is linked to some other user of GMP, then
probably the references from the other library to GMP values aren't
visible to the garbage collector. In this case libgc could prematurely
collect values from that other GMP user.
This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
the GMP allocator, so since then, Guile-GnuTLS has been buggy.
Therefore, the default is now to not install libgc as the GMP allocator.
This may slow down some uses of bignums. If you know that your Guile
program will never use a library that uses GMP, you can set the
GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
this environment variable when building Guile, for example. See
"Environment Variables" in the manual, for more.
In some future, Guile may switch to GMP's more low-level "MPN" API for
working with bignums, which would allow us to regain the ability to use
GC-managed digit storage in all configurations.
New build option: --enable-mini-gmp
For some users, it would be preferable to bundle a private copy of the
GMP bignum library into Guile. Some users would like to avoid the extra
dependency. Others would like to use libgc to manage GMP values, while
not perturbing the GMP allocator for other GMP users.
For these cases, Guile now has an --enable-mini-gmp configure option,
which will use a stripped-down version of GMP, bundled with Guile. This
code doesn't have all the algorithmic optimizations of full GMP, but
implements the same API in a basic way. It can be more optimal in a
Guile context, given that it can use libgc to allocate its data.
Note that a build with --enable-mini-gmp is not ABI-compatible with a
"stock" build, as functions that use GMP types (scm_to_mpz,
scm_from_mpz) are not exported.
Thanks to Niels Möller and other GMP developers for their mini-gmp
New `read' implementation in Scheme
Guile's `read' procedure has been rewritten in Scheme. Compared to the
C reader (which still exists for bootstrapping reasons), the new
implementation is more maintainable, more secure, more debuggable, all
while faithfully reproducing all quirks from Guile's previous reader
implemented in C. Also, the Scheme reader is finally compatible with
suspendable ports, allowing REPL implementations to be built with
lightweight concurrency packages such as the third-party "Fibers"
library. Calls to read' from Scheme as well as calls to scm_read'
from C use the new reader.
read' from Scheme as well as calls to
The Scheme implementation is currently about 60% as fast as the
now-inaccessible C implementation, and we hope to close the gap over
time. Bug reports very welcome.
Scheme compiler uses `read-syntax' for better debugging
The new Scheme reader also shares implementation with the new
`read-syntax' procedure, which annotates each datum with source location
information. Guile's compiler can use this to provide better
source-level debugging for Scheme programs. Note that this can slightly
increase compiled file sizes, though this is mitigated by some assembler
Syntax objects record source locations
When compiling a file that defines a macro, the output will usually
include a number of syntax objects as literals. Previously, these
literals had no source information; now they do. This should improve
Optimized run-time relocations
The code that patches references between statically-allocated Scheme
data has been optimized to be about 30% shorter than before or so, which
can significantly decrease compiled file size and run-time
Optimized calls to known functions
For calls where the callee is within the compilation unit, Guile can now
skip the argument count check.
Reduce code size for calls to module variables
All calls to a given exported or private variable from a module now
dispatch through the same trampoline function. This reduces code size.
The Gnulib compatibility library has been updated, for the first time
since 2017 or so. We expect no functional change but look forward to
any bug reports.
See "Ports" in the manual.
See "Bytevector Ports" in the manual.
`GUILE_EXTENSIONS_PATH' environment variable.
See "Environment Variables" in the manual.
mkdtemp' and mkstemp'
See "File System" in the manual. There is still `mkstemp!' but we
recommend that new code uses `mkstemp', which does not mutate the
contents of the "template" argument string. Instead for `mkstemp' you
get the name of the newly-created file by calling `port-filename' on the
`(system foreign-library)' module
See the newly reorganized "Foreign Function Interface", for details.
These new interfaces replace dynamic-link', dynamic-pointer' and
similar, which will eventually be deprecated.
See "Annotated Scheme Read" in the manual.
See "Syntax Case" in the manual.
See "Syntax Transformer Helpers" in the manual.
R6RS vector-map, vector-for-each
Fix reverse-list->string docstring
Fix R7RS "member" result when no item found
Fix make-transcoded-port on input+output ports
Fix (ice-9 ftw) on filesystems where inode values are meaningless
Fix many bugs that prevented Guile from building on MinGW
Fix many bugs that prevented Guile from building on MinGW64
Fix many bugs that prevented Guile's test suite from running on MinGW
Fix srfi-69 merge-hash
Fix suspendable-ports implementation of get-bytevector-some!
Fix overread in string-locale<?, string-locale-ci<?, and friends
Fix handling of parameter lists to elisp defun to allow nil
Fix closure-conversion bug for SCC with no free vars and one not-well-known function
Fix error when < passed non-real value
Fix bug in which exported and private names in a used module could alias each other
Fix bug with slot options in redefinable GOOPS classes
Fix bugs regarding port buffering for TLS connections in web client
This function now has no effect; Guile will not unload dynamically
linked modules, as that can destabilize the system.
`call-with-output-string' closes port on normal exit
This procedure used to leave the port open, even though there was no
useful way to access it. Now we clean it up more promptly, disposing
any possible associated iconv descriptor.
7505e5727b Update to tcsh-6.22.04wq
f8660abe42 Update to hdparm-9.61
2e542e286c Update to guile-3.0.6
6494b9f622 Update to fdk-aac-2.0.2
15504231f0 Update to at-spi2-core-2.40.1
Powered by Trac 1.5.3.dev0
By Edgewall Software
© 1998-2022 Gerard Beekmans.