Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307183 - openldap-2.4.19-r1 fails to build
Summary: openldap-2.4.19-r1 fails to build
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 306705
  Show dependency tree
 
Reported: 2010-02-28 14:25 UTC by Ramon
Modified: 2014-10-12 06:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix linking to define the missing symbols. (libaddrdnvalues-linking.patch,665 bytes, patch)
2011-06-21 14:29 UTC, W. Trevor King
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ramon 2010-02-28 14:25:08 UTC
Openldap fails to build:

 * Building contrib-module: addrdnvalues plugin
collect2: ld terminated with signal 11 [Segmentation fault]
Undefined symbols:
  "_slapi_pblock_set", referenced from:
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_init in ccw7aSAK.o
  "_slapi_log_error", referenced from:
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_add in ccw7aSAK.o
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_send_ldap_result", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_ldap_err2string", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_pblock_get", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_entry_add_rdn_values", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_log_error
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_pblock_get
Undefined symbol: _slapi_entry_add_rdn_values
Undefined symbol: _slapi_log_error
Undefined symbol: _slapi_send_ldap_result
Undefined symbol: _ldap_err2string
Undefined symbol: _slapi_log_error
Undefined symbols:
  "_slapi_pblock_set", referenced from:
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_init in ccw7aSAK.o
  "_slapi_log_error", referenced from:
      _addrdnvalues_preop_init in ccw7aSAK.o
      _addrdnvalues_preop_add in ccw7aSAK.o
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_send_ldap_result", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_ldap_err2string", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_pblock_get", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
  "_slapi_entry_add_rdn_values", referenced from:
      _addrdnvalues_preop_add in ccw7aSAK.o
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_log_error
Undefined symbol: _slapi_pblock_set
Undefined symbol: _slapi_pblock_get
Undefined symbol: _slapi_entry_add_rdn_values
Undefined symbol: _slapi_log_error
Undefined symbol: _slapi_send_ldap_result
Undefined symbol: _ldap_err2string
Undefined symbol: _slapi_log_error
 * ERROR: net-nds/openldap-2.4.19-r1 failed:
 *   Building libaddrdnvalues-plugin.so failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called call-ebuildshell 'src_compile'
 *   environment, line 591:  Called src_compile
 *   environment, line 3475:  Called die
 * The specific snippet of code:
 *           "${CC}" -shared -I../../../include ${CFLAGS} -fPIC ${LDFLAGS} -o libaddrdnvalues-plugin.so addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed";
 * 
 * If you need support, post the output of 'emerge --info =net-nds/openldap-2.4.19-r1',
 * the complete build log and the output of 'emerge -pqv =net-nds/openldap-2.4.19-r1'.
 * The complete build log is located at '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/temp/build.log'.
 * The ebuild environment file is located at '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/temp/environment'.
 * S: '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/work/openldap-2.4.19'

>>> Failed to emerge net-nds/openldap-2.4.19-r1, Log file:

>>>  '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/temp/build.log'

 * Messages for package net-nds/openldap-2.4.19-r1:

 * 'enewgroup()' disabled in Prefixed Portage with non root user
 * 'enewuser()' disabled in Prefixed Portage with non root user
 * ERROR: net-nds/openldap-2.4.19-r1 failed:
 *   Building libaddrdnvalues-plugin.so failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called call-ebuildshell 'src_compile'
 *   environment, line 591:  Called src_compile
 *   environment, line 3475:  Called die
 * The specific snippet of code:
 *           "${CC}" -shared -I../../../include ${CFLAGS} -fPIC ${LDFLAGS} -o libaddrdnvalues-plugin.so addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed";
 * 
 * If you need support, post the output of 'emerge --info =net-nds/openldap-2.4.19-r1',
 * the complete build log and the output of 'emerge -pqv =net-nds/openldap-2.4.19-r1'.
 * The complete build log is located at '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/temp/build.log'.
 * The ebuild environment file is located at '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/temp/environment'.
 * S: '/Volumes/Shared/prefix-64/var/tmp/portage/net-nds/openldap-2.4.19-r1/work/openldap-2.4.19'



