On 2025-07-25, Paul Smith wrote:
On Fri, 2025-07-25 at 18:00 +0300, gnu-bug...@mekboy.ru wrote:
On a static build of make getting 2 failing tests - load and loadapi.
Running them manually produces "Dynamic loading not supported" error.
Is it running dynlib-related tests on a static build?

I believe this is just a test problem.

When the test suite builds the shared libraries it uses the same
compiler and compiler flags that were used to build "make".  If you
have added something like -static to the compiler flags used when
building GNU Make, then when the test tries to build the .so it won't
work well.

I don't think there's any reason why make shouldn't be able to use the
load/loadapi even if it's build statically, if the shared objects are
built properly.

Hi Paul,
Here's my entire build process:

export CC=musl-gcc CFLAGS="-Os" LDFLAGS="-static"
./configure --prefix=/usr --without-guile
./build.sh
./make -k check

From what I can see in ./configure --help output there's no way to give
build.sh any directions in regards to static/dynamic linking, right? The
goal is to get a statically linked binary, if building .so files along
the way is unavoidable that's fine, I'll just delete them afterwards.
But I would prefer to have a clean make check run.

Reply via email to