Bug 95197 - FreeBSD9 GCC4.9 missing header
Summary: FreeBSD9 GCC4.9 missing header
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-20 14:34 UTC by Olivier
Modified: 2017-05-02 11:34 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier 2015-10-20 14:34:22 UTC
Using GCC4.9 on FreeBSD 9, I can't finish the compilation. It's stopped by:
"usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared"

A quick search lead to this article:
https://gcc.gnu.org/gcc-4.9/porting_to.html
"The <cstddef> header was updated for C++11 support and this breaks some libraries which misuse macros meant for internal use by GCC only"

Is this fixable in LibreOffice?

Here is a partial of the error log

*************
[build CXX] ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
S=/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2 && I=$S/instdir && W=$S/workdir &&  mkdir -p $W/CxxObject/ucb/source/ucp/webdav/ $W/Dep/CxxObject/ucb/source/ucp/webdav/ && cd /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2 &&   g++49 -DCPPU_ENV=gcc3 -DFREEBSD -DNDEBUG -DOPTIMIZE -DOSL_DEBUG_LEVEL=0 -DUNIX -DUNX -DX86_64 -D_PTHREADS -D_REENTRANT -isystem /usr/local/include  -DSYSTEM_ZLIB   -DHAVE_GCC_VISIBILITY_FEATURE -fvisibility=hidden   -Wall -Wno-missing-braces -Wnon-virtual-dtor -Wendif-labels -Wextra -Wundef -Wunused-macros -fmessage-length=0 -fno-common -pipe  -fvisibility-inlines-hidden -fstack-protector-strong -fPIC -Wshadow -Woverloaded-virtual -std=gnu++11   -DEXCEPTIONS_ON -fexceptions -fno-enforce-eh-specs -O2 -pipe -fdiagnostics-color=auto -Wl,-z,relro,-z,now -D_FORTIFY_SOURCE=2 -ftracer -floop-interchange -floop-strip-mine -floop-block -ffat-lto-objects -lstdc++ -fPIC -Wno-unused-but-set-variable -Wno-unused-local-typedefs -march=native -fstack-protector-strong --param ssp-buffer-size=4 -Wl,-rpath=/usr/local/lib/gcc49 -DLDAP_DEPRECATED -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc49  -DLIBO_INTERNAL_ONLY  -c $S/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx -o $W/CxxObject/ucb/source/ucp/webdav/SerfGetReqProcImpl.o  -I$S/ucb/source/ucp/webdav/ -isystem /usr/local/include/serf-1    -I$S/include  -I/usr/local/openjdk7/include -I/usr/local/openjdk7/include/freebsd -I/usr/local/openjdk7/include/bsd -I/usr/local/openjdk7/include/linux -I$S/config_host  -I$W/UnoApiHeadersTarget/udkapi/normal -I$W/UnoApiHeadersTarget/offapi/normal -I/usr/local/include   -isystem /usr/local/include/apr-1     -isystem /usr/include
[build CXX] ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx:26:0,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVAuthListener.hxx:24,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfRequestProcessorImpl.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx:23,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx:20:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfCopyReqProcImpl.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfCopyReqProcImpl.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx:19:0:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.o] Error 1
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx:26:0,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVAuthListener.hxx:24,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfRequestProcessorImpl.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx:23,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx:20:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfGetReqProcImpl.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfGetReqProcImpl.o] Error 1
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx:26:0,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVAuthListener.hxx:24,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx:25,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVResourceAccess.cxx:28:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/DAVResourceAccess.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/DAVResourceAccess.o] Error 1
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx:26:0,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVSessionFactory.hxx:30,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/webdavprovider.hxx:27,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/ContentProperties.cxx:26:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/ContentProperties.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/ContentProperties.o] Error 1
In file included from /usr/local/include/boost/config/select_stdlib_config.hpp:18:0,
                 from /usr/local/include/boost/config.hpp:40,
                 from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/local/include/boost/shared_ptr.hpp:17,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfSession.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfLockStore.hxx:28,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/AprEnv.hxx:25,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/AprEnv.cxx:20:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/AprEnv.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/AprEnv.o] Error 1
In file included from /usr/local/include/boost/config/select_stdlib_config.hpp:18:0,
                 from /usr/local/include/boost/config.hpp:40,
                 from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/local/include/boost/shared_ptr.hpp:17,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfSession.hxx:26,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/SerfCallbacks.cxx:22:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfCallbacks.o' failed
gmake[1]: *** [/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/SerfCallbacks.o] Error 1
In file included from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx:26:0,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVSessionFactory.hxx:30,
                 from /usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/ucb/source/ucp/webdav/DAVSessionFactory.cxx:20:
/usr/local/lib/gcc49/include/c++/cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
           ^
