Bug 209921 - editors/libreoffice: Fix build with libc++ 3.8.0
Summary: editors/libreoffice: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-06-01 06:56 UTC by Dimitry Andric
Modified: 2016-11-30 08:13 UTC (History)
0 users

See Also:


Attachments
Work around -isystem strangeness in libreoffice build system (545 bytes, patch)
2016-06-01 06:56 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-06-01 06:56:43 UTC
Created attachment 170898 [details]
Work around -isystem strangeness in libreoffice build system

After libc++ 3.8.0 was imported in r300770 (see also bug 208158), Antoine found that editors/libreoffice failed with the following errors [1]:

In file included from /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/ucb/source/ucp/webdav/AprEnv.cxx:20:
In file included from /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/ucb/source/ucp/webdav/AprEnv.hxx:25:
In file included from /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-5.0.6.3/ucb/source/ucp/webdav/SerfLockStore.hxx:24:
In file included from /usr/include/c++/v1/map:442:
In file included from /usr/include/c++/v1/__tree:15:
In file included from /usr/include/c++/v1/iterator:343:
In file included from /usr/include/c++/v1/__functional_base:15:
In file included from /usr/include/c++/v1/type_traits:363:
/usr/include/c++/v1/cstddef:43:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
1 error generated.

This is because libreoffice's build system transforms some of the -I options passed via the port Makefile to -isystem, and one of those options is -I/usr/include, which screws up the include path order for C++ programs.  It turns out the -I/usr/include path is brought in via OPENSSL_CFLAGS, so set that to a single space to work around this.  (Note that OPENSSL_CFLAGS cannot be empty, otherwise the configure script will complain about not being able to find openssl.)

[1] http://beefy4.nyi.freebsd.org/data/head-amd64-default/p415968_s300895/logs/errors/libreoffice-5.0.6.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-11-30 08:13:52 UTC
Obsolete after ports r416875.