• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • OSP Toolkit
  • Bugs

FTBFS with ld --no-add-needed

Brought to you by: osp-project
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Bugs
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#8 FTBFS with ld --no-add-needed

open
nobody
None
5
2011-07-12
2011-07-12
Sebastian Carneiro
No

In recent versions or binutils, or in binutils-gold, the default for ld is linking with --no-add-needed. With this flag activated, ld does not perform indirect linking, and therefore, osptoolkit fails to build from source.

The following is an extract of the build errors in Debian and Ubuntu:

libtool --mode=link gcc -o bin/enroll enroll/osptnepinit.o enroll/osptnepenroll.o enroll/osptnep.o enroll/osptneputil.o lib/libosptk.la
libtool: link: gcc -o bin/.libs/enroll enroll/osptnepinit.o enroll/osptnepenroll.o enroll/osptnep.o enroll/osptneputil.o lib/.libs/libosptk.so
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:509: error: undefined reference to 'BIO_new_file'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:518: error: undefined reference to 'PEM_read_bio_X509'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:519: error: undefined reference to 'i2d_X509'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:520: error: undefined reference to 'EVP_EncodeBlock'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:544: error: undefined reference to 'X509_free'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:546: error: undefined reference to 'BIO_free'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:554: error: undefined reference to 'BIO_new_file'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:563: error: undefined reference to 'PEM_read_bio_X509_REQ'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:564: error: undefined reference to 'i2d_X509_REQ'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:565: error: undefined reference to 'EVP_EncodeBlock'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:587: error: undefined reference to 'X509_REQ_free'
/usr/bin/ld: enroll/osptnep.o: in function OSPPEnrollParseParameters:enroll/osptnep.c:588: error: undefined reference to 'BIO_free'
collect2: ld returned 1 exit status
make[1]: *** [bin/enroll] Error 1

More information related to this issue can be found here: http://wiki.debian.org/qa.debian.org/FTBFS#A2009-11-02Packagesfailingbecausebinutils-gold.2BAC8-indirectlinking

The attached patch add the missing libraries to the linker in the Makefile, fixing the resulting build failure. This patch has already been applied in Debian and Ubuntu:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555877
https://bugs.launchpad.net/ubuntu/oneiric/+source/osptoolkit/+bug/756018

To reproduce this bug, prepend the flag --no-add-needed to ld, or build the package with the current development version of Ubuntu, that can be downloaded from here:

http://cdimage.ubuntu.com/daily-live/20110705.1/oneiric-desktop-i386.iso

Thanks for considering this patch

Sebastian Carneiro
scarneiro@fibertel.com.ar

Discussion

  • Sebastian Carneiro

    Sebastian Carneiro - 2011-07-12
     
    makefile-ld-missing-libs.patch
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.