boatbod / op25

Fork of osmocom OP25 by boatbod
319 stars 100 forks source link

Build error: "'uint64_t' is not a member of the 'std' library" #196

Closed vindicator1983 closed 11 months ago

vindicator1983 commented 11 months ago

Tried to build gr310 on Fedora, Ubuntu, and Kali. All failed with the same error. Will post errors when i get back to my pc.

[ 66%] Building CXX object op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/p25p2_framer.cc.o
[ 67%] Building CXX object op25/gr-op25_repeater/lib/CMakeFiles/gnuradio-op25_repeater.dir/p25p2_isch.cc.o
In file included from /home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.cc:27:
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.h:36:20: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
   36 |     std::map <std::uint64_t, int> isch_map;
      |                    ^~~~~~~~
      |                    wint_t
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.h:36:33: error: template argument 1 is invalid
   36 |     std::map <std::uint64_t, int> isch_map;
      |                                 ^
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.h:36:33: error: template argument 3 is invalid
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.h:36:33: error: template argument 4 is invalid
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.cc: In constructor ‘p25p2_isch::p25p2_isch()’:
/home/diemos/Downloads/op25-gr310/op25/gr-op25_repeater/lib/p25p2_isch.cc:45:17: error: invalid types ‘int[long long unsigned int]’ for array subscript
penguinzephyr commented 11 months ago

I believe this is in relation to using a newer version of GCC than whats expected. I ran into this issue as well. I fixed it by modifying the problematic file:

/op25/gr-op25_repeater/lib/p25p2_isch.cc

Change this line:

std::map <std::uint64_t, int> isch_map;

To This:

std::map <uint64_t, int> isch_map;

Then recompile.

boatbod commented 11 months ago

Thank you for proposing a fix.  I will integrate it now.

Graham

On 10/28/23 16:06, penguinzephyr wrote:

I believe this is in relation to using a newer version of GCC than whats expected. I ran into this issue as well. I fixed it by modifying the problematic file:

/op25/gr-op25_repeater/lib/p25p2_isch.cc

Change this line:

|std::map <std::uint64_t, int> isch_map;|

To This:

|std::map <uint64_t, int> isch_map;|

Then recompile.

— Reply to this email directly, view it on GitHub https://github.com/boatbod/op25/issues/196#issuecomment-1783911113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHS3SNXJ4SZGOL3ULTRWXKTYBVQUHAVCNFSM6AAAAAA6JAYFJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHEYTCMJRGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>