[Xorp-hackers] problem compiling xorp - ubuntu

Ben Greear greearb at candelatech.com
Wed Jan 6 11:51:50 PST 2010


On 01/06/2010 12:14 AM, Aleksandar Cvjetic wrote:
> Sorry for bothering, now I have this problem after running scons:

Well, this seems to be caused by lack of boost-regex:

scons: Configure: Checking for C type struct ether_addr...
obj/i686-pc-linux-gnu/.sconf_temp/conftest_122.c <-
   |
   |
   |#include <sys/types.h>
   |#include <sys/socket.h>
   |#include <net/ethernet.h>
   |#include <net/if.h>
   |
   |
   |int main() {
   |  if ((struct ether_addr *) 0)
   |    return 0;
   |  if (sizeof (struct ether_addr))
   |    return 0;
   |}
   |
@
gcc -o obj/i686-pc-linux-gnu/.sconf_temp/conftest_122.o -c -I/usr/local/include -Iobj/i686-pc-linux-gnu obj/i686-pc-linux-gnu/.sconf_temp/conftest_122.c
gcc -o obj/i686-pc-linux-gnu/.sconf_temp/conftest_122 obj/i686-pc-linux-gnu/.sconf_temp/conftest_122.o -L/usr/local/lib -lboost_regex-mt -lboost_regex
/usr/bin/ld: cannot find -lboost_regex-mt
collect2: ld returned 1 exit status
scons: Configure: no


Bruce:  Can you add a check for boost-regexp and just fail to even attempt to compile if
it doesn't exist?  Having it break tests such as the one above makes it difficult for the
user to figure out what the real problem is.


Aleksandar:
Try this:
rm -fr obj
apt-get install libboost-regex-dev
(or, if you're using boost 1.4:  apt-get install libboost-regex1.4-dev)

I also had to install:
apt-get install libssl-dev
apt-get install libpcap-dev


I also had to apply this patch, but maybe this was only bugs in my repository:
http://www.candelatech.com/oss/xorp-ct.html

diff --git a/fea/xrl_fea_target.cc b/fea/xrl_fea_target.cc
index 02d9f5b..d9fe8cb 100644
--- a/fea/xrl_fea_target.cc
+++ b/fea/xrl_fea_target.cc
@@ -1888,7 +1888,7 @@ XrlFeaTarget::ifmgr_0_1_delete_interface(
      string empty;
      _io_ip_manager.leave_all_multicast_groups(ifname, empty, error_msg);
      if (error_msg.size()) {
-       XLOG_ERROR(error_msg.c_str());
+       XLOG_ERROR("%s", error_msg.c_str());
      }

      if (_ifconfig.add_transaction_operation(
@@ -2396,7 +2396,7 @@ XrlFeaTarget::ifmgr_0_1_delete_vif(
      // Hack:  Remove multicast addrs first. --Ben
      _io_ip_manager.leave_all_multicast_groups(ifname, vifname, error_msg);
      if (error_msg.size()) {
-       XLOG_ERROR(error_msg.c_str());
+       XLOG_ERROR("%s", error_msg.c_str());
      }

      if (_ifconfig.add_transaction_operation(
diff --git a/mld6igmp/mld6igmp_node.cc b/mld6igmp/mld6igmp_node.cc
index d1cccc3..c9c8923 100644
--- a/mld6igmp/mld6igmp_node.cc
+++ b/mld6igmp/mld6igmp_node.cc
@@ -1464,7 +1464,7 @@ Mld6igmpNode::delete_protocol(const string& module_instance_name,
         ostringstream oss;
         oss << "Cannot delete protocol instance: " << module_instance_name
             << " on vif_index: " << vif_index << ".  No such vif.";
-       XLOG_ERROR(oss.str().c_str());
+       XLOG_ERROR("%s", oss.str().c_str());
         error_msg.append(oss.str());
         return (XORP_ERROR);
      }


After this, it compiles fine.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list