spritelab / 5GSniffer

33 stars 12 forks source link

fmt, spdlog versions for compiling #7

Open hududed opened 4 months ago

hududed commented 4 months ago

Was running into some issues with fmt::basic_runtime so I updated fmt and spdlog to 10.2.2 and 1.13 respectively.

However now there are further issues:

/usr/local/include/fmt/base.h:1599:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
  static_assert(
  ^
/usr/local/include/fmt/base.h:1991:20: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::context, srsran_subcarrier_spacing_t, 0>' requested here
  return {{detail::make_arg<NUM_ARGS <= detail::max_packed_args, Context>(
                   ^
/usr/local/include/spdlog/logger.h:328:59: note: in instantiation of function template specialization 'fmt::make_format_args<fmt::context, unsigned short, unsigned int, srsran_subcarrier_spacing_t, 3UL, 0UL, 3874ULL, 0>' requested here
            fmt::vformat_to(fmt::appender(buf), fmt, fmt::make_format_args(args...));
                                                          ^
/usr/local/include/spdlog/logger.h:80:9: note: in instantiation of function template specialization 'spdlog::logger::log_<unsigned short, unsigned int &, srsran_subcarrier_spacing_t &>' requested here
        log_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...);
        ^
/home/hud/developments/5GSniffer/5gsniffer/src/syncer.cc:375:3: note: in instantiation of function template specialization 'spdlog::logger::log<unsigned short, unsigned int &, srsran_subcarrier_spacing_t &>' requested here
  SPDLOG_INFO("Got MIB\nSSB \n Cell ID: {} \n MIB: SFN: {}, SCS: {} ",phy->get_cell_id(), mib.sfn, mib.scs_common);
  ^
/usr/local/include/spdlog/spdlog.h:323:30: note: expanded from macro 'SPDLOG_INFO'
    #define SPDLOG_INFO(...) SPDLOG_LOGGER_INFO(spdlog::default_logger_raw(), __VA_ARGS__)
                             ^
/usr/local/include/spdlog/spdlog.h:322:9: note: expanded from macro 'SPDLOG_LOGGER_INFO'
        SPDLOG_LOGGER_CALL(logger, spdlog::level::info, __VA_ARGS__)
        ^
/usr/local/include/spdlog/spdlog.h:296:19: note: expanded from macro 'SPDLOG_LOGGER_CALL'
        (logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)

Wondering what versions you used that was working?

NorbLd commented 4 months ago

Hello,

We tested it with a clean Ubuntu 22.04 install. On my machine it works with versions 8.1.1 for libfmt-dev and 1.9.2 for libspdlog-dev.

andreaterni7 commented 1 month ago

Hello @NorbLd! I have met the same issue of @hududed. Even though I have the same environment and the same libraries you mentioned, I get the error written in the file makelog.txt when I run "make -j 8". The strange thing is that I performed the same steps, without changing anything, in another PC and it works just fine.

desimetallica commented 1 month ago

Hello, you could try to remove build folder, and try again in a clean build with the lib version provided by NorbLd the cmake without exporting the CXX and CC flags. Do not export these flags:

export CXX=/usr/bin/clang++-14
export CC=/usr/bin/clang-14

Try to run cmake directly with flags:

cmake -DCMAKE_C_COMPILER=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-14 ..
make -j `nproc`
andreaterni7 commented 1 month ago

Thank you @desimetallica it worked!