Opened 8 years ago

Closed 8 years ago

#1559 closed defect (duplicate)

build failed at gcc version 4.6.2

Reported by: haikuo Owned by: UnAssigned
Priority: medium Milestone: Sprint-20120124
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Medium
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description (last modified by haikuo)

the build of bind10 will fail if I use GCC 4.6.2 at ubuntu.
GCC 4.6.2 do not support -R option
my OS is Linux ubuntu 3.2.0-5-generic #11-Ubuntu SMP Thu Dec 15 19:06:32 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
I modified the configure.ac as followed:

--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
 # check -R rather than gcc specific -rpath to be as portable as possible.
 AC_MSG_CHECKING([whether -R flag is available in linker])
 LDFLAGS_SAVED="$LDFLAGS"
-LDFLAGS="$LDFLAGS -R/usr/lib"
+LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
 AC_TRY_LINK([],[],
        [ AC_MSG_RESULT(yes)
                rpath_available=yes 
@@ -205,7 +205,7 @@ fi
 if test $rpath_available = yes; then
        python_rpath=
        for flag in ${PYTHON_LDFLAGS}; do
-               python_rpath="${python_rpath} `echo $flag | sed -ne 's/^\(\-L\)
+               python_rpath="${python_rpath} `echo $flag | sed -ne 's/^\(\-L\)

I rebuild it , it will print out some errors when build b10-resolver,the error is followed:

libtool: link: g++ -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Werror -fPIC -g -O2 -pthread -Wl,-R/var/software/botan/lib -o .libs/b10-resolver resolver.o resolver_log.o response_scrubber.o main.o resolver_messages.o ../../../src/bin/auth/change_user.o  ../../../src/lib/dns/.libs/libdns++.so ../../../src/lib/config/.libs/libcfgclient.so ../../../src/lib/cc/.libs/libcc.so ../../../src/lib/util/.libs/libutil.so ../../../src/lib/acl/.libs/libdnsacl.so ../../../src/lib/exceptions/.libs/libexceptions.so ../../../src/lib/asiodns/.libs/libasiodns.so ../../../src/lib/asiolink/.libs/libasiolink.so ../../../src/lib/xfr/.libs/libxfr.so ../../../src/lib/log/.libs/liblog.so ../../../src/lib/server_common/.libs/libserver_common.so ../../../src/lib/cache/.libs/libcache.so ../../../src/lib/nsas/.libs/libnsas.so ../../../src/lib/resolve/.libs/libresolve.so -pthread -Wl,-rpath -Wl,/var/software/bind10/lib
../../../src/lib/server_common/.libs/libserver_common.so: undefined reference to `isc::util::io::write_data(int, void const*, unsigned long)'
../../../src/lib/server_common/.libs/libserver_common.so: undefined reference to `isc::util::io::recv_fd(int)'
../../../src/lib/server_common/.libs/libserver_common.so: undefined reference to `isc::util::io::read_data(int, void*, unsigned long)'

Subtickets

Change History (4)

comment:1 Changed 8 years ago by haikuo

  • Component changed from Unclassified to build system
  • Description modified (diff)
  • Owner set to UnAssigned

comment:2 Changed 8 years ago by jelte

  • Milestone changed from New Tasks to Sprint-20120124

comment:3 Changed 8 years ago by jreed

The -R rpath issue is in ticket #1558.

I think the second issue about undefined isc::util::io references was fixed in trac1557:

commit 349a930441b3bf216c25d308a9a31054180b67ce
Author: JINMEI Tatuya <jinmei@isc.org>
Date:   Wed Jan 11 16:21:06 2012 -0800

    [1557] server_common depends on libutil_io.  it's crucial in
    static link for some systems.

comment:4 Changed 8 years ago by jelte

  • Resolution set to duplicate
  • Status changed from new to closed

Since both reported problem are (or should be) addressed in other tickets, I'm closing this as a duplicate.

Please reopen if #1557 and #1558 did not fix the issues.

Note: See TracTickets for help on using tickets.