* On 2025 07 Apr 20:39 -0500, simon.rich...@hogyros.de wrote: > Hi, > > if I remember correctly, you need to pass both --enable-static and > --enable-shared to get both.
Hi Simon. That is an idea worth a try but it didn't work for me. The first indication is at the end of the 'configure' script run where some custom text is output that shows the state of certain variables: Enable shared libs no Enable static libs yes Normally the result is reversed. My observation is that whenever '--enable-static' is passed the shared libs are suppressed. The architecture I am using is what Debian calls 'amd64' and other distributions call 'x86_64-linux-gnu'. On a hunch, I did a search for "libhamlib.a" on the packages.debian.org Web site and get the following result: /usr/lib/i386-gnu/libhamlib.a libhamlib-dev [hurd-i386] /usr/lib/i386-kfreebsd-gnu/libhamlib.a libhamlib-dev [kfreebsd-i386] /usr/lib/ia64-linux-gnu/libhamlib.a libhamlib-dev [ia64] /usr/lib/mips-linux-gnu/libhamlib.a libhamlib-dev [mips] /usr/lib/mipsel-linux-gnu/libhamlib.a libhamlib-dev [mipsel] /usr/lib/powerpc-linux-gnuspe/libhamlib.a libhamlib-dev [powerpcspe] /usr/lib/riscv64-linux-gnu/libhamlib.a libhamlib-dev [riscv64] /usr/lib/x86_64-kfreebsd-gnu/libhamlib.a libhamlib-dev [kfreebsd-amd64] My take away from that list is that only the Hurd and FreeBSD based systems support building both shared and static libraries on i386 and x86_64 platforms. Looking further into the Debian 'rules' file, neither shared nor static are specifically enabled or disabled. I guess whatever is the natural result of compilation with defaults on a given platform is what is packaged. > On many systems, both are built with -fPIC now, to allow use of static > libraries in position-independent executables, I'm not sure if libtool > handles this efficiently, but it mostly means longer build time. Would this be related to why 'i386' and 'x86_64' architectures only produce one or the other depending on the state of '--enable-static'? I'm not that deep into library structure but just reading the libtool docs makes me wonder if truly different object files are generated for static versus shared. My main goal is to provide a technically sound answer as to why both cannot be built in a single compilation pass on common architectures. Thanks, Simon. - Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
signature.asc
Description: PGP signature