Skip to content

Commit

Permalink
docs/INSTALL.md: expand on static builds
Browse files Browse the repository at this point in the history
Remove from KNOWN_BUGS

Closes curl#9944
  • Loading branch information
bagder committed Nov 18, 2022
1 parent ff8fc80 commit 8a6a489
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
27 changes: 21 additions & 6 deletions docs/INSTALL.md
Expand Up @@ -74,8 +74,8 @@ Without pkg-config installed, use this:

./configure --with-openssl=/opt/OpenSSL

If you insist on forcing a build without SSL support, even though you may
have OpenSSL installed in your system, you can run configure like this:
If you insist on forcing a build without SSL support, you can run configure
like this:

./configure --without-ssl

Expand All @@ -92,17 +92,32 @@ provide this option to gcc to set a hard-coded path to the runtime linker:

LDFLAGS=-Wl,-R/usr/local/ssl/lib ./configure --with-openssl

## More Options
## Static builds

To force a static library compile, disable the shared library creation by
running configure like:

./configure --disable-shared

To tell the configure script to skip searching for thread-safe functions, add
an option like:
The configure script is primarily done to work with shared/dynamic third party
dependencies. When linking with shared libraries, the dependency "chain" is
handled automatically by the library loader - on all modern systems.

./configure --disable-thread
If you instead link with a static library, you need to provide all the
dependency libraries already at the link command line.

Figuring out all the dependency libraries for a given library is hard, as it
might involve figuring out the dependencies of the dependencies and they vary
between platforms and change between versions.

When using static dependencies, the build scripts will mostly assume that you,
the user, will provide all the necessary additional dependency libraries as
additional arguments in the build. With configure, by setting `LIBS` or
`LDFLAGS` on the command line.

Building statically is not for the faint of heart.

## Debug

If you are a curl developer and use gcc, you might want to enable more debug
options with the `--enable-debug` option.
Expand Down
23 changes: 0 additions & 23 deletions docs/KNOWN_BUGS
Expand Up @@ -48,7 +48,6 @@ problems may have been fixed or changed somewhat since this was written.
5.1 OS400 port requires deprecated IBM library
5.2 curl-config --libs contains private details
5.3 curl compiled on OSX 10.13 failed to run on OSX 10.10
5.4 Build with statically built dependency
5.5 cannot handle Unicode arguments in non-Unicode builds on Windows
5.6 make distclean loops forever
5.8 configure finding libs in wrong directory
Expand Down Expand Up @@ -405,28 +404,6 @@ problems may have been fixed or changed somewhat since this was written.

See https://github.com/curl/curl/issues/2905

5.4 Build with statically built dependency

The build scripts in curl (autotools, cmake and others) are primarily done to
work with shared/dynamic third party dependencies. When linking with shared
libraries, the dependency "chain" is handled automatically by the library
loader - on all modern systems.

If you instead link with a static library, we need to provide all the
dependency libraries already at the link command line.

Figuring out all the dependency libraries for a given library is hard, as it
might also involve figuring out the dependencies of the dependencies and they
may vary between platforms and even change between versions.

When using static dependencies, the build scripts will mostly assume that
you, the user, will provide all the necessary additional dependency libraries
as additional arguments in the build. With configure, by setting LIBS/LDFLAGS
on the command line.

We welcome help to improve curl's ability to link with static libraries, but
it is likely a task that we can never fully support.

5.5 cannot handle Unicode arguments in non-Unicode builds on Windows

If a URL or filename cannot be encoded using the user's current codepage then
Expand Down

0 comments on commit 8a6a489

Please sign in to comment.