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
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
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
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:
--
Nuno Teixeira
FreeBSD Committer (ports)
Related
Bugs: #5
Hello,
Committed in https://cgit.freebsd.org/ports/commit/?id=2f3cbb880dc06413014f6661caea4e046bf36c5f
Thanks