Discussion:
static cURL
Laura Martín via curl-users
2017-10-09 22:18:25 UTC
Permalink
Good evening,

I'm trying to compile a completely static curl binary but I get glibc and
others shared:

ldd /opt/curl_Static/bin/curl
linux-vdso.so.1 (0x00007ffc0a5cf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f60ff491000)
libc.so.6 => /lib64/libc.so.6 (0x00007f60ff0f8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f60ff695000)


My config stanza:

CPPFLAGS="-I/usr/include" CFLAGS="-static" LDFLAGS="-L/lib64 -static"
LIBS="-ldl -lssl -lcrypto" ./configure --prefix=/opt/curl_Static
--disable-shared --enable-static --disable-threaded-resolver
--with-ssl=/opt/openssl_Static/ --with-tls --with-zlib=/opt/zlib_Static/

I need a completely static curl, because the final servers are very old and
don't have modern versions of glibc and openssl.

Is it possible or have I to compile statically all the environment (gcc,
glibc...)

KR,
Dan Fandrich
2017-10-10 05:24:19 UTC
Permalink
Post by Laura Martín via curl-users
I'm trying to compile a completely static curl binary but I get glibc and
Just to get the obvious out of the way, do you have the static libc.a
available to link against?
Post by Laura Martín via curl-users
ldd /opt/curl_Static/bin/curl
    linux-vdso.so.1 (0x00007ffc0a5cf000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f60ff491000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f60ff0f8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f60ff695000)
CPPFLAGS="-I/usr/include" CFLAGS="-static" LDFLAGS="-L/lib64 -static" LIBS=
"-ldl -lssl -lcrypto" ./configure --prefix=/opt/curl_Static --disable-shared
--enable-static --disable-threaded-resolver --with-ssl=/opt/openssl_Static/
Note that you're generally better off using pkg-config to pick up other
libraries, rather than passing directories in the flag arguments, so set
PKG_CONFIG_PATH here appropriately here instead.
Post by Laura Martín via curl-users
--with-tls --with-zlib=/opt/zlib_Static/
I need a completely static curl, because the final servers are very old and
don't have modern versions of glibc and openssl.
Is it possible or have I to compile statically all the environment (gcc,
glibc...)
I've found that libtool strips off -static if it can't statically link against
any one of the dependent libraries. Try building with 'make V=1' and add
-static to the final gcc link command line to see what errors it gives you.
It could be looking for a static library that isn't there.

Note that it's hard/impossible to completely statically link against glibc.
IIRC, some features are just not available when statically linked and must have
dynamic libraries available. If you want to statically link, uClibc or
MUSL are better choices.
Post by Laura Martín via curl-users
Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: htt
angel Hall-Coulston via curl-users
2017-10-10 07:52:53 UTC
Permalink
This is an automated reply
 Your email went straight to spam box





Sorry your message did not pass the first Spam Mail filter, ie you are not listed in my contacts!
To be included in my contacts you have to first be a nice person:

1.Not be trying to scam me for money!
2.Not trying to sell me what I don’t need!
3.Not be trying to get me to work for free!
4.Not be trying to send insulting emails because the above didn’t fool me and I called you out!
5.Not be wasting my day! (Also refer to number 3).



Good day :-) I hope THIS reply wasted a little more of YOUR time than YOUR spam wasted of mine!!
Post by Laura Martín via curl-users
Good evening,
ldd /opt/curl_Static/bin/curl
    linux-vdso.so.1 (0x00007ffc0a5cf000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f60ff491000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f60ff0f8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f60ff695000)
CPPFLAGS="-I/usr/include" CFLAGS="-static" LDFLAGS="-L/lib64 -static" LIBS="-ldl -lssl -lcrypto" ./configure --prefix=/opt/curl_Static --disable-shared --enable-static --disable-threaded-resolver --with-ssl=/opt/openssl_Static/ --with-tls --with-zlib=/opt/zlib_Static/
I need a completely static curl, because the final servers are very old and don't have modern versions of glibc and openssl.
Is it possible or have I to compile statically all the environment (gcc, glibc...)
KR,
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Kent Williams via curl-users
2017-10-11 18:14:16 UTC
Permalink
Someone needs to be unsubscribed...
Post by angel Hall-Coulston via curl-users
This is an automated reply
 Your email went straight to spam box




Sorry your message did not pass the first Spam Mail filter, ie you are
not listed in my contacts!
1.Not be trying to scam me for money!
2.Not trying to sell me what I don’t need!
3.Not be trying to get me to work for free!
4.Not be trying to send insulting emails because the above didn’t fool
me and I called you out!
5.Not be wasting my day! (Also refer to number 3).
Good day :-) I hope THIS reply wasted a little more of YOUR time than
YOUR spam wasted of mine!!
On 9 Oct 2017, at 23:18, Laura Martín via curl-users
Good evening,
I'm trying to compile a completely static curl binary but I get
ldd /opt/curl_Static/bin/curl
    linux-vdso.so.1 (0x00007ffc0a5cf000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f60ff491000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f60ff0f8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f60ff695000)
CPPFLAGS="-I/usr/include" CFLAGS="-static" LDFLAGS="-L/lib64
-static" LIBS="-ldl -lssl -lcrypto" ./configure
--prefix=/opt/curl_Static --disable-shared --enable-static
--disable-threaded-resolver --with-ssl=/opt/openssl_Static/
--with-tls --with-zlib=/opt/zlib_Static/
I need a completely static curl, because the final servers are
very old and don't have modern versions of glibc and openssl.
Is it possible or have I to compile statically all the environment (gcc, glibc...)
KR,
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Bill Mercer
2017-10-18 15:17:50 UTC
Permalink
Well THAT escalated quickly...

From: curl-users [mailto:curl-users-***@cool.haxx.se] On Behalf Of angel Hall-Coulston via curl-users
Sent: Tuesday, October 10, 2017 3:53 AM
To: Laura Martín via curl-users <curl-***@cool.haxx.se>
Cc: angel Hall-Coulston <***@me.com>
Subject: Re: static cURL

This is an automated reply
 Your email went straight to spam box





Sorry your message did not pass the first Spam Mail filter, ie you are not listed in my contacts!
To be included in my contacts you have to first be a nice person:

1.Not be trying to scam me for money!
2.Not trying to sell me what I don’t need!
3.Not be trying to get me to work for free!
4.Not be trying to send insulting emails because the above didn’t fool me and I called you out!
5.Not be wasting my day! (Also refer to number 3).



Good day :-) I hope THIS reply wasted a little more of YOUR time than YOUR spam wasted of mine!!

On 9 Oct 2017, at 23:18, Laura Martín via curl-users <curl-***@cool.haxx.se<mailto:curl-***@cool.haxx.se>> wrote:
Good evening,

I'm trying to compile a completely static curl binary but I get glibc and others shared:

ldd /opt/curl_Static/bin/curl
linux-vdso.so.1 (0x00007ffc0a5cf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f60ff491000)
libc.so.6 => /lib64/libc.so.6 (0x00007f60ff0f8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f60ff695000)


My config stanza:

CPPFLAGS="-I/usr/include" CFLAGS="-static" LDFLAGS="-L/lib64 -static" LIBS="-ldl -lssl -lcrypto" ./configure --prefix=/opt/curl_Static --disable-shared --enable-static --disable-threaded-resolver --with-ssl=/opt/openssl_Static/ --with-tls --with-zlib=/opt/zlib_Static/

I need a completely static curl, because the final servers are very old and don't have modern versions of glibc and openssl.

Is it possible or have I to compile statically all the environment (gcc, glibc...)

KR,
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html

Loading...