deeptho / neumodvb

neumoDVB DVB-S2/DVB-T/DVB-C settop box and DX program for Linux
Other
17 stars 7 forks source link

Building on 22.04 with packaged fmt #37

Closed alphafox02 closed 2 months ago

alphafox02 commented 3 months ago

I was asked to take a look at neumodvb and help with compiling it and providing it within DragonOS. It is a very interesting project. I realize according to your README that it's likely newer builds will not work on 22.04, but I thought I'd give it a try anyways.

During the running of make I've ran into the following,

/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:110:12: error: use of undeclared identifier 'current_zone'
        auto tz = current_zone();
                  ^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:119:47: error: no member named 'choose' in namespace 'std::chrono'                 
        auto nextsys = tz->to_sys(next, std::chrono::choose::earliest);
                                        ~~~~~~~~~~~~~^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:137:12: error: use of undeclared identifier 'current_zone'                         
        auto tz = current_zone();
                  ^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:172:50: error: no member named 'choose' in namespace 'std::chrono'                 
        auto nextsys = tz->to_sys(nextloc, std::chrono::choose::earliest);
                                           ~~~~~~~~~~~~~^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:173:11: error: no member named 'format' in namespace 'std'; did you mean 'fmt::format'?
        auto s = std::format("next      {}={}\n", msg, nextloc);
                 ^~~~~~~~~~~
                 fmt::format  

I sort of have an idea of why I'm getting the undeclared identifier/no member named 'choose', but I've not resolved it yet. As for fmt, is it possible to take a page from CyberEther and package fmt along with the compiling, like not using the system installed fmt?

https://github.com/luigifcruz/CyberEther/commit/9c27a7837542cf5f1a551a0813ac2dbaf35d2752 https://github.com/luigifcruz/CyberEther/blob/12b5794d8288e119d6f9457914dbffdc5ba3d80f/subprojects/packagefiles/fmt/meson.build

deeptho commented 3 months ago

Everything is possible, but time is better spent on more important issues. Why not simply upgrade?

alphafox02 commented 3 months ago

Totally understand. I don’t know what else has been compiled against the system installed fmt so to upgrade it for one application isn’t the best route for me at the moment.

alphafox02 commented 2 months ago

Giving it another shot, but with 22.04 (libfmt from github latest) I still run into the following when building your latest code. Running down the issues almost leads me to believe it's something with the includes or the compiler?

[ 85%] Building CXX object src/receiver/CMakeFiles/neumoreceiver.dir/fe_monitor.cc.o
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:111:12: error: use of undeclared identifier 'current_zone'
        auto tz = current_zone();
                  ^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:120:47: error: no member named 'choose' in namespace 'std::chrono'  
        auto nextsys = tz->to_sys(next, std::chrono::choose::earliest);
                                        ~~~~~~~~~~~~~^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:138:12: error: use of undeclared identifier 'current_zone'          
        auto tz = current_zone();
                  ^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:173:50: error: no member named 'choose' in namespace 'std::chrono'  
        auto nextsys = tz->to_sys(nextloc, std::chrono::choose::earliest);
                                           ~~~~~~~~~~~~~^
/home/dragon/Downloads/neumodvb/src/receiver/commands.cc:174:11: error: no member named 'format' in namespace 'std'; did you mean 'fmt::format'?
        auto s = std::format("next      {}={}\n", msg, nextloc);
                 ^~~~~~~~~~~
                 fmt::format                                                                                                 
/home/dragon/Downloads/neumodvb/build/../build_fmt/fmt-src/include/fmt/core.h:2786:31: note: 'fmt::format' declared here     
FMT_NODISCARD FMT_INLINE auto format(format_string<T...> fmt, T&&... args)
                              ^
[ 86%] Building CXX object src/receiver/CMakeFiles/neumoreceiver.dir/active_si_stream.cc.o                                   
5 errors generated.
make[2]: *** [src/receiver/CMakeFiles/neumoreceiver.dir/build.make:109: src/receiver/CMakeFiles/neumoreceiver.dir/commands.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/dragon/Downloads/neumodvb/src/receiver/tune.cc:709:23: error: use of undeclared identifier 'current_zone'; did you mean 'current_event'?
        auto tp = zoned_time(current_zone(), floor<std::chrono::seconds>(start_time));
                             ^~~~~~~~~~~~
                             current_event                                                                                   
/home/dragon/Downloads/neumodvb/src/receiver/task.h:251:21: note: 'current_event' declared here                              
        const epoll_event* current_event() const {
                           ^
/home/dragon/Downloads/neumodvb/src/receiver/tune.cc:709:12: error: use of undeclared identifier 'zoned_time'                
        auto tp = zoned_time(current_zone(), floor<std::chrono::seconds>(start_time));
                  ^
2 errors generated.                                                                                                          
make[2]: *** [src/receiver/CMakeFiles/neumoreceiver.dir/build.make:157: src/receiver/CMakeFiles/neumoreceiver.dir/tune.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1457: src/receiver/CMakeFiles/neumoreceiver.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
alphafox02 commented 2 months ago

I pulled in clang-16 on 22.04 and made sure to specify using clang w/ cmake. But the same exact errors above remain. Here's the output of cmake

dragon@dragon:~/Downloads/neumodvb/build$ cmake -DUSE_CLANG=ON ..
-- xxx=/jammy/
-- Modern OS detected - using clang 20
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter Development Development.Module Development.Embed 
-- Version: 10.1.0
-- Build type: Debug
-- pybind11 v2.10.0 dev1
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter 
-- Found Python: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3.7") found components: Interpreter 
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter Development Development.Module Development.Embed 
-- Searching for log4cxx/logger.h
-- Searching for liblog4cxx
-- The host system is: Linux-6.5.0-41-generic.
-- Project base dir is: /home/dragon/Downloads/neumodvb
CMake Warning in CMakeLists.txt:
  CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have                                                
  been specified                                                                                                          

-- Configuring done
-- Generating done
-- Build files have been written to: /home/dragon/Downloads/neumodvb/build
alphafox02 commented 2 months ago

Tried again with - The C compiler identification is Clang 18.1.8 The CXX compiler identification is Clang 18.1.8

It seems like info on line is suggesting some of the issues are because things didn't get introduced until C++20, but I feel like with clang 18, I should be supplying what's needed?

alphafox02 commented 2 months ago

Managed to get your latest code built on 22.04. I'll retrace my steps and share.