gnuradio / pmt

pmt
GNU Lesser General Public License v3.0
11 stars 11 forks source link

Fmt support #80

Closed jsallay closed 1 year ago

jsallay commented 1 year ago

ostream operations are being supplanted by fmtlib (std::format). Adds support for the fmt functions with unit tests. Replaces ostream functions with a call to fmt::format.

jsallay commented 1 year ago

I did some testing for the ubuntu failure. (It was building fine on my machine with the same version of gcc and ubuntu.) This may be a compiler issue. If I build in debug mode, then it compiles just fine. If I switch to any optimized mode, then I get compile errors that a constexpr is being used before it is defined. It looks like the problem doesn't exist is gcc12 which fedora is using.

Thoughts? I can keep digging around to try to find a solution or we can update the compiler required for ubuntu. Gcc12 appears to be readily available on ubuntu 22.

mormj commented 1 year ago

I think bumping up to GCC 12 is fine since it can be apt installed in ubuntu 22 if we can easily tie it into meson. i.e. does CXX=gcc-12 meson setup build work?

jsallay commented 1 year ago

Yeah. That meson command worked for me.

On Wed, Jan 18, 2023, 6:50 AM mormj @.***> wrote:

I think bumping up to GCC 12 is fine since it can be apt installed in ubuntu 22 if we can easily tie it into meson. i.e. does CXX=gcc-12 meson setup build work?

— Reply to this email directly, view it on GitHub https://github.com/gnuradio/pmt/pull/80#issuecomment-1386928922, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPWDXBJJI4ZGWCJEETDLLDWS7KJLANCNFSM6AAAAAAT3KDPRU . You are receiving this because you authored the thread.Message ID: @.***>

jsallay commented 1 year ago

I think bumping up to GCC 12 is fine since it can be apt installed in ubuntu 22 if we can easily tie it into meson. i.e. does CXX=gcc-12 meson setup build work?

Actually, I just checked and I needed to do CXX=g++12 to get it to work, but then it worked just fine.

mormj commented 1 year ago

I'll update the ci docker image and we'll have to do the same with gr4

jsallay commented 1 year ago

It was really painful, but I figured out how to get it to compile in gcc11. It should be good to review and merge now.