SoonyangZhang / DrainQueueCongestion

Congestion control algorithms evaluation on ns3
BSD 3-Clause "New" or "Revised" License
85 stars 24 forks source link

How to compile and run this in ns 3.37 #11

Closed v4ray closed 2 years ago

v4ray commented 2 years ago

Hi,

I copied dqc/ to src directory and rewrite wscript to CMakeLists.txt. But when running ./ns3 configure --enable-examples --enable-tests, it shows:

-- Configuring done
CMake Error in src/dqc/CMakeLists.txt:
  Unable to resolve full path of PCH-header
  '/home/me/ns-allinone-3.37/ns-3.37/cmake-cache/CMakeFiles/stdlib_pch.dir/cmake_pch.h'
  assigned to target libdqc-obj, although its path is supposed to be known!

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Finished executing the following commands:
cd cmake-cache; /usr/bin/cmake -DNS3_EXAMPLES=ON -DNS3_TESTS=ON .. ; cd ..

How to fix it?

The changed CMakeLists.txt:

build_lib(
  LIBNAME dqc
  SOURCE_FILES
    model/thirdparty/src/ack_frame.cc
    model/thirdparty/src/alarm.cc
    model/thirdparty/src/byte_codec.cc
    model/thirdparty/src/flag_config.cc
    model/thirdparty/src/flag_impl.cc
    model/thirdparty/src/ip_address.cc
    model/thirdparty/src/memslice.cc
    model/thirdparty/src/ns3_platform.cc
    model/thirdparty/src/netutils.cc
    model/thirdparty/src/packet_number.cc
    model/thirdparty/src/platform_linux.c
    model/thirdparty/src/platform_windows.c
    model/thirdparty/src/process_alarm_factory.cc
    model/thirdparty/src/proto_bandwidth.cc
    model/thirdparty/src/proto_con.cc
    model/thirdparty/src/proto_connection_stats.cc
    model/thirdparty/src/proto_error_codes.cc
    model/thirdparty/src/proto_framer.cc
    model/thirdparty/src/proto_packets.cc
    model/thirdparty/src/proto_socket.cc
    model/thirdparty/src/proto_stream.cc
    model/thirdparty/src/proto_stream_sequencer.cc
    model/thirdparty/src/proto_time.cc
    model/thirdparty/src/proto_types.cc
    model/thirdparty/src/proto_utils.cc
    model/thirdparty/src/random.cc
    model/thirdparty/src/received_packet_manager.cc
    model/thirdparty/src/rtt_monitor.cc
    model/thirdparty/src/rtt_stats.cc
    model/thirdparty/src/send_packet_manager.cc
    model/thirdparty/src/send_receive.cc
    model/thirdparty/src/socket_address.cc
    model/thirdparty/src/string_utils.cc
    model/thirdparty/src/unacked_packet_map.cc
    model/thirdparty/congestion/balia_sender_bytes.cc
    model/thirdparty/congestion/couple_bbr_sender.cc
    model/thirdparty/congestion/couple_cc_manager.cc
    model/thirdparty/congestion/couple_cc_source.cc
    model/thirdparty/congestion/cubic_bytes.cc
    model/thirdparty/congestion/cubic_plus_bytes.cc
    model/thirdparty/congestion/cubic_plus_sender_bytes.cc
    model/thirdparty/congestion/dqc_cc_param_config.cc
    model/thirdparty/congestion/dwc_sender_bytes.cc
    model/thirdparty/congestion/hybrid_slow_start.cc
    model/thirdparty/congestion/ledbat_sender_bytes.cc
    model/thirdparty/congestion/lia_sender_bytes.cc
    model/thirdparty/congestion/lia_sender_enhance.cc
    model/thirdparty/congestion/lia_sender_enhance3.cc
    model/thirdparty/congestion/lptcp_sender_bytes.cc
    model/thirdparty/congestion/nmcc_sender_bytes.cc
    model/thirdparty/congestion/mp_veno_sender_bytes.cc
    model/thirdparty/congestion/mp_westwood_sender_bytes.cc
    model/thirdparty/congestion/olia_sender_bytes.cc
    model/thirdparty/congestion/pcc_monitor_interval_queue.cc
    model/thirdparty/congestion/pcc_sender.cc
    model/thirdparty/congestion/pcc_utility_manager.cc
    model/thirdparty/congestion/proto_bandwidth_sampler.cc
    model/thirdparty/congestion/proto_bbr_plus_sender.cc
    model/thirdparty/congestion/proto_bbr_rand_sender.cc
    model/thirdparty/congestion/proto_bbr_sender.cc
    model/thirdparty/congestion/proto_copa_sender.cc
    model/thirdparty/congestion/proto_dctcp_sender.cc
    model/thirdparty/congestion/proto_delay_bbr_sender.cc
    model/thirdparty/congestion/proto_highrail_sender.cc
    model/thirdparty/congestion/proto_lpbbr_sender.cc
    model/thirdparty/congestion/proto_pacing_sender.cc
    model/thirdparty/congestion/proto_send_algorithm_interface.cc
    model/thirdparty/congestion/proto_tsunami_sender.cc
    model/thirdparty/congestion/prr_sender.cc
    model/thirdparty/congestion/quic_bandwidth_sampler.cc
    model/thirdparty/congestion/quic_bbr_sender.cc
    model/thirdparty/congestion/quic_bbr2_drain.cc
    model/thirdparty/congestion/quic_bbr2_misc.cc
    model/thirdparty/congestion/quic_bbr2_probe_bw.cc
    model/thirdparty/congestion/quic_bbr2_probe_rtt.cc
    model/thirdparty/congestion/quic_bbr2_sender.cc
    model/thirdparty/congestion/quic_bbr2_startup.cc
    model/thirdparty/congestion/tcp_c2tcp_sender_bytes.cc
    model/thirdparty/congestion/tcp_cubic_sender_bytes.cc
    model/thirdparty/congestion/tcp_elastic_sender_bytes.cc
    model/thirdparty/congestion/tcp_hunnan_sender_bytes.cc
    model/thirdparty/congestion/tcp_learning_sender_bytes.cc
    model/thirdparty/congestion/tcp_veno_sender_bytes.cc
    model/thirdparty/congestion/tcp_westwood_sender_bytes.cc
    model/thirdparty/congestion/vegas_sender_bytes.cc
    model/thirdparty/congestion/wvegas_sender_bytes.cc
    model/thirdparty/congestion/xmp_sender_bytes.cc
    model/dqc_delay_ack_receiver.cc
    model/dqc_sender.cc
    model/dqc_receiver.cc
    model/time_tag.cc
    model/dqc_trace.cc
  HEADER_FILES
    model/dqc_delay_ack_receiver.h
    model/dqc_sender.h
    model/dqc_receiver.h
    model/dqc_clock.h
    model/time_tag.h
    model/dqc_trace.h
    model/thirdparty/include/ack_frame.h
    model/thirdparty/include/alarm.h
    model/thirdparty/include/basic_constants.h
    model/thirdparty/include/basic_macro.h
    model/thirdparty/include/byte_codec.h
    model/thirdparty/include/byte_order.h
    model/thirdparty/include/cf_platform.h
    model/thirdparty/include/commandlineflags.h
    model/thirdparty/include/flag_config.h
    model/thirdparty/include/flag_util_impl.h
    model/thirdparty/include/interval.h
    model/thirdparty/include/ip_address.h
    model/thirdparty/include/linked_hash_map.h
    model/thirdparty/include/memslice.h
    model/thirdparty/include/netutils.h
    model/thirdparty/include/ns3_platform.h
    model/thirdparty/include/optional.h
    model/thirdparty/include/packet_number.h
    model/thirdparty/include/packet_number_indexed_queue.h
    model/thirdparty/include/process_alarm_factory.h
    model/thirdparty/include/proto_bandwidth.h
    model/thirdparty/include/proto_circular_deque.h
    model/thirdparty/include/proto_comm.h
    model/thirdparty/include/proto_con.h
    model/thirdparty/include/proto_con_visitor.h
    model/thirdparty/include/proto_connection_stats.h
    model/thirdparty/include/proto_constants.h
    model/thirdparty/include/proto_error_codes.h
    model/thirdparty/include/proto_framer.h
    model/thirdparty/include/proto_packets.h
    model/thirdparty/include/proto_socket.h
    model/thirdparty/include/proto_stream.h
    model/thirdparty/include/proto_stream_data_producer.h
    model/thirdparty/include/proto_stream_sequencer.h
    model/thirdparty/include/proto_time.h
    model/thirdparty/include/proto_types.h
    model/thirdparty/include/proto_utils.h
    model/thirdparty/include/quic_export.h
    model/thirdparty/include/quic_logging.h
    model/thirdparty/include/random.h
    model/thirdparty/include/received_packet_manager.h
    model/thirdparty/include/rtt_monitor.h
    model/thirdparty/include/rtt_stats.h
    model/thirdparty/include/send_packet_manager.h
    model/thirdparty/include/send_receive.h
    model/thirdparty/include/socket_address.h
    model/thirdparty/include/string_utils.h
    model/thirdparty/include/unacked_packet_map.h
    model/thirdparty/congestion/couple_cc_manager.h
    model/thirdparty/congestion/couple_cc_source.h
    model/thirdparty/congestion/dqc_cc_param_config.h
    model/thirdparty/congestion/proto_pacing_sender.h
    model/thirdparty/congestion/proto_send_algorithm_interface.h
    model/thirdparty/congestion/unknow_random.h
    model/thirdparty/logging/base.h
    model/thirdparty/logging/build_config.h
    model/thirdparty/logging/logging.h
  LIBRARIES_TO_LINK ${libnetwork}
                    ${libinternet} 
                    ${libcore}
)
SoonyangZhang commented 2 years ago

Sorry, have no experience in building ns3 with cmake. Why not try it on an older version(e.g. ns3.33) for fast prototyping. And you could also try quic on ns3 (https://github.com/SoonyangZhang/quic-on-ns3). Further question, QQ:865678017