libexttextcat
libexttextcat copied to clipboard
Build failure when compiling without optimization
When compiling LibreOffice today:
./autogen.sh\
--enable-dbgutil\
--disable-odk\
--enable-epm\
--with-package-format=archive\
--disable-gtk3\
--disable-systray\
--disable-cups\
--enable-release-build\
--enable-python=internal\
--with-galleries=no\
--with-java=no\
--without-fonts\
--without-help
Leads to:
configure:
==============================================================================
Build configuration:
werror: yes
==============================================================================
Making all in src
CC common.lo
In file included from /usr/include/bits/libc-header-start.h:33:0,
from /usr/include/stdio.h:27,
from common.c:39:
/usr/include/features.h:376:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:561: common.lo] Error 1
make[3]: *** [Makefile:373: all] Error 2
make[2]: *** [Makefile:461: all-recursive] Error 1
make[1]: *** [/srv/installers/AUR/libreoffice-slim-git/src/core/external/libexttextcat/ExternalProject_libexttextcat.mk:17: /srv/installers/AUR/libreoffice-slim-git/src/core/workdir/ExternalProject/libexttextcat/build] Error 1
Because of --enable-dbgutil
.
The fix would be to only compile with _FORTIFY_SOURCE
when optimization is enabled.
Neither LibreOffice nor libexttextcat enable _FORTIFY_SOURCE and --enable-dbgutil doesn't turn off optimization (--enable-debug does). So the flags must have come from outside.
Quick solution is to pass --disable-werror to the configure of libexttextcat...
@dtardon:
--enable-dbgutil doesn't turn off optimization (--enable-debug does)
This information is misleading then.
_FORTIFY_SOURCE
is enabled by default on Arch Linux.
The --enable-debug
flag was not passed in my case.
@scarabeusiv: Thanks, I went with --with-system-libexttextcat
.
Both --enable-debug and --enable-dbgutil disable optimizations by default (and there's --enable-optimized to override that).