Bug 850535 - openldap-2.4.31-7.fc17.src.rpm fails to compile
openldap-2.4.31-7.fc17.src.rpm fails to compile
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
17
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Jan Vcelak
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-21 15:03 EDT by Gregory Lee Bartholomew
Modified: 2013-03-03 20:30 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-22 11:55:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gregory Lee Bartholomew 2012-08-21 15:03:20 EDT
Description of problem:

I'm using the following sequence of commands after a minimal install of Fedora 17 x86_64.

----- BEGIN SCREEN COPY

sudo yum -y install rpmdevtools rpmlint perl-devel perl-ExtUtils-Embed perl-BerkeleyDB autoconf cyrus-sasl-devel nss-devel krb5-devel tcp_wrappers-devel unixODBC-devel glibc-devel libtool libtool-ltdl-devel openssl-devel libdb-devel tar make
rpmdev-setuptree
rpm -i openldap-2.4.31-7.fc17.src.rpm
cd ~/rpmbuild/SPECS/
sed -i 's/--disable-perl/--enable-perl/' openldap.spec
rpmbuild -ba openldap.spec

...

/bin/ld: main.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
main.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [slapd] Error 1
make[2]: Leaving directory `/home/user/rpmbuild/BUILD/openldap-2.4.31/openldap-2.4.31/servers/slapd'
make[1]: *** [all-common] Error 1
make[1]: Leaving directory `/home/user/rpmbuild/BUILD/openldap-2.4.31/openldap-2.4.31/servers'
make: *** [all-common] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.bPeRHl (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.bPeRHl (%build)

----- END SCREEN COPY

The older version -- openldap-2.4.31-2.fc17.src.rpm -- sucessfully compiles in the same environment.

Version-Release number of selected component (if applicable):

2.4.31-7

How reproducible:


Steps to Reproduce:

See Description.
  
Actual results:

Compile fails.

Expected results:

Success.

Additional info:
Comment 1 Jan Vcelak 2012-08-21 15:50:08 EDT
You are building your own package. Do not expect that we can support the issues with compilation unless it is a toolchain problem. I do not know where is the problem. But I see your point, you need Perl backend.

slapd should be built with -fPIC. According to build.log, the flag is missing near main.o. I will recheck that.
Comment 2 Jan Vcelak 2012-08-22 11:55:36 EDT
OpenLDAP is compiled as expected. The -fPIC flags are added properly via -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1.

I have also checked on the resulting package content:

./rpm-chksec `rpm -qa "openldap*"`
FILE                                                    TYPE      RELRO    PIE                                                          
/usr/lib64/openldap/accesslog-2.4.so.2.8.4              library   partial  DSO                                                          
/usr/lib64/openldap/auditlog-2.4.so.2.8.4               library   partial  DSO                                                          
/usr/lib64/openldap/back_dnssrv-2.4.so.2.8.4            library   partial  DSO                                                          
/usr/lib64/openldap/back_ldap-2.4.so.2.8.4              library   partial  DSO                                                          
/usr/lib64/openldap/back_mdb-2.4.so.2.8.4               library   partial  DSO                                                          
/usr/lib64/openldap/back_meta-2.4.so.2.8.4              library   partial  DSO                                                          
/usr/lib64/openldap/back_null-2.4.so.2.8.4              library   partial  DSO                                                          
/usr/lib64/openldap/back_passwd-2.4.so.2.8.4            library   partial  DSO                                                          
/usr/lib64/openldap/back_relay-2.4.so.2.8.4             library   partial  DSO                                                          
/usr/lib64/openldap/back_shell-2.4.so.2.8.4             library   partial  DSO                                                          
/usr/lib64/openldap/back_sock-2.4.so.2.8.4              library   partial  DSO                                                          
/usr/lib64/openldap/collect-2.4.so.2.8.4                library   partial  DSO                                                          
/usr/lib64/openldap/constraint-2.4.so.2.8.4             library   partial  DSO                                                          
/usr/lib64/openldap/dds-2.4.so.2.8.4                    library   partial  DSO                                                          
/usr/lib64/openldap/deref-2.4.so.2.8.4                  library   partial  DSO                                                          
/usr/lib64/openldap/dyngroup-2.4.so.2.8.4               library   partial  DSO                                                          
/usr/lib64/openldap/dynlist-2.4.so.2.8.4                library   partial  DSO                                                          
/usr/lib64/openldap/memberof-2.4.so.2.8.4               library   partial  DSO                                                          
/usr/lib64/openldap/pcache-2.4.so.2.8.4                 library   partial  DSO                                                          
/usr/lib64/openldap/ppolicy-2.4.so.2.8.4                library   partial  DSO                                                          
/usr/lib64/openldap/refint-2.4.so.2.8.4                 library   partial  DSO                                                          
/usr/lib64/openldap/retcode-2.4.so.2.8.4                library   partial  DSO                                                          
/usr/lib64/openldap/rwm-2.4.so.2.8.4                    library   partial  DSO                                                          
/usr/lib64/openldap/seqmod-2.4.so.2.8.4                 library   partial  DSO                                                          
/usr/lib64/openldap/smbk5pwd-2.4.so.2.8.4               library   partial  DSO                                                                                                                                                                                                    
/usr/lib64/openldap/sssvlv-2.4.so.2.8.4                 library   partial  DSO 
/usr/lib64/openldap/syncprov-2.4.so.2.8.4               library   partial  DSO 
/usr/lib64/openldap/translucent-2.4.so.2.8.4            library   partial  DSO 
/usr/lib64/openldap/unique-2.4.so.2.8.4                 library   partial  DSO 
/usr/lib64/openldap/valsort-2.4.so.2.8.4                library   partial  DSO 
/usr/sbin/slapd                                         daemon    full     yes 
/usr/lib/debug/usr/bin/ldapcompare.debug                exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapdelete.debug                 exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapexop.debug                   exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapmodify.debug                 exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapmodrdn.debug                 exec      partial  DSO 
/usr/lib/debug/usr/bin/ldappasswd.debug                 exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapsearch.debug                 exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapurl.debug                    exec      partial  DSO 
/usr/lib/debug/usr/bin/ldapwhoami.debug                 exec      partial  DSO 
/usr/lib/debug/usr/lib64/liblber-2.4.so.2.8.4.debug     library   partial  DSO 
/usr/lib/debug/usr/lib64/libldap-2.4.so.2.8.4.debug     library   partial  DSO 
/usr/lib/debug/usr/lib64/libldap_r-2.4.so.2.8.4.debug   library   partial  DSO 
/usr/lib/debug/usr/lib64/libslapi-2.4.so.2.8.4.debug    library   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/accesslog-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/auditlog-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_dnssrv-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_ldap-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_mdb-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_meta-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_null-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_passwd-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_relay-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_shell-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_sock-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/back_sql-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/collect-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/constraint-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/dds-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/deref-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/dyngroup-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/dynlist-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/memberof-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/pcache-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/ppolicy-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/refint-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/retcode-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/rwm-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/seqmod-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/smbk5pwd-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/sssvlv-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/syncprov-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/translucent-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/unique-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/lib64/openldap/valsort-2.4.so.2.8.4.debuglibrary   partial  DSO 
/usr/lib/debug/usr/sbin/slapd.debug                     exec      partial  DSO 
/usr/bin/ldapcompare                                    exec      full     yes 
/usr/bin/ldapdelete                                     exec      full     yes 
/usr/bin/ldapexop                                       exec      full     yes 
/usr/bin/ldapmodify                                     exec      full     yes 
/usr/bin/ldapmodrdn                                     exec      full     yes 
/usr/bin/ldappasswd                                     exec      full     yes 
/usr/bin/ldapsearch                                     exec      full     yes 
/usr/bin/ldapurl                                        exec      full     yes 
/usr/bin/ldapwhoami                                     exec      full     yes 
/usr/lib64/liblber-2.4.so.2.8.4                         library   partial  DSO 
/usr/lib64/libldap-2.4.so.2.8.4                         library   partial  DSO 
/usr/lib64/libldap_r-2.4.so.2.8.4                       library   partial  DSO 
/usr/lib64/libslapi-2.4.so.2.8.4                        library   partial  DSO 


Fedora build is just fine. But I cannot help you with building your own package. Sorry, closing this as NOTABUG.

Note You need to log in before you can comment on or make changes to this bug.