/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/solenv/gbuild/LinkTarget.mk:189: recipe for target '/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/workdir/CxxObject/ucb/source/ucp/webdav/DAVSessionFactory.o' failed
****
Comment 1 Julien Nabet 2015-10-20 17:55:36 UTC
Bjoern/Michael: Thought you might be interested in this one.
Comment 2 Michael Stahl (allotropia) 2015-10-20 19:31:09 UTC
so on Fedora 22 i have:

/usr/lib/gcc/x86_64-redhat-linux/5.1.1/include/stddef.h:typedef struct {
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/include/stddef.h:} max_align_t;

/usr/include/c++/5.1.1/cstddef:#include <stddef.h>
/usr/include/c++/5.1.1/cstddef:  using ::max_align_t;

... so if that doesn't work for you then i guess you have some issue
with the setup of your toolchain - maybe looking at preprocessor
output of the affected files could yield some insight.
Comment 3 Olivier 2015-10-21 19:18:26 UTC
@Michael, I have the same headers on 4.9.4. Although you're on GCC 5.1.1, I guess the linking process must be the same and therefore it must be a problem with the FreeBSD platform. I've tried various changes in the port's Makefile, but it doesn't change the outcome.

If nobody can reproduce on GCC 4.9, I guess this can be marked as "won't fix"
Comment 4 Michael Stahl (allotropia) 2015-10-22 12:50:10 UTC
can you try to build the offending file with something like this,
look at workdir/CxxObject/ucb/source/ucp/webdav/SerfGetReqProcImpl.o.ii
maybe it will be obvious then what the problem is,
most likely picking up a wrong system or GCC header somewhere

diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 0ce02d6..9a8cddb 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -55,8 +55,8 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(if $(5),$(gb_COMPILER_PLUGINS)) \
 		$(2) \
 		$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-		-c $(3) \
-		-o $(1) \
+		-E $(3) \
+		-o $(1).ii \
 		$(call gb_cxx_dep_generation_options,$(1),$(4)) \
 		-I$(dir $(3)) \
 		$(INCLUDE) \
Comment 5 Olivier 2015-10-22 15:03:18 UTC
Thanks. 
The gcc command given in the verbose output spits out the same error and no o.ii files are created, so I've just launched the whole thing to see if I would get some answers.

It stops quite early because of the missing objects, but the headers were found in other components.

Per example in workdir/CxxObject/sal/textenc/tcvtutf7.o.ii :

# 28 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/sal/config.h" 2
# 21 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/sal/textenc/tcvtutf7.cxx" 2

# 1 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/rtl/textcvt.h" 1
# 25 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/rtl/textcvt.h"
# 1 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/rtl/textenc.h" 1
# 29 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/rtl/textenc.h"
# 1 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/sal/types.h" 1
# 25 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/sal/types.h"
# 1 "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd9.3/4.9.4/include/stddef.h" 1 3 4
# 147 "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd9.3/4.9.4/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 422 "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd9.3/4.9.4/include/stddef.h" 3 4
typedef struct {
  long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
  long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
} max_align_t;


In workdir/CxxObject/codemaker/source/commoncpp/commoncpp.o.ii :

# 1 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx" 1
# 24 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx"
# 1 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/salhelperdllapi.h" 1
# 25 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx" 2

# 1 "/usr/local/lib/gcc49/include/c++/cstddef" 1 3
# 42 "/usr/local/lib/gcc49/include/c++/cstddef" 3

# 43 "/usr/local/lib/gcc49/include/c++/cstddef" 3


# 1 "/usr/local/lib/gcc49/gcc/x86_64-portbld-freebsd9.3/4.9.4/include/stddef.h" 1 3 4
# 46 "/usr/local/lib/gcc49/include/c++/cstddef" 2 3


namespace std
{

  using ::max_align_t;
}
# 27 "/usr/ports/editors/libreoffice/work/libreoffice-5.0.2.2/include/salhelper/simplereferenceobject.hxx" 2
Comment 6 Giuseppe Castagno (aka beppec56) 2016-08-01 12:39:07 UTC
(In reply to Olivier - interfaSys from comment #0)

> 
> Here is a partial of the error log
> 
> *************
> [build CXX] ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx

Probably you solved that already, anyway, are you trying to build the webdav serf library version (using --with-webdav="serf" in configuring) ?

The webdav version normally compiled in TDF build is the neon one: --with-webdav="neon".
It lives in ucb/source/ucp/webdav-neon.
Comment 7 Buovjaga 2016-09-18 18:34:31 UTC
(In reply to Giuseppe Castagno (aka beppec56) from comment #6)
> Probably you solved that already, anyway, are you trying to build the webdav
> serf library version (using --with-webdav="serf" in configuring) ?
> 
> The webdav version normally compiled in TDF build is the neon one:
> --with-webdav="neon".
> It lives in ucb/source/ucp/webdav-neon.

Set to NEEDINFO.
Olivier: Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 8 QA Administrators 2017-03-28 08:17:57 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2017-05-02 11:34:18 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20170502