Hi, I previously sent an email asking about how to use gdb on nox controller. With help from the list, I am about to gdb the nox controller, but find out it is optimized so I couldn't see any meaningful value. To remove optimization, I changed Makefile under nox/build/src to remove the -O2 flag, did a make clean, and do make -j again to build nox_core. However, previously working compilation now breaks, complaining some linker issue:
nox_main.o: In function `main': /home/jason1/xiaoyan_full/nox/build/src/../../src/nox_main.cc:510: undefined reference to `vigil::nox::init()' /home/jason1/xiaoyan_full/nox/build/src/../../src/nox_main.cc:556: undefined reference to `vigil::nox::register_handler(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<vigil::Disposition ()(vigil::Event const&)>, int)' /home/jason1/xiaoyan_full/nox/build/src/../../src/nox_main.cc:559: undefined reference to `vigil::nox::run()' nox_main.o: In function `finish_booting': /home/jason1/xiaoyan_full/nox/build/src/../../src/nox_main.cc:603: undefined reference to `vigil::nox::connect(vigil::Openflow_connection_factory*, bool)' It was doing the following while getting the linker issue : /bin/bash ../libtool --tag=CXX --mode=link g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -R/usr/local/bin -export-dynamic -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl -Wl,-E -o nox_core components.xsd.o nox.xsd.o nox_main.o ./builtin/.libs/libbuiltin.la ./lib/libnoxcore.la libtool: link: g++ -fno-omit-frame-pointer -fno-strict-aliasing -Wall -Wno-sign-compare -Winit-self -Wformat-nonliteral -Wformat-security -g -Wl,-E -o .libs/nox_core components.xsd.o nox.xsd.o nox_main.o -Wl,--export-dynamic -L/usr/lib -lboost_unit_test_framework-mt -lboost_filesystem-mt -lssl ./builtin/.libs/libbuiltin.so ./lib/.libs/libnoxcore.so -Wl,-rpath -Wl,/usr/local/bin/builtin -Wl,-rpath -Wl,/usr/local/bin I looked in build directory and all the .o files are there. jason1@jason1:~/xiaoyan_full/nox/build$ find . -name nox.xsd.o ./src/nox.xsd.o jason1@jason1:~/xiaoyan_full/nox/build$ find . -name nox_main.o ./src/nox_main.o jason1@jason1:~/xiaoyan_full/nox/build$ find . -name components.xsd.o ./src/components.xsd.o Anyone can shield some light on this? Is there some dependency issue I am missing here? It built fine before I did the makefile change, but once it breaks, even if I restore the original makefile, it still breaks. Thanks! Yimin
