Skip to content

compiler error with icc on Linux #5096

@aminiussi

Description

@aminiussi

I did this

with CC=icc and:

[alainm@gemini curl-7.69.1]$ icc -v
icc version 19.1.0.166 (gcc version 8.3.0 compatibility)
[alainm@gemini curl-7.69.1]$ 

$CFLAGS=-axCOMMON-AVX512 ./configure --prefix=....
$make

I got:

[alainm@gemini curl-7.69.1]$ make
Making all in lib
make[1]: Entering directory `/beegfs/SCRATCH/alainm/install/curl-7.69.1/lib'
make  all-am
make[2]: Entering directory `/beegfs/SCRATCH/alainm/install/curl-7.69.1/lib'
  CC       libcurl_la-mime.lo
icc: command line remark #10148: option '-vec-report0' not supported
In file included from urldata.h(92),
                 from mime.c(30):
/usr/include/netinet/in.h(376): error: expected a type specifier
  extern uint16_t ntohs (uint16_t __netshort)
                  ^

In file included from urldata.h(92),
                 from mime.c(30):
/usr/include/netinet/in.h(380): error: expected a type specifier
  extern uint16_t htons (uint16_t __hostshort)
                  ^

compilation aborted for mime.c (code 2)
make[2]: *** [libcurl_la-mime.lo] Error 1
make[2]: Leaving directory `/beegfs/SCRATCH/alainm/install/curl-7.69.1/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/beegfs/SCRATCH/alainm/install/curl-7.69.1/lib'
make: *** [all-recursive] Error 1
[alainm@gemini curl-7.69.1]$ 

Once I preprocessed explicitly with -E, it appear that the compile code was:

[alainm@gemini lib]$ icc truc.c
In file included from urldata.h(91),
                 from mime.c(30):
/usr/include/netinet/in.h(376): error: expected a type specifier
  extern uint16_t curlx_ntohs((uint16_t __netshort))
                              ^

In file included from urldata.h(91),
                 from mime.c(30):
/usr/include/netinet/in.h(380): error: expected a type specifier
  extern uint16_t curlx_htons((uint16_t __hostshort))
                              ^

compilation aborted for truc.c (code 2)
[alainm@gemini lib]$ 

Which can be explained by:

[alainm@gemini curl-7.69.1]$ find . -type f -exec egrep "define.+ntohs" {} \; -print
#  define ntohs(a)      curlx_ntohs((a))
./lib/warnless.h

I expected the following

A nice build

curl/libcurl version

https://github.com/curl/curl/releases/download/curl-7_69_1/curl-7.69.1.tar.gz

operating system

Linux gemini 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions