Bug 726

Summary: Build failed OSX, CalendarScheduler
Product: ns-3 Reporter: khk <meros.b6>
Component: coreAssignee: Faker Moatamri <faker.moatamri>
Status: RESOLVED INVALID    
Severity: normal CC: meros.b6, ns-bugs, tomh
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   

Description khk 2009-10-20 07:17:38 UTC
I tested around with the not working Build on Mac OSX (10.4).

System is: Osx 10.4, gcc 4.0.x, Python tested: 2.5.x, 2.6.x!

Ways of building: using ./build.py, and do ./waf configure; /waf


Mostly the build vas iinterupted at [409/853] RC3 release candidate, also tested ns-3.4, ns-3.5.1, ns-3.6-RC3, ns-3.6-RC4

with ./waf configuration: "CXXFLAGS="-O3" ./waf configure,"./waf configure ./waf", "./waf --with-nsc --enable-sudo build", "CXXFLAGS="" ./waf configure"

Configuration alway give this:
Macintosh-6:/ns3/ns-allinone-3.6-RC3/ns-3.6-RC3 hannes$ CXXFLAGS="-O3" ./waf configure
Checking for program g++                 : ok /usr/bin/g++ 
Checking for program cpp                 : ok /usr/bin/cpp 
Checking for program ar                  : ok /usr/bin/ar 
Checking for program ranlib              : ok /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for program pkg-config          : not found 
Checking for regression reference traces  : ok ../ns-3.6-RC3-ref-traces (guessed) 
Checking for header stdlib.h              : ok 
Checking for header signal.h              : ok 
Checking for header pthread.h             : ok 
Checking for high precision time implementation : 128-bit integer 
Checking for header stdint.h                    : ok 
Checking for header inttypes.h                  : ok 
Checking for header sys/inttypes.h              : not found 
Checking for library rt                         : not found 
Checking for header netpacket/packet.h          : not found 
Checking for header linux/if_tun.h              : not found 
Checking for library sqlite3                    : ok 
Checking for NSC location                       : not found 
Checking for program python                     : ok /Library/Frameworks/Python.framework/Versions/Current/bin/python 
Checking for Python version >= 2.3              : ok 2.5.4 
Checking for library python2.5                  : not found 
Checking for library python2.5                  : ok 
Checking for program python2.5-config           : ok /Library/Frameworks/Python.framework/Versions/Current/bin/python2.5-config 
Checking for header Python.h                    : ok 
Checking for -fvisibility=hidden support        : yes 
Checking for pybindgen location                 : not found 
Checking for Python module pybindgen            : not found 
pybindgen missing => no python bindings
Checking for program sudo                       : ok /usr/bin/sudo 
Checking for program hg                         : not found 
Checking for program valgrind                   : not found 
---- Summary of optional NS-3 features:
Threading Primitives          : enabled
Real Time Simulator           : not enabled (librt is not available)
Emulated Net Device           : not enabled (<netpacket/packet.h> include not detected)
Tap Bridge                    : not enabled (<linux/if_tun.h> include not detected)
GtkConfigStore                : not enabled (library 'gtk+-2.0 >= 2.12' not found)
XmlIo                         : not enabled (library 'libxml-2.0 >= 2.7' not found)
SQlite stats data output      : enabled
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
Python Bindings               : not enabled (PyBindGen missing)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build examples and samples    : enabled
Static build                  : not enabled (option --enable-static not selected)
GNU Scientific Library (GSL)  : not enabled (GSL not found)
'configure' finished successfully (5.887s)

--> with python Bindings at Version ns-3.4

The error That allways occure:
[291/613] cxx: src/simulator/calendar-scheduler.cc -> build/debug/src/simulator/calendar-scheduler_1.o
cc1plus: warnings being treated as errors
../src/simulator/calendar-scheduler.cc: In member function `virtual ns3::Scheduler::Event ns3::CalendarScheduler::PeekNext() const':
../src/simulator/calendar-scheduler.cc:128: warning: converting of negative value '-0x00000000000000001' to 'uint64_t'
../src/simulator/calendar-scheduler.cc:128: warning: converting of negative value '-0x00000000000000001' to 'uint32_t'
../src/simulator/calendar-scheduler.cc: In member function `ns3::Scheduler::Event ns3::CalendarScheduler::DoRemoveNext()':
../src/simulator/calendar-scheduler.cc:155: warning: converting of negative value '-0x00000000000000001' to 'uint64_t'
../src/simulator/calendar-scheduler.cc:155: warning: converting of negative value '-0x00000000000000001' to 'uint32_t'
Build failed
 -> task failed (err #1): 
        {task: cxx calendar-scheduler.cc -> calendar-scheduler_1.o}
Traceback (most recent call last):
  File "./build.py", line 106, in <module>
    sys.exit(main(sys.argv))
  File "./build.py", line 97, in main
    build_ns3(config)
  File "./build.py", line 56, in build_ns3
    run_command(["python", "waf"])
  File "/ns3/ns-allinone-3.4/util.py", line 24, in run_command
    raise CommandError("Command %r exited with code %i" % (argv, retval))
util.CommandError: Command ['python', 'waf'] exited with code 1

NOW I found a Combination that works:
Python 2.5, ns-3 and CXXFLAGS="-O3" ./waf configure

But when running the tests it looks like this:
./test.py 
Waf: Entering directory `/ns3/ns-allinone-3.6-RC3/ns-3.6-RC3/build'
[748/853] cxx: examples/routing/nms-p2p-nix.cc -> build/debug/examples/routing/nms-p2p-nix_10.o
../examples/routing/nms-p2p-nix.cc: In function `int main(int, char**)':
../examples/routing/nms-p2p-nix.cc:44: internal compiler error: in cp_tree_equal, at cp/tree.c:1679
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
Waf: Leaving directory `/ns3/ns-allinone-3.6-RC3/ns-3.6-RC3/build'
Build failed
 -> task failed (err #1): 
        {task: cxx nms-p2p-nix.cc -> nms-p2p-nix_10.o}
CRASH: Example csma/csma-bridge
CRASH: Example csma/csma-bridge-one-hop
CRASH: Example csma/csma-broadcast
CRASH: Example csma/csma-multicast
CRASH: Example csma/csma-one-subnet
CRASH: Example csma/csma-packet-socket
CRASH: Example csma/csma-ping
CRASH: Example csma/csma-raw-ip-socket
CRASH: Example csma/csma-star
CRASH: Example error-model/simple-error-model
CRASH: Example ipv6/icmpv6-redirect
CRASH: Example ipv6/ping6
CRASH: Example ipv6/radvd
CRASH: Example ipv6/radvd-two-prefix
CRASH: Example ipv6/test-ipv6
CRASH: Example mesh/mesh
CRASH: Example naming/object-names
CRASH: Example routing/dynamic-global-routing
CRASH: Example routing/global-injection-slash32
CRASH: Example routing/global-routing-slash32
CRASH: Example routing/mixed-global-routing
CRASH: Example routing/nix-simple
CRASH: Example routing/simple-alternate-routing
CRASH: Example routing/simple-global-routing
CRASH: Example routing/simple-point-to-point-olsr
CRASH: Example routing/simple-routing-ping6
CRASH: Example routing/static-routing-slash32
CRASH: Example stats/wifi-example-sim
CRASH: Example tcp/star
CRASH: Example tcp/tcp-large-transfer
CRASH: Example tcp/tcp-star-server
CRASH: Example tunneling/virtual-net-device
CRASH: Example tutorial/first
CRASH: Example tutorial/hello-simulator
CRASH: Example tutorial/second
CRASH: Example tutorial/third
CRASH: Example tutorial/fourth
CRASH: Example udp/udp-echo
CRASH: Example wireless/mixed-wireless
CRASH: Example wireless/simple-wifi-frame-aggregation
CRASH: Example wireless/wifi-ap --verbose=0
CRASH: Example wireless/wifi-simple-adhoc
CRASH: Example wireless/wifi-simple-adhoc-grid
CRASH: Example wireless/wifi-simple-infra
CRASH: Example wireless/wifi-simple-interference
CRASH: Example wireless/wifi-wired-bridging
0 of 46 tests passed (0 passed, 0 skipped, 0 failed, 46 crashed, 0 valgrind errors)

Can somebody give me hind how to build ns-3?

Thank you
Comment 1 Tom Henderson 2009-10-21 01:54:52 UTC
(In reply to comment #0)
> I tested around with the not working Build on Mac OSX (10.4).

I'm not able to reproduce this problem on an OS X 10.4 with Xcode 2.4, gcc:  gcc version 4.2.1 (Apple Inc. build 5564).  CPU is PowerPC G4 32 bit.

I used gcc_select utility to switch to 4.0.1, and it still builds.

but, I suspect you are using a 64-bit PowerPc or intel cpu?


> The error That allways occure:
> [291/613] cxx: src/simulator/calendar-scheduler.cc ->
> build/debug/src/simulator/calendar-scheduler_1.o
> cc1plus: warnings being treated as errors
> ../src/simulator/calendar-scheduler.cc: In member function `virtual
> ns3::Scheduler::Event ns3::CalendarScheduler::PeekNext() const':
> ../src/simulator/calendar-scheduler.cc:128: warning: converting of negative
> value '-0x00000000000000001' to 'uint64_t'
> ../src/simulator/calendar-scheduler.cc:128: warning: converting of negative
> value '-0x00000000000000001' to 'uint32_t'
> ../src/simulator/calendar-scheduler.cc: In member function
> `ns3::Scheduler::Event ns3::CalendarScheduler::DoRemoveNext()':
> ../src/simulator/calendar-scheduler.cc:155: warning: converting of negative
> value '-0x00000000000000001' to 'uint64_t'
> ../src/simulator/calendar-scheduler.cc:155: warning: converting of negative
> value '-0x00000000000000001' to 'uint32_t'

This is the offending line:
  Scheduler::Event minEvent = {0, {~0, ~0}};

where ~0 seems to be causing the problem.
Comment 2 Gustavo J. A. M. Carneiro 2009-10-23 12:33:56 UTC
This is a build error but not a bug in the build system.
Comment 3 Mathieu Lacage 2009-11-24 05:04:03 UTC
This is a bug _in_ gcc. gcc version, please ?

gcc --version ?
Comment 4 Tom Henderson 2009-12-28 12:46:56 UTC
cannot reproduce-- need more info about compiler
Comment 5 Faker Moatamri 2010-01-25 07:39:49 UTC
Can you please give us the version of your gcc? Did you run any more tests with ns-3.6 or ns-3-dev?
Comment 6 Tom Henderson 2011-08-09 13:39:49 UTC
marking as invalid since unable to reproduce, and a long time has passed (and this is not a symptom in our current mac builds)