From: Carlos Santos <casantos@datacom.ind.br>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] gtest: update recipe to use autotools
Date: Wed, 22 Apr 2015 17:20:13 -0300 (BRT) [thread overview]
Message-ID: <1807080175.472707.1429734013061.JavaMail.zimbra@datacom.ind.br> (raw)
In-Reply-To: <CAHkwnC-cZpP5m5009NiLZM07+t8CFSYVxqTBmNuXEA-x9mGwLg@mail.gmail.com>
----- Original Message -----
> From: "Fabio Porcedda" <fabio.porcedda@gmail.com>
> To: "Carlos Santos" <casantos@datacom.ind.br>
> Cc: buildroot at buildroot.org
> Sent: Sunday, April 19, 2015 8:17:00 AM
> Subject: Re: [Buildroot] [PATCH 1/1] gtest: update recipe to use autotools
> On Mon, Mar 2, 2015 at 1:52 PM, Carlos Santos <casantos@datacom.ind.br> wrote:
>> The previous recipe build gtest using cmake, which prevented compiling
>> gmock (to be submitted in a following patch).
>>
>> Gmock requires the gtest-config script, which is installed only if gtest
>> is built with autotools.
>
>
> Because the autotools build script is no longer officially supported
> [1] it would be better to use cmake, there is no way to generate the
> gtest-config script within cmake?
OK, I will look for an alternative using CMake.
>
> [1]:
> gtest-1.7.0/README:
> The Autotools build script (configure + make) is no longer officially
> supportted. You are encouraged to migrate to your own build system or
> use CMake. If you still need to use Autotools, you can find
> instructions in the README file from Google Test 1.4.0.
>
>
>
>> Signed-off-by: Marcelo Barbosa <marcelo.barbosa@datacom.ind.br>
>> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
>> ---
>> package/gtest/gtest.mk | 16 ++++------------
>> 1 file changed, 4 insertions(+), 12 deletions(-)
>>
>> diff --git a/package/gtest/gtest.mk b/package/gtest/gtest.mk
>> index 7129c93..e148462 100644
>> --- a/package/gtest/gtest.mk
>> +++ b/package/gtest/gtest.mk
>> @@ -12,24 +12,16 @@ GTEST_INSTALL_TARGET = NO
>> GTEST_LICENSE = BSD-3c
>> GTEST_LICENSE_FILES = LICENSE
>>
>> -# While it is possible to build gtest as shared library, using this gtest
>> shared
>> -# library requires to set some special configure option in the project using
>> -# gtest.
>> -# So, force to build gtest as a static library.
>> -#
>> -# For further details, refer to the explaination given in the README file from
>> -# the gtest sources.
>> -GTEST_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF
>> -
>> define GTEST_EXTRACT_CMDS
>> $(UNZIP) $(DL_DIR)/$(GTEST_SOURCE) -d $(BUILD_DIR)
>> endef
>>
>> define GTEST_INSTALL_STAGING_CMDS
>> - $(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a
>> - $(INSTALL) -D -m 0755 $(@D)/libgtest_main.a
>> $(STAGING_DIR)/usr/lib/libgtest_main.a
>> + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgtest.a
>> $(STAGING_DIR)/usr/lib/libgtest.a
>> + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgtest_main.a
>> $(STAGING_DIR)/usr/lib/libgtest_main.a
>> + $(INSTALL) -D -m 0755 $(@D)/scripts/gtest-config
>> $(STAGING_DIR)/usr/lib/scripts/gtest-config
>> $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/
>> cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/
>> endef
>>
>> -$(eval $(cmake-package))
>> +$(eval $(autotools-package))
>> --
>> 1.8.3.1
>
> This patch apply fine, but it fails to install the gtest package:
>
> defconfig:
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_PACKAGE_GTEST=y
>
>>>> gtest 1.7.0 Installing to staging directory
> /usr/bin/install -D -m 0755
> /home/tetsuya/buildroot/br/output/build/gtest-1.7.0/lib/.libs/libgtest.a
> /home/tetsuya/buildroot/br/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libgtest.a
> /usr/bin/install: cannot stat
> ?/home/tetsuya/buildroot/br/output/build/gtest-1.7.0/lib/.libs/libgtest.a?:
> No such file or directory
> package/pkg-generic.mk:203: recipe for target
> '/home/tetsuya/buildroot/br/output/build/gtest-1.7.0/.stamp_staging_installed'
> failed
> make: ***
> [/home/tetsuya/buildroot/br/output/build/gtest-1.7.0/.stamp_staging_installed]
> Error 1
Ouch! It requires forcing autotools to build the static libraries. I will update the patch accordingly.
> BR
> --
> Fabio Porcedda
Carlos Santos (Casantos)
DATACOM, P&D
next prev parent reply other threads:[~2015-04-22 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 12:52 [Buildroot] [PATCH 1/1] gtest: update recipe to use autotools Carlos Santos
2015-04-19 11:17 ` Fabio Porcedda
2015-04-22 20:20 ` Carlos Santos [this message]
2015-04-22 20:29 ` [Buildroot] [PATCH v2 " Carlos Santos
2015-04-22 20:46 ` Thomas Petazzoni
2015-04-23 11:23 ` Carlos Santos
2015-04-23 20:14 ` Arnout Vandecappelle
2015-04-25 9:25 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1807080175.472707.1429734013061.JavaMail.zimbra@datacom.ind.br \
--to=casantos@datacom.ind.br \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox