Solved Curl build fail at configure stage with cc error

Code:
FreeBSD  12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  i386
Strange problem configuring ftp/curl fail in config stage and the problem seems related with Clang.
Here what happen:
Code:
===>   curl-7.68.0 depends on executable: gmake - found
===>   curl-7.68.0 depends on file: /usr/local/lib/heimdal/libgssapi.so - found
===>   curl-7.68.0 depends on file: /usr/local/lib/libcrypto.so.11 - found
===>   curl-7.68.0 depends on package: perl5>=5.30.r1<5.31 - found
===>  Configuring for curl-7.68.0
configure: loading site script /ports/Templates/config.site
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether gmake supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable ESNI support... no
checking for path separator... :
checking for sed... (cached) /usr/bin/sed
checking for grep... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ar... /usr/bin/ar
configure: using LIBS: -lkrb5 -lgssapi -lkrb5 -lgssapi -L/usr/local/lib
configure: LIBS note: LIBS should only be used to specify libraries (-lname).
configure: using CFLAGS: -I/usr/local/include/heimdal -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing
configure: CFLAGS note: CFLAGS should only be used to specify C compiler flags, not include directories. Use CPPFLAGS for: -I/usr/local/include/heimdal
configure: WARNING: Continuing even with errors mentioned immediately above this line.
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/ports/ftp/curl/work/curl-7.68.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
===>  Script "configure" failed unexpectedly.
Please report the problem to sunpoet@FreeBSD.org [maintainer] and attach the
"/ports/ftp/curl/work/curl-7.68.0/config.log" including the output of the
failure of your make command. Also, it might be a good idea to provide an
overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
Now, looking inside /ports/ftp/curl/work/curl-7.68.0/config.log I can see this:
Code:
configure:3191: checking whether to enable compiler warnings as errors
configure:3854: WARNING: Continuing even with errors mentioned immediately above this line.
cc: error: argument to '-V' is missing (expected 1 value)
cc: error: no input files
cc: error: unknown argument '-qversion', did you mean '--version'?
cc: error: no input files
configure:4495: error: in `/ports/ftp/curl/work/curl-7.68.0':
configure:4499: error: cannot run C compiled programs.
ac_cv_func_gai_strerror=yes
ac_cv_func_strerror=yes
ac_cv_func_strerror_r=yes
ac_cv_have_decl_ferror_unlocked=yes
ac_cv_have_decl_strerror_r=yes
gl_cv_have_raw_decl_strerror_r=yes
CONFIGURE_OPTIONS='" '\''--disable-werror'\'' '\''--with-fish-functions-dir=/usr/local/share/fish/completions'\'' '\''--with-zsh-functions-dir=/usr/local/share/zsh/site-functions'\'' '\''--enable-alt-svc'\'' '\''--without-brotli'\'' '\''--disable-ares'\'' '\''--without-ca-bundle'\'' '\''--disable-cookies'\'' '\''--disable-curldebug'\'' '\''--disable-debug'\'' '\''--enable-dict'\'' '\''--enable-ftp'\'' '\''--without-gnutls'\'' '\''--enable-gopher'\'' '\''--with-gssapi=/usr/local'\'' '\''CFLAGS=-I/usr/local/include/heimdal -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing '\'' '\''LDFLAGS=-L/usr/local/lib/heimdal  -L/usr/local/lib/heimdal -L/usr/local/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/local/lib/heimdal:/usr/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong '\'' '\''LIBS=-lkrb5 -lgssapi -lkrb5 -lgssapi -L/usr/local/lib'\'' '\''KRB5CONFIG=/usr/local/bin/krb5-config'\'' '\''--enable-http'\'' '\''--without-nghttp2'\'' '\''--without-libidn2'\'' '\''--enable-imap'\'' '\''--enable-ipv6'\'' '\''--disable-ldap'\'' '\''--disable-ldaps'\'' '\''--without-libssh2'\'' '\''--without-libmetalink'\'' '\''--without-nss'\'' '\''--with-ssl=/usr/local'\'' '\''--enable-pop3'\'' '\''--enable-proxy'\'' '\''--without-libpsl'\'' '\''--without-librtmp'\'' '\''--enable-rtsp'\'' '\''--disable-smb'\'' '\''--enable-smtp'\'' '\''--enable-telnet'\'' '\''--enable-tftp'\'' '\''--enable-pthreads'\'' '\''--enable-threaded-resolver'\'' '\''--disable-tls-srp'\'' '\''--without-wolfssl'\'' '\''--prefix=/usr/local'\'' '\''--localstatedir=/var'\'' '\''--mandir=/usr/local/man'\'' '\''--disable-silent-rules'\'' '\''--infodir=/usr/local/share/info/'\'' '\''--build=i386-portbld-freebsd12.1'\'' '\''build_alias=i386-portbld-freebsd12.1'\'' '\''CC=cc'\'' '\''CPPFLAGS=-I/usr/local/include/heimdal -I/usr/local/include -isystem /usr/local/include'\'' '\''CPP=cpp'\''"'
Now I can't believe it will fail becouse cc -V doesn't exist. If this is the problem it is a big bug. How to overcome and go ahead with the build?

Thank you for looking.
 
Back
Top