camsas / firmament

The Firmament cluster scheduling platform
Apache License 2.0
415 stars 79 forks source link

Linker error building examples #34

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm having trouble getting make examples to work. I get a linker error:

/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'

which I assume means there is some additional shared library I ought to be linking against, but I can't figure out what it is.

Full output starting from a make clean of the repo is below. System is Ubuntu 14.04 with boost 1.55.0 and clang++/llvm 3.4.

Any ideas?

 (master %=) mike@docker1:~/firmament.io/firmament$ make clean
rm -rf build
rm -rf src/generated-cxx/*
rm -rf src/generated-c/*
find src/ -depth -name .setup -type f -delete

 (master %=) mike@docker1:~/firmament.io/firmament$ make all
rm -f build/tests/all_tests.txt
mkdir -p build/tests
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/base all
touch build/tests/all_tests.txt
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/base'
  SETUP   /home/mike/firmament.io/firmament/build/base
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/coco_interference_scores.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/whare_map_stats.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/whare_map_stats.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/coco_interference_scores.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/reference_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/reference_desc.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_vector.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/task_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/task_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_vector.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_desc.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_topology_node_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_topology_node_desc.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/task_perf_statistics_sample.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/task_final_report.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/task_final_report.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/machine_perf_statistics_sample.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/machine_perf_statistics_sample.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/task_perf_statistics_sample.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/data_object_name.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/base/job_desc.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/data_object_name.pb.h
  CXX     /home/mike/firmament.io/firmament/build/base/resource_status.o
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/base/job_desc.pb.h
  CXX     /home/mike/firmament.io/firmament/build/base/data_object.o
  PBC     /home/mike/firmament.io/firmament/build/base/coco_interference_scores.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/whare_map_stats.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/reference_desc.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/resource_vector.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/task_desc.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/resource_desc.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/resource_topology_node_desc.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/task_perf_statistics_sample.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/task_final_report.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/machine_perf_statistics_sample.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/data_object_name.pb.o
  PBC     /home/mike/firmament.io/firmament/build/base/job_desc.pb.o
  AR      /home/mike/firmament.io/firmament/build/base/libfirmament_base.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/base/data_object_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/base/references_test
rm /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_topology_node_desc.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/job_desc.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_desc.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/task_perf_statistics_sample.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/resource_vector.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/machine_perf_statistics_sample.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/task_desc.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/task_final_report.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/coco_interference_scores.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/whare_map_stats.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/data_object_name.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/base/reference_desc.pb.cc
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/base'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/messages all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/messages'
  SETUP   /home/mike/firmament.io/firmament/build/messages
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/test_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/heartbeat_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/test_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/registration_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/heartbeat_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/registration_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_delegation_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_heartbeat_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_delegation_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_info_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_info_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_heartbeat_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_kill_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_spawn_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_kill_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_state_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_state_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_spawn_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_registration_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/create_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/create_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/delete_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_registration_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/delete_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/lookup_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/copy_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/lookup_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/io_notification_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/copy_message.pb.h
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/messages/base_message.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/io_notification_message.pb.h
  PBC     /home/mike/firmament.io/firmament/build/messages/test_message.pb.o
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/messages/base_message.pb.h
  PBC     /home/mike/firmament.io/firmament/build/messages/heartbeat_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/registration_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_delegation_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_heartbeat_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_info_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_kill_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_spawn_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/task_state_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/storage_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/storage_registration_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/create_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/delete_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/lookup_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/copy_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/io_notification_message.pb.o
  PBC     /home/mike/firmament.io/firmament/build/messages/base_message.pb.o
  AR      /home/mike/firmament.io/firmament/build/messages/libfirmament_messages.a
rm /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_kill_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_heartbeat_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/delete_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/lookup_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/copy_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/heartbeat_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_state_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/create_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/registration_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/base_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_info_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/io_notification_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_spawn_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/test_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/storage_registration_message.pb.cc /home/mike/firmament.io/firmament/src/generated-cxx/messages/task_delegation_message.pb.cc
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/messages'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/platforms all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/platforms'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/misc all
  SETUP   /home/mike/firmament.io/firmament/build/platforms
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/platforms/common.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/platforms/common.pb.h
  PBC     /home/mike/firmament.io/firmament/build/platforms/common.pb.o
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/misc'
  SETUP   /home/mike/firmament.io/firmament/build/misc
  CXX     /home/mike/firmament.io/firmament/build/misc/generate_trace.o
make -C sim all
  SETUP   /home/mike/firmament.io/firmament/build/platforms/sim
  CXX     /home/mike/firmament.io/firmament/build/platforms/sim/simulated_messaging_adapter.o
  CXX     /home/mike/firmament.io/firmament/build/misc/pb_utils.o
  AR      /home/mike/firmament.io/firmament/build/platforms/sim/libfirmament_platforms_sim.a
make -C unix all
  SETUP   /home/mike/firmament.io/firmament/build/platforms/unix
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/async_tcp_server.o
  CXX     /home/mike/firmament.io/firmament/build/misc/string_utils.o
  CXX     /home/mike/firmament.io/firmament/build/misc/utils.o
  AR      /home/mike/firmament.io/firmament/build/misc/libfirmament_misc.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/misc/envelope_test
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/common.o
  TESTLNK /home/mike/firmament.io/firmament/build/tests/misc/utils_test
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/procfs_monitor.o
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/misc'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/storage all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/storage'
  SETUP   /home/mike/firmament.io/firmament/build/storage
  CXX     /home/mike/firmament.io/firmament/build/storage/hdfs_bridge.o
  CXX     /home/mike/firmament.io/firmament/build/storage/simple_object_store.o
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/procfs_machine.o
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/signal_handler.o
  CXX     /home/mike/firmament.io/firmament/build/storage/stub_object_store.o
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/stream_sockets_adapter.o
  AR      /home/mike/firmament.io/firmament/build/storage/libfirmament_storage.a
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/storage'
  CXX     /home/mike/firmament.io/firmament/build/platforms/unix/tcp_connection.o
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine/executors all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/engine/executors'
  SETUP   /home/mike/firmament.io/firmament/build/engine/executors
  CXX     /home/mike/firmament.io/firmament/build/engine/executors/local_executor.o
  AR      /home/mike/firmament.io/firmament/build/platforms/unix/libfirmament_unix.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/platforms/unix/procfs_monitor_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/platforms/unix/procfs_machine_test
  CXX     /home/mike/firmament.io/firmament/build/engine/executors/remote_executor.o
  TESTLNK /home/mike/firmament.io/firmament/build/tests/platforms/unix/stream_sockets_adapter_test
  CXX     /home/mike/firmament.io/firmament/build/engine/executors/simulated_executor.o
  CXX     /home/mike/firmament.io/firmament/build/engine/executors/task_health_checker.o
  CXX     /home/mike/firmament.io/firmament/build/engine/executors/topology_manager.o
  TESTLNK /home/mike/firmament.io/firmament/build/tests/platforms/unix/stream_sockets_channel_test
  AR      /home/mike/firmament.io/firmament/build/engine/executors/libfirmament_engine_executors.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/engine/executors/local_executor_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/engine/executors/topology_manager_test
rm /home/mike/firmament.io/firmament/src/generated-cxx/platforms/common.pb.cc
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/platforms'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/sim/dfs all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/sim/dfs'
  SETUP   /home/mike/firmament.io/firmament/build/sim/dfs
  CXX     /home/mike/firmament.io/firmament/build/sim/dfs/google_block_distribution.o
  CXX     /home/mike/firmament.io/firmament/build/sim/dfs/simulated_dfs.o
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/engine/executors'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling'
  SETUP   /home/mike/firmament.io/firmament/build/scheduling
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/scheduling/scheduling_delta.pb.h
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/scheduling/scheduling_delta.pb.h
  CXX     /home/mike/firmament.io/firmament/build/scheduling/common.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/event_driven_scheduler.o
  AR      /home/mike/firmament.io/firmament/build/sim/dfs/libfirmament_sim_dfs.a
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/sim/dfs'
  CXX     /home/mike/firmament.io/firmament/build/scheduling/knowledge_base.o
  PBC     /home/mike/firmament.io/firmament/build/scheduling/scheduling_delta.pb.o
  AR      /home/mike/firmament.io/firmament/build/scheduling/libfirmament_scheduling.a
rm /home/mike/firmament.io/firmament/src/generated-cxx/scheduling/scheduling_delta.pb.cc
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/flow all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling/flow'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/simple all
  SETUP   /home/mike/firmament.io/firmament/build/scheduling/flow
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/coco_cost_model.o
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling/simple'
  SETUP   /home/mike/firmament.io/firmament/build/scheduling/simple
  CXX     /home/mike/firmament.io/firmament/build/scheduling/simple/simple_scheduler.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_add_node.o
  AR      /home/mike/firmament.io/firmament/build/scheduling/simple/libfirmament_scheduling_simple.a
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling/simple'
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_change_arc.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_change_stats.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_exporter.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_new_arc.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/dimacs_remove_node.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/flow_graph.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/flow_graph_arc.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/flow_graph_manager.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/flow_graph_node.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/flow_scheduler.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/json_exporter.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/octopus_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/quincy_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/sjf_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/solver_dispatcher.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/trivial_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/random_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/void_cost_model.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/wharemap_cost_model.o
  AR      /home/mike/firmament.io/firmament/build/scheduling/flow/libfirmament_scheduling_flow.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/scheduling/flow/dimacs_exporter_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/scheduling/flow/flow_graph_test
make -C sim all
  SETUP   /home/mike/firmament.io/firmament/build/scheduling/flow/sim
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/sim/google_runtime_distribution.o
  CXX     /home/mike/firmament.io/firmament/build/scheduling/flow/sim/simulated_quincy_cost_model.o
  AR      /home/mike/firmament.io/firmament/build/scheduling/flow/sim/libfirmament_simulated_quincy.a
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling/flow'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/engine'
  SETUP   /home/mike/firmament.io/firmament/build/engine
  DYNLNK  /home/mike/firmament.io/firmament/build/engine/task_lib_inject.so
  CXX     /home/mike/firmament.io/firmament/build/engine/health_monitor.o
  CXX     /home/mike/firmament.io/firmament/build/engine/node.o
  CXX     /home/mike/firmament.io/firmament/build/engine/coordinator_http_ui.o
  CXX     /home/mike/firmament.io/firmament/build/engine/coordinator.o
In file included from /home/mike/firmament.io/firmament/src/engine/coordinator_http_ui.cc:17:
/home/mike/firmament.io/firmament/ext/pb2json-git/pb2json.h:8:16: warning: unused function 'parse_msg' [-Wunused-function]
static json_t *parse_msg(const google::protobuf::Message *msg);
               ^
/home/mike/firmament.io/firmament/ext/pb2json-git/pb2json.h:9:16: warning: unused function 'parse_repeated_field'
      [-Wunused-function]
static json_t *parse_repeated_field(const google::protobuf::Message *msg,const google::protobuf::Reflection * ref,const g...
               ^
  CXX     /home/mike/firmament.io/firmament/build/engine/worker.o
2 warnings generated.
  CXX     /home/mike/firmament.io/firmament/build/engine/task_lib.o
  DYNLNK  /home/mike/firmament.io/firmament/build/engine/coordinator
  DYNLNK  /home/mike/firmament.io/firmament/build/engine/worker
  AR      /home/mike/firmament.io/firmament/build/engine/libfirmament_engine.a
  AR      /home/mike/firmament.io/firmament/build/engine/libfirmament_task_lib.a
  TESTLNK /home/mike/firmament.io/firmament/build/tests/engine/coordinator_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/engine/simple_scheduler_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/engine/worker_test
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/engine'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/sim all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/sim'
  SETUP   /home/mike/firmament.io/firmament/build/sim
  GEN     /home/mike/firmament.io/firmament/src/generated-cxx/sim/event_desc.pb.h
  CXX     /home/mike/firmament.io/firmament/build/sim/event_manager.o
  GENC    /home/mike/firmament.io/firmament/src/generated-cxx/sim/event_desc.pb.h
  CXX     /home/mike/firmament.io/firmament/build/sim/google_trace_loader.o
  CXX     /home/mike/firmament.io/firmament/build/sim/knowledge_base_simulator.o
  CXX     /home/mike/firmament.io/firmament/build/sim/simulator.o
  CXX     /home/mike/firmament.io/firmament/build/sim/simulator_bridge.o
  CXX     /home/mike/firmament.io/firmament/build/sim/synthetic_trace_loader.o
  CXX     /home/mike/firmament.io/firmament/build/sim/trace_utils.o
  CXX     /home/mike/firmament.io/firmament/build/sim/google_trace_task_processor.o
  PBC     /home/mike/firmament.io/firmament/build/sim/event_desc.pb.o
  DYNLNK  /home/mike/firmament.io/firmament/build/sim/simulator
  TESTLNK /home/mike/firmament.io/firmament/build/tests/sim/event_manager_test
  TESTLNK /home/mike/firmament.io/firmament/build/tests/sim/simulator_bridge_test
  DYNLNK  /home/mike/firmament.io/firmament/build/sim/google_trace_processor
rm /home/mike/firmament.io/firmament/src/generated-cxx/sim/event_desc.pb.cc
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/sim'

 (master *%=) mike@docker1:~/firmament.io/firmament$ make --no-print-directory examples
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/base all
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/messages all
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/misc all
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/platforms all
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine/executors all
make -C sim all
make[1]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make -C unix all
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/sim/dfs all
make[2]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/storage all
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling all
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/flow all
make -C sim all
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/simple all
make[2]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine all
make[1]: Nothing to be done for `all'.
make  --no-print-directory - --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/examples all
  SETUP   /home/mike/firmament.io/firmament/build/examples/hello_world
  CXX     /home/mike/firmament.io/firmament/build/examples/hello_world/hello_world.o
  DYNLNK  /home/mike/firmament.io/firmament/build/examples/hello_world/hello_world
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/home/mike/firmament.io/firmament/build/examples/hello_world/hello_world] Error 1
ghost commented 8 years ago

Just to clarify: I'm doing make --no-print-directory examples instead of make examples to get around a different problem with what I think is a superfluous -w that's getting passed to make somewhere. If I just do make examples:

 (master *%=) mike@docker1:~/firmament.io/firmament$ make examples
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/base all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/base'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/base'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/messages all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/messages'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/messages'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/misc all
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/platforms all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/misc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/misc'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine/executors all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/platforms'
make -C sim all
make[2]: Nothing to be done for `all'.
make -C unix all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/engine/executors'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/engine/executors'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/sim/dfs all
make[2]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/platforms'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/storage all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/sim/dfs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/sim/dfs'
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/storage'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/storage'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/flow all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling/flow'
make -C sim all
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/scheduling/simple all
make[2]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling/flow'
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/scheduling/simple'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/scheduling/simple'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/engine all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/engine'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/engine'
make  --jobserver-fds=3,5 -j -C /home/mike/firmament.io/firmament/src/examples all
make[1]: Entering directory `/home/mike/firmament.io/firmament/src/examples'
make[2]: Entering directory `/home/mike/firmament.io/firmament/src/examples/hello_world'
make[2]: *** No rule to make target `w'.  Stop.
make[2]: Leaving directory `/home/mike/firmament.io/firmament/src/examples/hello_world'
make[2]: Entering directory `/home/mike/firmament.io/firmament/src/examples/fibonacci'
make[2]: *** No rule to make target `w'.  Stop.
make[2]: Leaving directory `/home/mike/firmament.io/firmament/src/examples/fibonacci'
make[2]: Entering directory `/home/mike/firmament.io/firmament/src/examples/r2d2_trace_process'
make[2]: *** No rule to make target `w'.  Stop.
make[2]: Leaving directory `/home/mike/firmament.io/firmament/src/examples/r2d2_trace_process'
make[2]: Entering directory `/home/mike/firmament.io/firmament/src/examples/timespin'
make[2]: *** No rule to make target `w'.  Stop.
make[2]: Leaving directory `/home/mike/firmament.io/firmament/src/examples/timespin'
make[2]: Entering directory `/home/mike/firmament.io/firmament/src/examples/store_example'
make[2]: *** No rule to make target `w'.  Stop.
make[2]: Leaving directory `/home/mike/firmament.io/firmament/src/examples/store_example'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/mike/firmament.io/firmament/src/examples'
make: *** [examples] Error 2

So, after recursing into src/examples/hello_world it thinks w is the target. Adding --no-print-directory cleared this one up though.

ms705 commented 8 years ago

Thansk for the report, I'll look into this.

My hunch is that there is a problem with the statically linked version of TaskLib that these examples use. In practice, these example applications are of relatively little value: as they require TaskLib to be linked at compilation time, they're a lot less flexible than simply using Firmament's support for dynamically injecting TaskLib via LD_PRELOAD (this is what happens by default, unless the inject_task_lib field of the JobDescriptor protobuf is unset on job submission). Hence, we've transitioned away from using the examples, and can probably just drop them from the code base in the long run.

(That said, once we move to having native container support in the standalone cluster manager, TaskLib will be superfluous either way. It was a "hack" in order to get tasks to report their liveness and statistics to Firmament, but it's not required when we have containers that we can monitor externally.)

ms705 commented 8 years ago

Thanks for reporting the build issue, too -- I can reproduce that one, and will look into what's happening there. In general, we are planning to transition to using CMake (rather than our rather cobbled-together build system) in the future, but this is worth fixing no matter what.

ghost commented 8 years ago

Ah, ok, thanks for the reply. I will look more closely at the dynamic TaskLib and forget about these statically linked examples in that case.

PS Native container support sounds very exciting.

ms705 commented 8 years ago

@mgoelzer The dynamically linked task lib is injected automatically if you pass the correct --task_lib_dir argument to the coordinator on startup (normally, this is ${PWD}/build/engine if ${PWD} is the root of the Firmament source tree. That way, any binary should be runnable as a Firmament task.

Re-opening this issue to track fixing the examples build issues.

ms705 commented 8 years ago

Fixes to the build issues are under review on GerritHub here:

I'm still chasing a segfault on exit for the HelloWorld example, but should have that sorted soon.

ms705 commented 8 years ago

This had been long since fixed already, but I've now ported the examples build to CMake as well, and improved error reporting for the kind of situations encountered when using the example binaries with statically linked TaskLib. Resolving :)