Bug 904348 - ntl should explicitly link to libstdc++
Summary: ntl should explicitly link to libstdc++
Alias: None
Product: Fedora
Classification: Fedora
Component: ntl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-01-26 13:14 UTC by Paulo Andrade
Modified: 2013-02-05 03:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-05 03:01:21 UTC

Attachments (Terms of Use)

Description Paulo Andrade 2013-01-26 13:14:32 UTC
Otherwise, using autoconf will fail if one does
not explicitly add -lstdc++ to LIBS. One example

                  [prefix of NTL installation. e.g. /usr/local or /usr])],
  [AC_CHECK_LIB([ntl], [_ntl_gmul],[ ],
    AC_MSG_ERROR([NTL Library not found.
    Maybe you want to call configure with the --with-ntl=<path> option?
    This tells configure where to find the NTL library and headers.
    e.g. --with-ntl=/usr/local or --with-ntl=/usr]),[${GMP_LIBS}])]

that fails with several missing libstdc++
symbols, example:

configure:16055: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -mtune=generic  -Wl,-z,relro  conftest.c -lntl  -lgmp  >&5
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/libntl.so: undefined reference to `std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/libntl.so: undefined reference to `std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)'
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/libntl.so: undefined reference to `__cxa_guard_acquire'
collect2: error: ld returned 1 exit status
configure:16055: $? = 1

This problem is not rawhide specific, but I am adding
a patch to a package to set LIBS in configure.ac; it
already does autoreconf for another reason...

Comment 1 Rex Dieter 2013-01-26 17:28:50 UTC
Confirmed, good catch, I'll get to work on fixing this.

Comment 2 Fedora Update System 2013-01-26 23:23:19 UTC
ntl-5.5.2-9.fc18 has been submitted as an update for Fedora 18.

Comment 3 Fedora Update System 2013-01-28 15:15:16 UTC
Package ntl-5.5.2-9.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ntl-5.5.2-9.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-02-05 03:01:25 UTC
ntl-5.5.2-9.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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