dspdfviewer
dspdfviewer copied to clipboard
Build failure on llvm-4.0 with -Werror,-Wundefined-func-template
Hello @dannyedel
Recently we managed to write a FreeBSD port for dspdfviewer and it was building and installing fine until the llvm-4.0 upgrade in the base system in FreeBSD 12.0-CURRENT
.
The change in llvm-4.0 has caused build to fail specifically due to this
wrkdirs/usr/ports/graphics/dspdfviewer/work/dspdfviewer-1.15.1/runtimeconfiguration.cpp:201:14: error: instantiation of function 'boost::program_options::parse_config_file<char>' required here, but no definition is available [-Werror,-Wundefined-func-template]
The easiest workaround will be adding -Wno-error=undefined-func-template
to cmake/compiler_clang.cmake
for that one file. But this is not really a proper fix but just a workaround.
A proper fix would be for the proper definition of the above mentioned function.
Detailed log of the build failures
FreeBSD 12-CURRENT (i386) FreeBSD 12-CURRENT (amd64)
Thanks to @ppaeps for helping me figure out the error and the suggestions for the fix.
-- Santhosh
Thank you for the report, I'll look into it (and add a CI build with a more recent clang) when I find the time.
Thank you for the reply @dannyedel
We also had a build failure on another part of the code again in FreeBSD 12.0-CURRENT
.
Once again a change in llvm-4.0 has cause the build to fail specifically due to this
./hyperlinkarea.cpp:35:18: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
We fixed this by adding -Wno-error=zero-as-null-pointer-constant
to the FreeBSD port's Makefile
Detailed log of the build failures
FreeBSD 12-CURRENT (i386) FreeBSD 12-CURRENT (amd64)
Added the details here, so that you can fix them along with the above one.
-- Santhosh