I have an app which uses kerberos via py-curl -> curl. But I have a
problem to build curl with kerberos. Any advice?

j.

$ env FLAVOR=kerberos make
...
configure: error: one or more libs available at link-time are not available 
run-time. Libs used at link-time:  -lnghttp2  -lidn -L/usr/local/heimdal/lib 
-lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -lcrypto -lasn1 -lwind -lheimbase 
-lroken -pthread -pthread -lz

My WIP diff below:

~~~
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/curl/Makefile,v
retrieving revision 1.114
diff -u -p -r1.114 Makefile
--- Makefile    29 Jan 2016 23:52:24 -0000      1.114
+++ Makefile    7 Feb 2016 12:45:38 -0000
@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.114 2016/01/29 23:52:24 naddy Exp $
+# $OpenBSD: Makefile,v 1.113 2016/01/01 22:17:05 naddy Exp $
 
 COMMENT=       get files from FTP, Gopher, HTTP or HTTPS servers
 
@ -23,6 +23,9 @@ LIB_DEPENDS=  devel/libidn \
                www/nghttp2
 WANTLIB=       c crypto idn nghttp2 ssl z
 
+FLAVORS=       kerberos
+FLAVOR?=
+
 SEPARATE_BUILD=        Yes
 CONFIGURE_STYLE=gnu
 CONFIGURE_ARGS=        ${CONFIGURE_SHARED} \
@ -38,6 +41,13 @@ CONFIGURE_ENV+= \
     curl_cv_func_recv_args="int,void *,size_t,int,ssize_t" \
     curl_cv_func_send_args="int,const void *,size_t,int,ssize_t" \
     curl_cv_func_getnameinfo_args="const struct sockaddr 
*,socklen_t,size_t,int"
+
+.if ${FLAVOR:Mkerberos}
+CONFIGURE_ARGS+=       --with-gssapi=${LOCALBASE}/heimdal
+CONFIGURE_ENV+=                CPPFLAGS="-I${LOCALBASE}/heimdal/include" \
+                                       LDFLAGS="-L${LOCALBASE}/heimdal/lib"
+LIB_DEPENS+=           security/heimdal,-libs
+.endif
 
 # Note:
 # use ulimit -p 256 for test
~~~

And 'env FLAVOR=kerberos make configure':

