error: Cannot find a type to use in place of socklen_t
Closed, ResolvedPublic

Description

I'm building on Solaris 11.3. libassuan-2.5.3 is failing configure:

checking sys/socket.h usability... no
checking sys/socket.h presence... yes
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h:     check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the compiler's result
configure: WARNING:     ## ------------------------------------- ##
configure: WARNING:     ## Report this to https://bugs.gnupg.org ##
configure: WARNING:     ## ------------------------------------- ##
checking for sys/socket.h... no
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking for socklen_t... no
checking for socklen_t equivalent... configure: error: Cannot find a type to use in place of socklen_t

Here is config.log:

Details

Version
2.5.3
JW created this task.Aug 14 2020, 9:11 AM
JW created this object in space S1 Public.
werner added a subscriber: werner.

Please try with out supplied CFLAGS or change them from

-g2 -O2 -m64 -march=native -fPIC -pthread -std=c99

to

-g2 -O2 -m64 -march=native

-std=c99 is probably the reason that the tests fail.
What is the reason that you believe -fPIC and -pthread are necessary?

JW added a comment.Aug 14 2020, 9:42 PM

-std=c99 is probably the reason that the tests fail.

Thanks. -std=c99 was the problem.

Its kind of odd it failed for libgcrypt (to me). It was OK for libgpg-error and libassuan. In fact, it was needed in the past.

Close this noise.

werner closed this task as Resolved.Aug 17 2020, 9:27 AM
werner claimed this task.

No, c99 was never required. Meanwhile we use a few c99 features but those are supported without any compiler option.