Opened 3 years ago

Closed 3 years ago

#63162 closed defect (fixed)

libudns @0.4: configure: fatal: cannot find libraries needed for sockets

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: libudns

Description

I'm on Big Sur with Xcode 12.5.1; libudns fails to configure saying this:

--->  Configuring libudns
DEBUG: Preferred compilers: clang macports-clang-9.0 macports-clang-12 macports-clang-11 macports-clang-10
DEBUG: Using compiler 'Xcode Clang'
DEBUG: Executing org.macports.configure (libudns)
DEBUG: Environment: 
CC='/usr/bin/clang'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libudns/libudns/work/.CC_PRINT_OPTIONS'
CFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk'
CXX='/usr/bin/clang++'
CXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64'
DEVELOPER_DIR='/Library/Developer/CommandLineTools'
F90FLAGS='-pipe -Os -m64'
FCFLAGS='-pipe -Os -m64'
FFLAGS='-pipe -Os -m64'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='11.0'
OBJC='/usr/bin/clang'
OBJCFLAGS='-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64'
OBJCXX='/usr/bin/clang++'
OBJCXXFLAGS='-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64'
SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libudns/libudns/work/udns-0.4" && ./configure 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libudns/libudns/work/udns-0.4" && ./configure 
configure... udns package
checking for C compiler... $CC (/usr/bin/clang)
checking whenever the C compiler (/usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64)
           can produce executables... yes
checking for ranlib... ranlib
checking for getopt()... yes
checking for libraries needed for socket and connect... not found
configure: fatal: cannot find libraries needed for sockets
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libudns/libudns/work/udns-0.4" && ./configure 
Exit code: 1
Error: Failed to configure libudns: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_libudns/libudns/work/udns-0.4/config.log
Error: Failed to configure libudns: configure failure: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: configure failure: command execution failed

Checking config.log shows this:

>>> checking for libraries needed for socket and connect
==== Command invocation failed. Command line was:
/usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 conftest.c -o conftest
==== compiler input was:
int main() { socket(); connect(); return 0; }
==== output was:
conftest.c:1:14: error: implicit declaration of function 'socket' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int main() { socket(); connect(); return 0; }
             ^
conftest.c:1:24: error: implicit declaration of function 'connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int main() { socket(); connect(); return 0; }
                       ^
2 errors generated.
====
==== Command invocation failed. Command line was:
/usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 conftest.c -o conftest -lsocket -lnsl
==== compiler input was:
int main() { socket(); connect(); return 0; }
==== output was:
conftest.c:1:14: error: implicit declaration of function 'socket' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int main() { socket(); connect(); return 0; }
             ^
conftest.c:1:24: error: implicit declaration of function 'connect' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int main() { socket(); connect(); return 0; }
                       ^
2 errors generated.
====
=== not found
=== FATAL: cannot find libraries needed for sockets

...so IOW it's another case of -Werror=implicit-function-declaration being on by default now. Note that libudns's configure script is hand-written and doesn't use autoconf, so it should be edited directly.

(also note that this blocks installation of the jabberd port for me)

Change History (1)

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 5a2e33418e90c274602b4b06517b982f31bde2b3/macports-ports (master):

libudns: Fix implicit declaration of functions

Closes: #63162

Note: See TracTickets for help on using tickets.