From: Daniel Stenberg Date: Fri, 18 Nov 2022 10:25:24 +0000 (+0100) Subject: docs/INSTALL.md: expand on static builds X-Git-Tag: curl-7_87_0~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a6a48957fc271d2b935423941204597490d949b;p=thirdparty%2Fcurl.git docs/INSTALL.md: expand on static builds Remove from KNOWN_BUGS Closes #9944 --- diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 801ec44e81..73076611f5 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -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 @@ -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. diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 2f8e7e49b5..a3128b4da9 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -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 @@ -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