Menu

#5 build fails on clang16

v1.0_(example)
open
nobody
None
5
2023-07-11
2023-07-08
No

Hello,

FreeBSD libemf port is failing on clang16 because of -std=c++17 being default:

In file included from libemf.cpp:24:
In file included from ./libemf.h:33:
In file included from ../include/libEMF/emf.h:30:
../include/libEMF/wine/winuser.h:2340:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include "poppack.h"
         ^
../include/libEMF/wine/poppack.h:48:13: note: previous '#pragma pack' directive that modifies alignment is here
#    pragma pack()
            ^
libemf.cpp:882:13: error: no member named 'bind2nd' in namespace 'std'
                     std::bind2nd( std::mem_fun( &EMF::METARECORD::serialize ),
                     ~~~~~^

Full log here.

One workaround is to force -std=c++14 so build succeed.

What upstream recommends to fix it?

Thanks,
Nuno Teixeira
eduardo at FreeBSD.org

Related

Bugs: #5

Discussion

  • Allen Barnett

    Allen Barnett - 2023-07-08

    Thanks for the report. I think using the CMake version of the build system would be the best way to introduce the --std=c++14 flag. What version of CMake is available in the port system?

     

    Last edit: Allen Barnett 2023-07-08
    • Nuno Teixeira

      Nuno Teixeira - 2023-07-08

      Hello Allen,

      graphics/libemf port uses gnu configure and I'm using workaround:

      USES=compiler:c++14-lang (to tell ports framework that a c++14 capable compiler is needed)
      USE_CXXSTD=c++14 (to force -std=c++14 on compiler)

      IMHO there is no need to change to cmake just because of forcing -std, but cmake is a newer build system.

      Since clang16 have landed a lot of programs have broken because of c++17 default standard and solutions are being searched to fix code so c++17 compliant can be achieved when possible.
      Please look at some fixes being applied:
      https://cgit.freebsd.org/ports/commit/?id=ae8e32b08e33bac7aec0f14f28e45d53dee6f565

      Resuming, the perfect solution is to fix code not just forcing a standard.

      I can use workaround above for now.
      Please let me know of any updates.

      Thanks

       
    • Nuno Teixeira

      Nuno Teixeira - 2023-07-08

      Hello Allen,

      graphics/libemf port uses gnu configure and I'm using workaround:

      USES=compiler:c++14-lang (to tell ports framework that a c++14 capable
      compiler is needed)
      USE_CXXSTD=c++14 (to force -std=c++14 on compiler)

      IMHO there is no need to change to cmake just because of forcing -std, but
      cmake is a newer build system.

      Since clang16 have landed a lot of programs have broken because of c++17
      default standard and solutions are being searched to fix code so c++17
      compliant can be achieved when possible.
      Please look at some fixes being applied:
      https://cgit.freebsd.org/ports/commit/?id=ae8e32b08e33bac7aec0f14f28e45d53dee6f565

      Resuming, the perfect solution is to fix code not just forcing a standard.

      I can use workaround above for now.
      Please let me know of any updates.

      Thanks

      Allen Barnett dallenbarnett@users.sourceforge.net escreveu no dia sábado,
      8/07/2023 à(s) 12:40:

      Thanks for the report. I think using the CMake version of the build
      systemm would be the best way to introduce the --std=c++14 flag. What
      version of CMake is available in the port system?


      [bugs:#5] https://sourceforge.net/p/libemf/bugs/5/ build fails on
      clang16

      Status: open
      Group: v1.0_(example)
      Created: Sat Jul 08, 2023 10:21 AM UTC by Nuno Teixeira
      Last Updated: Sat Jul 08, 2023 10:21 AM UTC
      Owner: nobody

      Hello,

      FreeBSD libemf port https://www.freshports.org/graphics/libemf/ is
      failing on clang16 because of -std=c++17 being default:

      In file included from libemf.cpp:24:In file included from ./libemf.h:33:In file included from ../include/libEMF/emf.h:30:../include/libEMF/wine/winuser.h:2340:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]#include "poppack.h" ^../include/libEMF/wine/poppack.h:48:13: note: previous '#pragma pack' directive that modifies alignment is here# pragma pack() ^libemf.cpp:882:13: error: no member named 'bind2nd' in namespace 'std' std::bind2nd( std::mem_fun( &EMF::METARECORD::serialize ), ~~~~~^

      Full log
      https://people.freebsd.org/~eduardo/logs/clang16/libemf/libEMF-1.0.13.log
      here.

      One workaround is to force -std=c++14 so build succeed.

      What upstream recommends to fix it?

      Thanks,
      Nuno Teixeira
      eduardo at FreeBSD.org


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/libemf/bugs/5/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Nuno Teixeira
      FreeBSD Committer (ports)

       

      Related

      Bugs: #5

    • Nuno Teixeira

      Nuno Teixeira - 2023-07-11
       

Log in to post a comment.