[MacPorts] #63328: kerberos5 @1.19.2 needs corrected configure options
MacPorts
noreply at macports.org
Tue Aug 3 10:46:45 UTC 2021
#63328: kerberos5 @1.19.2 needs corrected configure options
--------------------------+------------------------
Reporter: ballapete | Owner: ryandesign
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: tiger
Port: kerberos5 |
--------------------------+------------------------
Comment (by ballapete):
On very fast `Big Sur` I built the port with `LDFLAGS="-Wl,-t
-L/opt/local/lib"`. This way the binaries are built à la (a bit edited):
{{{
/usr/bin/clang -L../../lib -dynamic -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -fno-common \
-Wl,-t -L/opt/local/lib -Wl,-search_paths_first -DHAVE_CONFIG_H
-I../../include -I../../include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE
-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -fno-common -Werror=unknown-warning-option -Wall -Wcast-align
-Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-
overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type
-Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label
-Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare
-Wnewline-eof -Wdeclaration-after-statement -pthread -o test_chpw_message
test_chpw_message.o -lkrb5 -lk5crypto -L/opt/local/lib -lcom_err
-lkrb5support \
-lintl -lresolv -lintl -lresolv
}}}
which leads to using these libraries (filtered with `sort -u` and removed
all `clang` invocations and then marked the `Kerberos5` libraries):
{{{
/opt/local/lib/libcom_err.dylib
/opt/local/lib/libcrypto.dylib
/opt/local/lib/libedit.dylib
•/opt/local/lib/libgssapi_krb5.dylib
•/opt/local/lib/libgssrpc.dylib
/opt/local/lib/libintl.dylib
•/opt/local/lib/libk5crypto.dylib
•/opt/local/lib/libkadm5srv_mit.dylib
•/opt/local/lib/libkdb5.dylib
•/opt/local/lib/libkrad.dylib
•/opt/local/lib/libkrb5.dylib
•/opt/local/lib/libkrb5support.dylib
/opt/local/lib/liblmdb.dylib
/opt/local/lib/libssl.dylib
•/opt/local/lib/libverto.dylib
cat ./osconf.hin | sed -e "s\"@KRB5RCTMPDIR\"/var/tmp\"" -e
"s\"@PREFIX\"/opt/local\"" -e "s\"@EXEC_PREFIX\"/opt/local\"" -e
"s\"@BINDIR\"/opt/local/bin\"" -e "s\"@LIBDIR\"/opt/local/lib\"" -e
"s\"@SBINDIR\"/opt/local/sbin\"" -e
"s\"@MODULEDIR\"/opt/local/lib/krb5/plugins\"" -e
"s\"@GSSMODULEDIR\"/opt/local/lib/gss\"" -e
"s\"@LOCALSTATEDIR\"/opt/local/var\"" -e
"s\"@RUNSTATEDIR\"/opt/local/var/run\"" -e
"s\"@SYSCONFDIR\"/opt/local/etc\"" -e "s\"@DYNOBJEXT\".so\"" -e
"s\"@SYSCONFCONF\":/opt/local/etc/krb5.conf\"" > osconf.new
ld: warning: dylib (/opt/local/lib/libcrypto.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libedit.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libintl.dylib) was built for newer
macOS version (11.1) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/liblmdb.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libssl.dylib) was built for newer macOS
version (11.2) than being linked (11.0)
}}}
Back to the errors from ten years ago! But – using `LIBS="-Wl,-t
-L/opt/local/lib"` instead I get:
{{{
/opt/local/lib/libcom_err.dylib
/opt/local/lib/libcrypto.dylib
/opt/local/lib/libedit.dylib
/opt/local/lib/libintl.dylib
/opt/local/lib/liblmdb.dylib
cat ./osconf.hin | sed -e "s\"@KRB5RCTMPDIR\"/var/tmp\"" -e
"s\"@PREFIX\"/opt/local\"" -e "s\"@EXEC_PREFIX\"/opt/local\"" -e
"s\"@BINDIR\"/opt/local/bin\"" -e "s\"@LIBDIR\"/opt/local/lib\"" -e
"s\"@SBINDIR\"/opt/local/sbin\"" -e
"s\"@MODULEDIR\"/opt/local/lib/krb5/plugins\"" -e
"s\"@GSSMODULEDIR\"/opt/local/lib/gss\"" -e
"s\"@LOCALSTATEDIR\"/opt/local/var\"" -e
"s\"@RUNSTATEDIR\"/opt/local/var/run\"" -e
"s\"@SYSCONFDIR\"/opt/local/etc\"" -e "s\"@DYNOBJEXT\".so\"" -e
"s\"@SYSCONFCONF\":/opt/local/etc/krb5.conf\"" > osconf.new
ld: warning: dylib (/opt/local/lib/libcrypto.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libedit.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libintl.dylib) was built for newer
macOS version (11.1) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/liblmdb.dylib) was built for newer
macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libssl.dylib) was built for newer macOS
version (11.2) than being linked (11.0)
}}}
because now binaries are built this way (a bit edited):
{{{
/usr/bin/clang -L../../lib -dynamic -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -fno-common \
-Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
-arch x86_64 -Wl,-search_paths_first -DHAVE_CONFIG_H -I../../include
-I../../include -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch
x86_64 -fno-common -Werror=unknown-warning-option -Wall -Wcast-align
-Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-
overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type
-Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label
-Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare
-Wnewline-eof -Wdeclaration-after-statement -pthread -o test_chpw_message
test_chpw_message.o -lkrb5 -lk5crypto -L/opt/local/lib -lcom_err
-lkrb5support \
-lintl -lresolv -Wl,-t -L/opt/local/lib -lintl -lresolv -Wl,-t
-L/opt/local/lib
}}}
I think this approach, giving `configure` a means to handle the detection
of dynamic libraries, looks promising. In a few hours, or tomorrow, I'll
be able to test this also on PPC Leopard, where `port` started upgrading
yesterday…
`make check` also does **not** use the `kerberos5` libraries from
/opt/local/lib with LIBS instead of LDFLAGS.
--
Ticket URL: <https://trac.macports.org/ticket/63328#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list