curl-library
Re: Intel Fortran Compilation error related to libcurl.a
Date: Tue, 10 Apr 2018 15:26:04 -0400
Daniel,
Based on your suggestion, I use the following command to compile the code:
ifort -static -o convert2 convert2.f -I/home/net/zheng/include
-I/home/net/zheng/include/curl -L/home/net/zheng/lib -lnetcdff -lnetcdf
-lhdf5_hl -lhdf5 -lz -lcurl -L/usr/lib -ldl -lcrypt
The new error message begins with following:
ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/home/net/zheng/lib/libhdf5.a(H5PL.o): In function `H5PL_load':
H5PL.c:(.text+0x568): warning: Using 'dlopen' in statically linked
applications requires a
t runtime the shared libraries from the glibc version used for linking
ld: skipping incompatible /usr/lib/libcrypt.a when searching for -lcrypt
ld: skipping incompatible /usr/lib/libm.a when searching for -lm
ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/home/net/zheng/lib/libcurl.a(libcurl_la-netrc.o): In function
`Curl_parsenetrc':
netrc.c:(.text+0x508): warning: Using 'getpwuid_r' in statically linked
applications requi
res at runtime the shared libraries from the glibc version used for linking
/home/net/zheng/lib/libcurl.a(libcurl_la-curl_addrinfo.o): In function
`Curl_getaddrinfo_e
x':
curl_addrinfo.c:(.text+0x84): warning: Using 'getaddrinfo' in statically
linked applicatio
ns requires at runtime the shared libraries from the glibc version used for
linking
It seems how to provide the order of libraries is necessary.
Thanks,
Lianyuan
On Wed, Apr 4, 2018 at 6:23 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 4 Apr 2018, Lianyuan Zheng - NOAA Federal wrote:
>
> However, when I compile the same code with option -static using the
>> following command:
>>
>> ifort -static -o convert2 convert2.f -I/home/net/zheng/include
>> -I/home/net/zheng/include/curl -L/home/net/zheng/lib -lnetcdff -lnetcdf
>> -lhdf5_hl -lhdf5 -lz -lcurl
>>
>
> This is asking to link with a static libcurl. When linking statically you
> must provide all other dependency libs as well on the link command line.
> Looking at those errors, you need at least -ldl, -lssl, -lcrypto and -lz
> (again). Maybe something else too.
>
> When you buid curl, it generates curl-config and "curl-config
> --static-libs" is made to generate the list of libs to use in the link
> line. That might help. It can be a really extensive list.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
-- Lianyuan Zheng Physical Scientist NOAA/National Ocean Service Center for Operational Oceanographic Products and Services 1305 East West Highway, SSMC4, Station 7340 Silver Spring, MD 20910 Office: 240-533-0550 Email: Lianyuan.Zheng_at_noaa.gov
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-04-10