Opened 3 years ago

Closed 3 years ago

#63156 closed defect (fixed)

ike-scan @1.9_3: configure: error: cannot determine 64-bit integer type

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: bigsur catalina Cc:
Port: ike-scan

Description

I'm on macOS 11.4 with Xcode 12.5.1:

checking for uint8_t using /usr/bin/clang... yes
checking for uint16_t using /usr/bin/clang... yes
checking for uint32_t using /usr/bin/clang... yes
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... no
configure: error: cannot determine 64-bit integer type
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_ike-scan/ike-scan/work/ike-scan-1.9" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --with-openssl=/opt/local 
Exit code: 1
Error: Failed to configure ike-scan: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_ike-scan/ike-scan/work/ike-scan-1.9/config.log
Error: Failed to configure ike-scan: configure failure: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: configure failure: command execution failed

config.log says:

configure:4675: checking whether long int is 64 bits
configure:4764: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -Wall  -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -lgettextlib -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 conftest.c  >&5
conftest.c:58:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main() {
^
conftest.c:59:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit(! does_int64_work());
  ^
conftest.c:59:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 warning and 1 error generated.
configure:4767: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "ike-scan"
| #define PACKAGE_TARNAME "ike-scan"
| #define PACKAGE_VERSION "1.9"
| #define PACKAGE_STRING "ike-scan 1.9"
| #define PACKAGE_BUGREPORT "ike-scan@nta-monitor.com"
| #define PACKAGE "ike-scan"
| #define VERSION "1.9"
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_TCP_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_FCNTL_H 1
| #define TIME_WITH_SYS_TIME 1
| /* end confdefs.h.  */
| typedef long int int64;
| 
| /*
|  * These are globals to discourage the compiler from folding all the
|  * arithmetic tests down to compile-time constants.
|  */
| int64 a = 20000001;
| int64 b = 40000005;
| 
| int does_int64_work()
| {
|   int64 c,d;
| 
|   if (sizeof(int64) != 8)
|     return 0;			/* definitely not the right size */
| 
|   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
|   c = a * b;
|   d = (c + b) / b;
|   if (d != a+1)
|     return 0;
|   return 1;
| }
| main() {
|   exit(! does_int64_work());
| }
configure:4786: result: no
configure:4803: checking whether long long int is 64 bits
configure:4892: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -Wall  -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -lgettextlib -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 conftest.c  >&5
conftest.c:58:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main() {
^
conftest.c:59:3: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
  exit(! does_int64_work());
  ^
conftest.c:59:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
1 warning and 1 error generated.
configure:4895: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "ike-scan"
| #define PACKAGE_TARNAME "ike-scan"
| #define PACKAGE_VERSION "1.9"
| #define PACKAGE_STRING "ike-scan 1.9"
| #define PACKAGE_BUGREPORT "ike-scan@nta-monitor.com"
| #define PACKAGE "ike-scan"
| #define VERSION "1.9"
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_TCP_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_FCNTL_H 1
| #define TIME_WITH_SYS_TIME 1
| /* end confdefs.h.  */
| typedef long long int int64;
| 
| /*
|  * These are globals to discourage the compiler from folding all the
|  * arithmetic tests down to compile-time constants.
|  */
| int64 a = 20000001;
| int64 b = 40000005;
| 
| int does_int64_work()
| {
|   int64 c,d;
| 
|   if (sizeof(int64) != 8)
|     return 0;			/* definitely not the right size */
| 
|   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
|   c = a * b;
|   d = (c + b) / b;
|   if (d != a+1)
|     return 0;
|   return 1;
| }
| main() {
|   exit(! does_int64_work());
| }
configure:4914: result: no
configure:4930: error: cannot determine 64-bit integer type

...so, IOW, this looks like another issue of -Werror=implicit-function-declaration being on by default now.

Change History (2)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

This has been fixed upstream:

https://github.com/royhills/ike-scan/commit/c9ef0569443b03fda5339911acb8056a73c952de

Should also update the port to the latest upstream version, 1.9.4, though it still predates that fix by years.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 786fa10f20a07f92d263139c90815926d657f260/macports-ports (master):

ike-scan: Update to 1.9.4 with fixes

Add additional post-1.9.4 upstream fixes for implicit declaration of
functions, resource leakage, and potential null pointer dereference.

Remove gettext dependency; this software doesn't seem to use gettext.

Now use archive tarball and use autoreconf; post-1.9 versions have no
release tarballs.

Closes: #63156

Note: See TracTickets for help on using tickets.