Reproducible: Always
Comment 1 Ramon 2010-02-28 14:25:42 UTC
Portage 2.2.00.15444-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.2.0 i386)
=================================================================
System uname: Darwin-10.2.0-i386-64bit
Timestamp of tree: Wed, 24 Feb 2010 09:36:12 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin10.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.4
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r2
sys-devel/autoconf:  2.63-r01.1
sys-devel/automake:  1.10.2-r00.1, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6b
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin10"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-apple-darwin10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/Volumes/Shared/prefix-64/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
PKGDIR="/Volumes/Shared/prefix-64/usr/portage/packages"
PORTAGE_CONFIGROOT="/Volumes/Shared/prefix-64/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Volumes/Shared/prefix-64/var/tmp"
PORTDIR="/Volumes/Shared/prefix-64/usr/portage"
PORTDIR_OVERLAY="/Users/ramonvanalteren/sourcecode/gentoo/personal"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua bash-completion bzip2 coreaudio cracklib cxx iconv ipv6 mmx mmxext modules ncurses nls objc objc++ pcre prefix python readline sse sse2 ssl unicode vim-syntax x64-macos zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Ramon 2010-02-28 14:27:27 UTC
With useflag minimal it works, without it fails:

[ebuild   R   ] net-nds/openldap-2.4.19-r1  USE="berkdb ipv6 ssl -crypt -cxx -debug -experimental -gnutls -icu -iodbc -kerberos -minimal* -odbc -overlays -perl -samba -sasl (-selinux) -slp -smbkrb5passwd -syslog -tcpd" 0 kB
Comment 3 W. Trevor King 2011-06-21 14:29:54 UTC
Created attachment 277681 [details, diff]
Fix linking to define the missing symbols.

I'm not sure if this patch is OS-dependent.  Can someone with a non OS-X prefix installation check that the patch doesn't break your build.  Actually, without the patch I do not understand how the current ebuild could compile on any OS...

With this patch, you will still get an "invalid install_name found":

     * QA Notice: invalid self-reference install_name libaddrdnvalues-plugin.so in /Users/wking/Gentoo/usr/lib/openldap/openldap/libaddrdnvalues-plugin.so
     * ERROR: net-nds/openldap-2.4.21 failed:
     *   invalid install_name found, your application or library will crash at runtime
     * 
     * Call stack:
     *   misc-functions.sh, line 1707:  Called install_qa_check
     *   misc-functions.sh, line  187:  Called install_qa_check_macho
     *   misc-functions.sh, line  986:  Called die
     * The specific snippet of code:
     *                  hasq allow_broken_install_names ${FEATURES} || \
     *                                                  die "invalid install_name found, your application or library will crash at runtime"

but everything looks right to me:

    $ otool -L /Users/wking/Gentoo/var/tmp/portage/net-nds/openldap-2.4.21/image/Users/wking/Gentoo/usr/lib/openldap/openldap/libaddrdnvalues-plugin.so
    /Users/wking/Gentoo/var/tmp/portage/net-nds/openldap-2.4.21/image/Users/wking/Gentoo/usr/lib/openldap/openldap/libaddrdnvalues-plugin.so:
            libaddrdnvalues-plugin.so (compatibility version 0.0.0, current version 0.0.0)
            /Users/wking/Gentoo/usr/lib/libslapi-2.4.2.dylib (compatibility version 8.0.0, current version 8.4.0)
            /Users/wking/Gentoo/usr/lib/libldap-2.4.2.dylib (compatibility version 8.0.0, current version 8.4.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)

so installing with `FEATURES="allow_broken_install_names"` should work fine.  If someone with a better understanding of OS X linking than I could chip in with a recipe for fixing the install_name issue, that would be great!
Comment 4 Fabian Groffen gentoo-dev 2011-06-21 15:04:58 UTC
you basically need
  -install_name ${EPREFIX}/usr/$(get_libdir)/openldap/openldap/libaddrdnvalues-plugin.so
to be added to the ${CC} command to get the "soname" right
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-10-12 06:31:51 UTC
Fixed upstream since