~~~
===>  Configuring for curl-7.46.0-kerberos
Using /home/jirib/openbsd/pobj/curl-7.46.0-kerberos/config.site (generated)
configure: loading site script 
/home/jirib/openbsd/pobj/curl-7.46.0-kerberos/config.site
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking for path separator... :
checking for grep... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... 
/home/jirib/openbsd/pobj/curl-7.46.0-kerberos/bin/install -c 
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... mkdir -p
checking for gawk... (cached) awk
checking whether make sets $(MAKE)... (cached) yes
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking curl version... 7.46.0
checking build system type... x86_64-unknown-openbsd5.9
checking host system type... x86_64-unknown-openbsd5.9
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking size of long... 8
checking size of void*... 8
checking for 64-bit curl_off_t data type... long
checking size of curl_off_t... 8
checking formatting string directive for curl_off_t... "ld"
checking formatting string directive for unsigned curl_off_t... "lu"
checking constant suffix string for curl_off_t... L
checking constant suffix string for unsigned curl_off_t... UL
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... no
checking if _REENTRANT is actually needed... no
checking if _REENTRANT is onwards defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to print strings... print -r
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... (cached) /usr/bin/fgrep
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 131072
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64-unknown-openbsd5.9 file names to 
x86_64-unknown-openbsd5.9 format... func_convert_file_noop
checking how to convert x86_64-unknown-openbsd5.9 file names to toolchain 
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern 
/lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for archiver @FILE support... @
checking for strip... (cached) strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... (cached) yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... openbsd5.9 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... no
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... no
checking whether to build shared libraries only... no
checking whether to build static libraries only... no
checking for inline... inline
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking if compiler is LCC... no
checking if compiler is SGI MIPSpro C... no
checking if compiler is SGI MIPS C... no
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking if compiler is Watcom C... no
checking if compiler accepts debug disabling options... yes
configure: compiler options added: 
checking if compiler optimizer assumed setting might be used... no
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers 
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking for windows.h... no
checking whether build target is a native Windows one... no
checking whether build target supports WIN32 file API... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... yes
checking whether to support ldaps... yes
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to provide built-in manual... yes
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... (cached) yes
checking for strcasecmp... (cached) yes
checking for windows.h... (cached) no
checking for winsock.h... (cached) no
checking for winsock2.h... (cached) no
checking for connect in libraries... yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for time.h... (cached) yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking if monotonic clock_gettime works... yes
checking for inflateEnd in -lz... yes
checking for zlib.h... (cached) yes
configure: found both libz and libz.h header
checking for lber.h... no
checking for ldap.h... no
checking for ldapssl.h... no
checking for ldap_ssl.h... no
checking for LDAP libraries... cannot find LDAP libraries
configure: WARNING: Cannot find libraries for LDAP support: LDAP disabled
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... yes
checking if GSS-API support is requested... yes
checking gss.h usability... no
checking gss.h presence... no
checking for gss.h... no
checking gssapi/gssapi.h usability... yes
checking gssapi/gssapi.h presence... yes
checking for gssapi/gssapi.h... yes
checking for gssapi/gssapi_generic.h... no
checking for gssapi/gssapi_krb5.h... yes
checking gssapi.h usability... yes
checking gssapi.h presence... yes
checking for gssapi.h... yes
checking whether to enable Windows native SSL/TLS (Windows native builds 
only)... no
checking whether to enable iOS/Mac OS X native SSL/TLS... no
checking for pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: " -lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: "-L/usr/lib"
configure: pkg-config: SSL_CPPFLAGS: "-I/usr/include"
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking for ssl_version in -laxtls... no
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM 
and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, 
--with-cyassl, --with-nss, --with-axtls, --with-winssl, or --with-darwinssl to 
address this.
checking default CA cert bundle/path... /etc/ssl/cert.pem
checking for library containing psl_builtin... no
configure: WARNING: libpsl was not found
checking for RTMP_Init in -lrtmp... no
checking whether versioned symbols are wanted... no
checking whether to enable Windows native IDN (Windows native builds only)... no
checking whether to build with libidn... yes (/usr/local)
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libidn options with pkg-config... found
configure: pkg-config: IDN_LIBS: " -lidn"
configure: pkg-config: IDN_LDFLAGS: "-L/usr/local/lib"
configure: pkg-config: IDN_CPPFLAGS: "-I/usr/local/include"
configure: pkg-config: IDN_DIR: "/usr/local/lib"
checking if idna_to_ascii_4i can be linked... yes
checking for idn_free... yes
checking for idna_strerror... yes
checking for tld_strerror... yes
checking idn-free.h usability... yes
checking idn-free.h presence... yes
checking for idn-free.h... yes
checking tld.h usability... yes
checking tld.h presence... yes
checking for tld.h... yes
configure: Added /usr/local/lib to LD_LIBRARY_PATH
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for libnghttp2 options with pkg-config... found
configure: -l is  -lnghttp2
configure: -I is -I/usr/local/include
configure: -L is -L/usr/local/lib
checking for nghttp2_option_set_no_recv_client_magic in -lnghttp2... yes
checking nghttp2/nghttp2.h usability... yes
checking nghttp2/nghttp2.h presence... yes
checking for nghttp2/nghttp2.h... yes
checking for ANSI C header files... (cached) yes
checking for malloc.h... (cached) no
checking for memory.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/ioctl.h... (cached) yes
checking for sys/uio.h... (cached) yes
checking for assert.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for limits.h... (cached) yes
checking for arpa/inet.h... (cached) yes
checking for net/if.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for sys/un.h... (cached) yes
checking for netinet/tcp.h... (cached) yes
checking for netdb.h... (cached) yes
checking for sys/sockio.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for termios.h... (cached) yes
checking for termio.h... (cached) no
checking for sgtty.h... (cached) no
checking for fcntl.h... (cached) yes
checking for alloca.h... no
checking for time.h... (cached) yes
checking for io.h... no
checking for pwd.h... (cached) yes
checking for utime.h... (cached) yes
checking for sys/utime.h... no
checking for sys/poll.h... (cached) yes
checking for poll.h... (cached) yes
checking for socket.h... no
checking for sys/resource.h... (cached) yes
checking for libgen.h... (cached) yes
checking for locale.h... (cached) yes
checking for errno.h... (cached) yes
checking for stdbool.h... yes
checking for arpa/tftp.h... yes
checking for sys/filio.h... (cached) yes
checking for sys/wait.h... (cached) yes
checking for setjmp.h... (cached) yes
checking for an ANSI C-conforming const... (cached) yes
checking for compiler support of C99 variadic macro style... yes
checking for compiler support of old gcc variadic macro style... yes
checking for size_t... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for time.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for struct timeval... yes
checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available 
run-time. Libs used at link-time:  -lnghttp2  -lidn -L/usr/local/heimdal/lib 
-lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -lcrypto -lasn1 -lwind -lheimbase 
-lroken -pthread -pthread -lz 
*** Error 1 in . 
(/home/jirib/cvs/openbsd-ports/infrastructure/mk/bsd.port.mk:2750 
'/home/jirib/openbsd/pobj/curl-7.46.0-kerberos/build-amd64-kerberos/.configure_done')
*** Error 1 in /home/jirib/personal/git/openbsd-mystuff/net/curl 
(/home/jirib/cvs/openbsd-ports/infrastructure/mk/bsd.port.mk:2495 'all')
~~~

Reply via email to