Bug 1928

Summary: BRITE libdl requirement a problem for FreeBSD
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: briteAssignee: Brian Swenson <bswenson3>
Status: NEW ---    
Severity: normal CC: ns-bugs
Priority: P5    
Version: pre-release   
Hardware: PC   
OS: FreeBSD   

Description Tom Henderson 2014-06-16 00:47:01 EDT
When BRITE is built for ns-3 under FreeBSD, it is successfully built, but then ns-3's './waf configure' fails:

Checking for BRITE location                                                                            : ../BRITE (guessed) 
Checking for library dl                                                                                : not found 
The configuration failed
(complete log in /usr/home/buildslave/scratch/ns-allinone-3.20.rc3/bake/source/ns-3.20/build/config.log)

This is because BRITE's wscript adds this:

    if bld.env['BRITE'] and bld.env['DL']:
        module.uselib = 'BRITE DL'

but FreeBSD doesn't have libdl-- dynamic loading is part of its libc.

The workaround for ns-3.20 is to disable the BRITE build for FreeBSD (since this is a lesser-used library):

diff -r 8d78e295f29f bakeconf.xml
--- a/bakeconf.xml	Fri Jun 13 16:13:16 2014 -0700
+++ b/bakeconf.xml	Sun Jun 15 20:54:59 2014 -0700
@@ -899,6 +899,7 @@
       </source>
       <build type="make" objdir="no">
         <attribute name="no_installation" value="True"/>
+        <attribute name="supported_os" value="linux;linux2;darwin"/>
       </build>
     </module>

but a better solution will be to remove the above change to bakeconf.xml and make waf suppress checking for DL when it is on a FreeBSD system.