curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Odd differences with cURL and GCC 9 and 10: curl_easy_setopt

From: Thompson, Matt \(GSFC-610.1\)\[SCIENCE SYSTEMS AND APPLICATIONS INC\] via curl- <curl-users_at_cool.haxx.se>
Date: Tue, 12 May 2020 19:19:35 +0000

Dear cURL Gurus,

I'm having some odd issues. Now, in truth the odd issues are manifesting in netCDF-C:

https://github.com/Unidata/netcdf-c/issues/1725

but one of the devs pointed me to one place to explain some of it: Sometimes when I build with GCC 10.1, netCDF-C reports:

  checking for curl_easy_setopt in -lcurl... no

and sometimes it reports:

  checking for curl_easy_setopt in -lcurl... yes

The thing is, in both cases, I have *never* changed how I build cURL (and haven't for a while) and I don't change how I build netCDF! I essentially do:

        @echo "Configuring curl"
        @(cd curl; \
          export PATH="$(prefix)/bin:$(PATH)" ;\
          export CPPFLAGS="$(INC_SUPP)";\
          export LIBS="-lm";\
          ./buildconf;\
          ./configure --prefix=$(prefix) \
                      --includedir=$(prefix)/include/ \
                      --libdir=$(prefix)/lib \
                      --with-zlib=$(prefix) \
                      --disable-ldap \
                      --enable-manual \
                      --disable-shared \
                      --enable-static \
                      --without-libidn \
                      --without-libidn2 \
                      CFLAGS="$(CFLAGS)" CC=$(CC) CXX=$(CXX) FC=$(FC) )
        @touch $@

to build cURL. (I run buildconf because my "Base Libraries" (aka Baselibs) have curl as a submodule in a Git repo.)

I have nothing between the two that seems to be different other than whether I load my GCC 9.3 module or my GCC 10.1 module. If I diff curl-config after each successfully builds, the main difference is:

❯ diff curl.930.log curl.1010.log
31d30
< parallel-tests: installing './test-driver'
726c725
< Install prefix: /Users/mathomp4/installed/MPI/gcc-gfortran-9.3.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin
---
> Install prefix: /Users/mathomp4/installed/MPI/gcc-gfortran-10.1.0/openmpi-4.0.3/Baselibs/6.0.12-Snap13/Darwin

(Note CPPFLAGS and LDFLAGS are also different because of different installation prefixes for sub-libraries)

I'm kind of at a loss. The log output from my curl build is about as identical as you can get. Thus, I can't see why support for curl_easy_setopt would be different.

If I try building simple.c:

https://curl.haxx.se/libcurl/c/simple.html

with my GCC 9.3 and GCC 10.1 build of cURL they both work.

Is it possible the test for curl_easy_setopt in netCDF-C's configure isn't good? I don't read autotools well enough to know.

Any ideas? Am I perhaps building cURL incorrectly in some way that netCDF is annoyed with it?

Thanks,
Matt

--
Matt Thompson, SSAI, Ld Scientific Programmer/Analyst
NASA GSFC, Global Modeling and Assimilation Office
Code 610.1, 8800 Greenbelt Rd, Greenbelt, MD 20771
Phone: 301-614-6712 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-12