On 04/04 11:23, Jeremy Evans wrote: > Apparently, linking against both ldap and ldap_r causes problems: > > /usr/local/bin/ruby19:/usr/local/lib/libldap_r.so.11.0: > /usr/local/lib/libldap.so.11.0 : WARNING: symbol(ldap_int_global_options) > size mismatch, relink your program > > This warning occurs when requiring ldap using ruby 1.8 or 1.9. Also, it > causes the ruby process to dump core when it exits. This patch makes > ruby-ldap only link against ldap, not ldap_r, which appears to fix this > issue.
There's a new upstream for ruby-ldap, but unfortunately they are unresponsive: https://github.com/alexey-chebotar/ruby-ldap/issues/13 Here's a new diff that switches to using a gem for ruby-ldap, upgrades to the latest version, and fixes the linking issue. Tested on i386, also builds fine on amd64. Will be committing next week unless I hear objections. Thanks, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/databases/ruby-ldap/Makefile,v retrieving revision 1.25 diff -u -p -r1.25 Makefile --- Makefile 16 Sep 2011 08:48:05 -0000 1.25 +++ Makefile 4 Apr 2012 19:52:36 -0000 @@ -2,12 +2,11 @@ COMMENT= Ruby interface to some common LDAP libraries -PKGNAME= ldap-0.9.8 -REVISION= 2 +PKGNAME= ldap-0.9.12 DISTNAME= ruby-${PKGNAME} CATEGORIES= databases -HOMEPAGE= http://ruby-ldap.sourceforge.net/ +HOMEPAGE= https://github.com/alexey-chebotar/ruby-ldap MAINTAINER= Jeremy Evans <jer...@openbsd.org> @@ -17,16 +16,14 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ruby-ldap/} -EXTRACT_SUFX = .tar.bz2 - MODULES= lang/ruby -WANTLIB= crypto pthread ssl ldap ldap_r lber +WANTLIB= crypto pthread ssl ldap lber LIB_DEPENDS= databases/openldap -CONFIGURE_STYLE= ruby extconf +CONFIGURE_STYLE= ruby gem ext +CONFIGURE_ARGS= --without-libldap REGRESS_TARGET= test REGRESS_DEPENDS= databases/openldap,-server Index: distinfo =================================================================== RCS file: /cvs/ports/databases/ruby-ldap/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- distinfo 25 Mar 2011 16:41:42 -0000 1.3 +++ distinfo 4 Apr 2012 19:17:00 -0000 @@ -1,5 +1,5 @@ -MD5 (ruby-ldap-0.9.8.tar.bz2) = gyQEUapD3kR9SANdwtEN7g== -RMD160 (ruby-ldap-0.9.8.tar.bz2) = irUrdvqBpIkTO9sy1+b13HZqa4A= -SHA1 (ruby-ldap-0.9.8.tar.bz2) = LgCGbfQ7Le+KCtQN/SffFPz1G3I= -SHA256 (ruby-ldap-0.9.8.tar.bz2) = mKd1edihHV+1WfH1icJ69tyElWV6ip7MW9FrccSn6IQ= -SIZE (ruby-ldap-0.9.8.tar.bz2) = 54556 +MD5 (ruby-ldap-0.9.12.gem) = np8hgDbQSoQXAynt8qOhig== +RMD160 (ruby-ldap-0.9.12.gem) = tN3354pb52FLrHqy0/fAnI08KdA= +SHA1 (ruby-ldap-0.9.12.gem) = 4TmMBTZUzrpDWy0+8oU3SLu+5EY= +SHA256 (ruby-ldap-0.9.12.gem) = 4VMFhvm1KNbdF6jOpJCZwbIdVh+WSQlBy20Mn0LLl5g= +SIZE (ruby-ldap-0.9.12.gem) = 71680 Index: patches/patch-conn_c =================================================================== RCS file: patches/patch-conn_c diff -N patches/patch-conn_c --- patches/patch-conn_c 7 Jan 2011 10:32:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,25 +0,0 @@ -$OpenBSD: patch-conn_c,v 1.1 2011/01/07 10:32:43 pea Exp $ ---- conn.c.orig Mon Nov 8 16:36:03 2010 -+++ conn.c Mon Nov 8 16:37:30 2010 -@@ -497,8 +497,8 @@ rb_ldap_conn_set_option (VALUE self, VALUE opt, VALUE - #ifdef LDAP_OPT_X_TLS_KEYFILE - case LDAP_OPT_X_TLS_KEYFILE: - #endif --#ifdef LDAP_OPT_X_TLS_PROTOCOL -- case LDAP_OPT_X_TLS_PROTOCOL: -+#ifdef LDAP_OPT_X_TLS_PROTOCOL_MIN -+ case LDAP_OPT_X_TLS_PROTOCOL_MIN: - #endif - #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE - case LDAP_OPT_X_TLS_CIPHER_SUITE: -@@ -627,8 +627,8 @@ rb_ldap_conn_get_option (VALUE self, VALUE opt) - #ifdef LDAP_OPT_X_TLS_KEYFILE - case LDAP_OPT_X_TLS_KEYFILE: - #endif --#ifdef LDAP_OPT_X_TLS_PROTOCOL -- case LDAP_OPT_X_TLS_PROTOCOL: -+#ifdef LDAP_OPT_X_TLS_PROTOCOL_MIN -+ case LDAP_OPT_X_TLS_PROTOCOL_MIN: - #endif - #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE - case LDAP_OPT_X_TLS_CIPHER_SUITE: Index: patches/patch-ldap_c =================================================================== RCS file: patches/patch-ldap_c diff -N patches/patch-ldap_c --- patches/patch-ldap_c 7 Jan 2011 10:32:43 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-ldap_c,v 1.1 2011/01/07 10:32:43 pea Exp $ ---- ldap.c.orig Mon Nov 8 16:34:48 2010 -+++ ldap.c Mon Nov 8 16:35:55 2010 -@@ -420,8 +420,8 @@ Init_ldap () - #ifdef LDAP_OPT_X_TLS - rb_ldap_define_opt (LDAP_OPT_X_TLS); - #endif --#ifdef LDAP_OPT_X_TLS_PROTOCOL -- rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL); -+#ifdef LDAP_OPT_X_TLS_PROTOCOL_MIX -+ rb_ldap_define_opt (LDAP_OPT_X_TLS_PROTOCOL_MIN); - #endif - #ifdef LDAP_OPT_X_TLS_CIPHER_SUITE - rb_ldap_define_opt (LDAP_OPT_X_TLS_CIPHER_SUITE); Index: patches/patch-test_test_sh =================================================================== RCS file: patches/patch-test_test_sh diff -N patches/patch-test_test_sh --- patches/patch-test_test_sh 18 Jan 2007 12:30:37 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,40 +0,0 @@ -$OpenBSD: patch-test_test_sh,v 1.1.1.1 2007/01/18 12:30:37 bernd Exp $ ---- test/test.sh.orig Sat Nov 29 13:13:21 2003 -+++ test/test.sh Wed Dec 20 14:46:44 2006 -@@ -139,13 +139,16 @@ if [ -f "$LOGFILE" ]; then - rm $LOGFILE - fi - --echo -n "Do you want to run scripts?[y/n]" --read ans -+ans=y - case "$ans" in - y*|Y*) - RESULT=ok - for f in $SCRIPTS - do -+ if ! $(pgrep -x slapd >/dev/null 2>&1); then -+ echo "ERROR: slapd is gone, abort" -+ exit 1 -+ fi - printf "running $f .... " - if runruby $f; then - echo "succeed" -@@ -153,7 +156,7 @@ y*|Y*) - echo "fail" - RESULT=error - runruby $f -- rundebug $f -+# rundebug $f - fi - done - ;; -@@ -166,5 +169,7 @@ esac - # $LDAPSEARCH -b "o=JAIST, c=JP" -h localhost -p $SSLPORT -Z "(objectclass=*)" - - # stop slapd --kill -TERM `cat $PIDFILE` -+if $(pgrep -x slapd >/dev/null 2>&1); then -+ kill -TERM `cat $PIDFILE` -+fi - rm -rf $DBDIR Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/databases/ruby-ldap/pkg/PLIST,v retrieving revision 1.3 diff -u -p -r1.3 PLIST --- pkg/PLIST 19 Jul 2011 18:00:16 -0000 1.3 +++ pkg/PLIST 4 Apr 2012 19:37:55 -0000 @@ -1,6 +1,113 @@ @comment $OpenBSD: PLIST,v 1.3 2011/07/19 18:00:16 jeremy Exp $ -${MODRUBY_SITEDIR}/ldap/ -${MODRUBY_SITEDIR}/ldap/control.rb -${MODRUBY_SITEDIR}/ldap/ldif.rb -${MODRUBY_SITEDIR}/ldap/schema.rb -${MODRUBY_SITEARCHDIR}/ldap.so +${GEM_LIB}/cache/${DISTNAME}.gem +${GEM_LIB}/gems/${DISTNAME}/ +${GEM_LIB}/gems/${DISTNAME}/COPYING +${GEM_LIB}/gems/${DISTNAME}/ChangeLog +${GEM_LIB}/gems/${DISTNAME}/FAQ +${GEM_LIB}/gems/${DISTNAME}/Makefile +${GEM_LIB}/gems/${DISTNAME}/NOTES +${GEM_LIB}/gems/${DISTNAME}/README +${GEM_LIB}/gems/${DISTNAME}/TODO +${GEM_LIB}/gems/${DISTNAME}/clientauth.c +${GEM_LIB}/gems/${DISTNAME}/clientauth.o +${GEM_LIB}/gems/${DISTNAME}/conn.c +${GEM_LIB}/gems/${DISTNAME}/conn.o +${GEM_LIB}/gems/${DISTNAME}/entry.c +${GEM_LIB}/gems/${DISTNAME}/entry.o +${GEM_LIB}/gems/${DISTNAME}/extconf.rb +${GEM_LIB}/gems/${DISTNAME}/ldap.c +${GEM_LIB}/gems/${DISTNAME}/ldap.o +${GEM_LIB}/gems/${DISTNAME}/ldap.so +${GEM_LIB}/gems/${DISTNAME}/lib/ +${GEM_LIB}/gems/${DISTNAME}/lib/ldap/ +${GEM_LIB}/gems/${DISTNAME}/lib/ldap.so +${GEM_LIB}/gems/${DISTNAME}/lib/ldap/control.rb +${GEM_LIB}/gems/${DISTNAME}/lib/ldap/ldif.rb +${GEM_LIB}/gems/${DISTNAME}/lib/ldap/schema.rb +${GEM_LIB}/gems/${DISTNAME}/misc.c +${GEM_LIB}/gems/${DISTNAME}/misc.o +${GEM_LIB}/gems/${DISTNAME}/mkmf.log +${GEM_LIB}/gems/${DISTNAME}/mod.c +${GEM_LIB}/gems/${DISTNAME}/mod.o +${GEM_LIB}/gems/${DISTNAME}/rbldap.h +${GEM_LIB}/gems/${DISTNAME}/saslconn.c +${GEM_LIB}/gems/${DISTNAME}/saslconn.o +${GEM_LIB}/gems/${DISTNAME}/sslconn.c +${GEM_LIB}/gems/${DISTNAME}/sslconn.o +${GEM_LIB}/gems/${DISTNAME}/test/ +${GEM_LIB}/gems/${DISTNAME}/test/add.rb +${GEM_LIB}/gems/${DISTNAME}/test/add2.rb +${GEM_LIB}/gems/${DISTNAME}/test/add3.rb +${GEM_LIB}/gems/${DISTNAME}/test/bind-ldaps.rb +${GEM_LIB}/gems/${DISTNAME}/test/bind-sasl.rb +${GEM_LIB}/gems/${DISTNAME}/test/bind-ssl.rb +${GEM_LIB}/gems/${DISTNAME}/test/bind.rb +${GEM_LIB}/gems/${DISTNAME}/test/compare.rb +${GEM_LIB}/gems/${DISTNAME}/test/conf.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/metadata.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/providers/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/providers/repository.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/recipes/cacher-client.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/recipes/cacher.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/resources/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/apt/resources/repository.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/attributes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/attributes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/definitions/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/definitions/nginx_site.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/metadata.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/nginx/recipes/source.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/attributes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/attributes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/metadata.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/recipes/auth.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/recipes/client.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/openldap/recipes/server.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/attributes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/attributes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/metadata.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/client.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/server.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/server_debian.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/postgresql/recipes/server_redhat.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/sqlite/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/sqlite/metadata.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/sqlite/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/sqlite/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/vagrant_main/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/vagrant_main/recipes/ +${GEM_LIB}/gems/${DISTNAME}/test/cookbooks/vagrant_main/recipes/default.rb +${GEM_LIB}/gems/${DISTNAME}/test/delete.rb +${GEM_LIB}/gems/${DISTNAME}/test/ext.rb +${GEM_LIB}/gems/${DISTNAME}/test/misc1.rb +${GEM_LIB}/gems/${DISTNAME}/test/misc2.rb +${GEM_LIB}/gems/${DISTNAME}/test/modrdn.rb +${GEM_LIB}/gems/${DISTNAME}/test/moz_cert.rb +${GEM_LIB}/gems/${DISTNAME}/test/search.rb +${GEM_LIB}/gems/${DISTNAME}/test/search2.rb +${GEM_LIB}/gems/${DISTNAME}/test/search3.rb +${GEM_LIB}/gems/${DISTNAME}/test/setup.rb +${GEM_LIB}/gems/${DISTNAME}/test/subschema.rb +${GEM_LIB}/gems/${DISTNAME}/test/tc_conn.rb +${GEM_LIB}/gems/${DISTNAME}/test/tc_ldif.rb +${GEM_LIB}/gems/${DISTNAME}/test/tc_schema.rb +${GEM_LIB}/gems/${DISTNAME}/test/tc_search.rb +${GEM_LIB}/gems/${DISTNAME}/test/ts_ldap.rb +${GEM_LIB}/gems/${DISTNAME}/win/ +${GEM_LIB}/gems/${DISTNAME}/win/winlber.h +${GEM_LIB}/gems/${DISTNAME}/win/winldap.h +${GEM_LIB}/gems/${DISTNAME}/win/wldap32.def +${GEM_LIB}/specifications/${DISTNAME}.gemspec