internal openldap build fails when exporting FLAGS

Maarten Hoes hoes.maarten at gmail.com
Sat Dec 20 12:41:20 PST 2014


Hi,


I made the minimum amount of change I needed, and submitted a patch to
gerrit for review.

https://gerrit.libreoffice.org/13568

- Maarten



On Sat, Dec 20, 2014 at 12:23 PM, Maarten Hoes <hoes.maarten at gmail.com>
wrote:

> Hi,
>
>
> For lcov code coverage purposes, I have to build libreoffice with the
> following FLAGS set and exported :
>
> LDFLAGS='-fprofile-arcs' CFLAGS='-fprofile-arcs -ftest-coverage'
> CXXFLAGS='-fprofile-arcs -ftest-coverage' CPPFLAGS='-fprofile-arcs
> -ftest-coverage'
> export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
>
> And then proceed with
>
> ./autogen.sh --enable-python=internal --disable-online-update
> --without-system-libs --without-system-headers
> make build-nocheck
>
> I run into a build error of the internal openldap version, with undefined
> references to  '__gcov_'. This shouldnt happen when setting
> FLAGS+='-fprofile-arcs -ftest-coverage' ... But it looks like '-lgcov' isnt
> passed to the linker properly (which should happen by setting
> LDFLAGS='-fprofile-arcs'). It appears that the FLAGS arent being passed
> down correctly in here :
>
> external/openldap/ExternalProject_openldap.mk
>
> Where at multiple points it appears that all current
> CFLAGS/CPPFLAGS/LDFLAGS are overwritten with entries like this:
>
> LDFLAGS = foo
> CPPFLAGS= bar
>
> instead of something like this
>
> LDFLAGS="$(LDFLAGS) foo"
> CPPFLAGS="$(CPPFLAGS) bar"
>
> It seems easy enough to modify, but I cant figure out if this was done on
> purpose for some reason, or if it can be modified without causing issues ?
> Perhaps only the (last) line with LDFLAGS can/needs to be changed, and the
> other FLAGS need to be left as they are ? For me, internal openldap builds
> without issues when making the modifications (see attached diff).
>
>
> All thoughts and comments are more than appreciated,
>
>
>
> - Maarten
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20141220/d4167de5/attachment.html>


More information about the LibreOffice mailing list