Summary: | editors/openoffice-{4,devel}: fails to build with clang 6.0 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> |
Component: | Individual Port(s) | Assignee: | FreeBSD Office Team <office> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | truckman |
Priority: | --- | Keywords: | needs-patch |
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(office) |
Hardware: | Any | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 224669 |
Description
Jan Beich
![]() ![]() Maybe use static_cast to fix an issue exposed by base r228918. -devel port is also affected vcl/unx/headless/svptext.cxx:157:40: error: comparison between pointer and integer ('void *' and 'sal_Int32' (aka 'int')) if( rGlyphData.ExtDataRef().mpData != Format::NONE ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ vcl/unx/gtk/a11y/atkutil.cxx:781:13: error: non-constant-expression cannot be narrowed from type 'guint' (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] type_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ vcl/unx/gtk/a11y/atkutil.cxx:781:13: note: insert an explicit cast to silence this issue type_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ static_cast<guint16>() vcl/unx/gtk/a11y/atkutil.cxx:787:13: error: non-constant-expression cannot be narrowed from type 'guint' (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] type_query.instance_size, ^~~~~~~~~~~~~~~~~~~~~~~~ vcl/unx/gtk/a11y/atkutil.cxx:787:13: note: insert an explicit cast to silence this issue type_query.instance_size, ^~~~~~~~~~~~~~~~~~~~~~~~ static_cast<guint16>( ) vcl/unx/gtk/a11y/atkwindow.cxx:294:13: error: non-constant-expression cannot be narrowed from type 'guint' (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] type_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ vcl/unx/gtk/a11y/atkwindow.cxx:294:13: note: insert an explicit cast to silence this issue type_query.class_size, ^~~~~~~~~~~~~~~~~~~~~ static_cast<guint16>() vcl/unx/gtk/a11y/atkwindow.cxx:300:13: error: non-constant-expression cannot be narrowed from type 'guint' (aka 'unsigned int') to 'guint16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] type_query.instance_size, ^~~~~~~~~~~~~~~~~~~~~~~~ vcl/unx/gtk/a11y/atkwindow.cxx:300:13: note: insert an explicit cast to silence this issue type_query.instance_size, ^~~~~~~~~~~~~~~~~~~~~~~~ static_cast<guint16>( ) sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:124:41: error: constant expression evaluates to 137 which cannot be narrowed to type 'Output_t' (aka 'char') [-Wc++11-narrowing] static const Output_t aHeader[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a }; ^~~~ sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:124:41: note: insert an explicit cast to silence this issue static const Output_t aHeader[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a }; ^~~~ static_cast<Output_t>( ) I think those errors go away with -std=c++98, however with that flag, I now see a number of errors like this: In file included from /wrkdirs/usr/ports/editors/openoffice-4/work/aoo-4.1.5/main/basebmp/source/bitmapdevice.cxx:36: In file included from ../inc/basebmp/colorblendaccessoradapter.hxx:27: In file included from ../inc/basebmp/colortraits.hxx:30: /usr/local/include/vigra/mathutil.hxx:172:1: error: no viable conversion from returned value of type 'unsigned long long' to function return type 'NumericTraits<unsigned long long>::Promote' (aka 'vigra::Error_NumericTraits_not_specialized_for_this_case') VIGRA_DEFINE_SCALAR_DOT(unsigned long long) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/vigra/mathutil.hxx:166:61: note: expanded from macro 'VIGRA_DEFINE_SCALAR_DOT' inline NumericTraits<T>::Promote dot(T l, T r) { return l*r; } ^~~ /usr/local/include/vigra/numerictraits.hxx:502:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'unsigned long long' to 'const vigra::Error_NumericTraits_not_specialized_for_this_case &' for 1st argument struct Error_NumericTraits_not_specialized_for_this_case { }; ^ -std=c++98 does not support long long, trying -std=gnu++98. The build "succeeds" with -std=gnu++98, but I'm seeing these new errors: cd ../../unxfbsdx.pro/lib && : && LD_LIBRARY_PATH=/wrkdirs/usr/ports/editors /openoffice-4/work/aoo-4.1.5/main/solver/415/unxfbsdx.pro/lib${LD_LIBRARY_PATH:+ :${LD_LIBRARY_PATH}} /wrkdirs/usr/ports/editors/openoffice-4/work/aoo-4.1.5/main /solver/415/unxfbsdx.pro/bin/uno \ -ro uno_services.rdb -ro uno_types.rdb \ -s com.sun.star.test.bridge.BridgeTest -- \ com.sun.star.test.bridge.CppTestObject creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory creation of executable memory area failed: No such file or directory ### test succeeded! They seem to come from main/bridges/source/cpp_uno/shared/vtablefactory.cxx as a result of mkstemp() failing. The "creation of executable memory area failed: No such file or directory" errors appear to be caused by a recent poudriere change. I can reproduce them with a copy of the jail that is older than the clang 6 upgrade. mkstemp() is trying to create a scratch file under /nonexistent, which is ~nobody. Poudriere was changed to run builds as nobody a while ago, but these errors are much more recent. A commit references this bug: Author: truckman Date: Thu Jan 18 07:31:31 UTC 2018 New revision: 459316 URL: https://svnweb.freebsd.org/changeset/ports/459316 Log: Fix editors/openoffice-4 build with clang 6.0.0 by compiling with -std=gnu++98 since that was the default for the compilers historically used for the build. It turns out that -std=c++98 does not work because the vigra headers depend on LLONG_MAX and friends, which are not defined without the GNU extensions. Compensate for a recent poudriere change by overriding $HOME and setting it to /tmp if $HOME is not writeable. Some of the test code run during the build wants to use mkstemp() to create temporary directories under $HOME, which does not work for the "nobody" user which points $HOME at /nonexistent. No PORTREVISION bump since this is a build fix and there is no change to the package. PR: 225129 Reported by: jbeich Changes: head/editors/openoffice-4/Makefile head/editors/openoffice-4/files/patch-solenv_gbuild_platform_freebsd.mk head/editors/openoffice-4/files/patch-solenv_inc_unxfbsd.mk A commit references this bug: Author: truckman Date: Thu Jan 18 16:51:56 UTC 2018 New revision: 459363 URL: https://svnweb.freebsd.org/changeset/ports/459363 Log: Fix editors/openoffice-4 build with clang 6.0.0 by compiling with -std=gnu++98 since that was the default for the compilers historically used for the build. It turns out that -std=c++98 does not work because the vigra headers depend on LLONG_MAX and friends, which are not defined without the GNU extensions. Compensate for a recent poudriere change by overriding $HOME and setting it to /tmp if $HOME is not writeable. Some of the test code run during the build wants to use mkstemp() to create temporary directories under $HOME, which does not work for the "nobody" user which points $HOME at /nonexistent. No PORTREVISION bump since this is a build fix and there is no change to the package. PR: 225129 Reported by: jbeich Changes: head/editors/openoffice-devel/Makefile head/editors/openoffice-devel/files/patch-solenv_gbuild_platform_freebsd.mk head/editors/openoffice-devel/files/patch-solenv_inc_unxfbsd.mk |