lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
* Re: Wrong "ar" used when cross-building lttng
       [not found] <2357817.GzqeBO7jDX@devpool35>
@ 2019-11-14 16:01 ` Simon Marchi
       [not found] ` <2e655403-71d2-ee11-3675-d9ad81d6fe85@simark.ca>
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Marchi @ 2019-11-14 16:01 UTC (permalink / raw)
  To: Rolf Eike Beer, lttng-dev

On 2019-11-14 2:58 a.m., Rolf Eike Beer wrote:
> The unprefixed version of "ar" is being used, leading to this error:
> 
> arm-unknown-linux-gnueabi-gcc  -I. -Wall -I../../../include/ -I../../../
> include/ \
>         -O2 -g -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-
> abi=hard -mthumb-interwork -pipe -Wl,--no-copy-dt-needed-entries,--as-needed -
> Wl,--build-id -Wdate-time -c -o lttng-ust-provider-hello.o tp.c
> ar -rc lttng-ust-provider-hello.a lttng-ust-provider-hello.o
> make[4]: ar: Command not found
> 
> I fixed it for the moment with "make AR=arm-unknown-linux-gnueabi-ar", but 
> ideally this would not be needed.
> 
> Greetings,
> 
> Eike
> -- 
> Rolf Eike Beer, emlix GmbH, http://www.emlix.com
> Fon +49 551 30664-0, Fax +49 551 30664-11
> Gothaer Platz 3, 37083 Göttingen, Germany
> Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
> Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
> 
> emlix - smart embedded open source

Hi Rofl,

Indeed, I can see the problem.

Can you please try the patch below?  It adds an autoconf check for ar and then passes
it as an environment variable to the Makefiles of doc/examples.

Note that the Makefiles in doc/examples are written by hand to be standalone on purpose,
so that one can easily copy them to bootstrap their project (at least that's what I
supposed).  This means that doc/examples/hello-static-lib/Makefile is not directly
influenced by the configure checks.  It will not pick up the right tools if you
run "make" directly in  doc/examples/hello-static-lib, but only if you run it from a
directory above.

Simon


From cb819ba1e9dbba612dd22d143c4fb57185b6ac7b Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Thu, 14 Nov 2019 10:54:34 -0500
Subject: [PATCH] doc: pass AR when building examples

---
 configure.ac             | 1 +
 doc/examples/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 001c44289790..e07888c093fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,7 @@ AS_IF([test "x${ax_cv_sys_weak_alias}" = "xno"], [
 ])

 # Checks for programs.
+AM_PROG_AR
 AC_PROG_SED
 AC_PROG_GREP
 AC_PROG_LN_S
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index d5d00b090c61..2d8b86d1001a 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -123,7 +123,7 @@ all-local:
 		rel_build_subdir="../"; \
 	fi; \
 	for subdir in $(SUBDIRS_PROXY); do \
-		(cd $$subdir && $(MAKE) CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" AM_CPPFLAGS="$(AM_CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" CFLAGS='$(CFLAGS)' AM_CFLAGS='$(AM_CFLAGS)' LDFLAGS="$(LDFLAGS)" AM_LDFLAGS='$(AM_LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" AM_V_P="$(AM_V_P)" AM_V_at="$(AM_V_at)" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
+		(cd $$subdir && $(MAKE) AR="$(AR)" CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" AM_CPPFLAGS="$(AM_CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" CFLAGS='$(CFLAGS)' AM_CFLAGS='$(AM_CFLAGS)' LDFLAGS="$(LDFLAGS)" AM_LDFLAGS='$(AM_LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" AM_V_P="$(AM_V_P)" AM_V_at="$(AM_V_at)" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
 	done; \
 	if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
 		for subdir in $(SUBDIRS_JUL); do \
-- 
2.24.0


_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Wrong "ar" used when cross-building lttng
       [not found] ` <2e655403-71d2-ee11-3675-d9ad81d6fe85@simark.ca>
@ 2019-11-14 16:24   ` Rolf Eike Beer
       [not found]   ` <3241563.NbJrRt7XGO@devpool35>
  1 sibling, 0 replies; 7+ messages in thread
From: Rolf Eike Beer @ 2019-11-14 16:24 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1518 bytes --]

Simon Marchi wrote:
> On 2019-11-14 2:58 a.m., Rolf Eike Beer wrote:
> > The unprefixed version of "ar" is being used, leading to this error:
> > 
> > arm-unknown-linux-gnueabi-gcc  -I. -Wall -I../../../include/ -I../../../
> > include/ \
> > 
> >         -O2 -g -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-
> > 
> > abi=hard -mthumb-interwork -pipe
> > -Wl,--no-copy-dt-needed-entries,--as-needed - Wl,--build-id -Wdate-time
> > -c -o lttng-ust-provider-hello.o tp.c
> > ar -rc lttng-ust-provider-hello.a lttng-ust-provider-hello.o
> > make[4]: ar: Command not found
> > 
> > I fixed it for the moment with "make AR=arm-unknown-linux-gnueabi-ar", but
> > ideally this would not be needed.
> > 
> > Greetings,
> > 
> > Eike
> 
> Hi Rofl,
> 
> Indeed, I can see the problem.
> 
> Can you please try the patch below?  It adds an autoconf check for ar and
> then passes it as an environment variable to the Makefiles of doc/examples.

Works for me.

I have not checked latest git, but maybe you may want to fix this warning, 
too?

With 2.11.0 release tarball:

-./configure: line 24663: test: -eq: unary operator expected

Greetings,

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Wrong "ar" used when cross-building lttng
       [not found]   ` <3241563.NbJrRt7XGO@devpool35>
@ 2019-11-14 16:43     ` Simon Marchi
       [not found]     ` <3c62ba15-bb2d-702e-86f4-90e8decc9fb1@simark.ca>
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Marchi @ 2019-11-14 16:43 UTC (permalink / raw)
  To: Rolf Eike Beer, lttng-dev

On 2019-11-14 11:24 a.m., Rolf Eike Beer wrote:
> Works for me.

Thanks.

> I have not checked latest git, but maybe you may want to fix this warning, 
> too?
> 
> With 2.11.0 release tarball:
> 
> -./configure: line 24663: test: -eq: unary operator expected
> 
> Greetings,
> 
> Eike

Hmm I don't remember seeing this error, and I don't see it now.

Could you please try with master?  If it still happens, you can try to
find from which line of the configure.ac or an m4 file this line comes
from.  I presume it won't be too hard to fix.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Wrong "ar" used when cross-building lttng
       [not found]     ` <3c62ba15-bb2d-702e-86f4-90e8decc9fb1@simark.ca>
@ 2019-11-15  8:18       ` Rolf Eike Beer
       [not found]       ` <4096513.X5kWAsihKE@devpool35>
  1 sibling, 0 replies; 7+ messages in thread
From: Rolf Eike Beer @ 2019-11-15  8:18 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 1325 bytes --]

Simon Marchi wrote:
> On 2019-11-14 11:24 a.m., Rolf Eike Beer wrote:

> > I have not checked latest git, but maybe you may want to fix this warning,
> > too?
> > 
> > With 2.11.0 release tarball:
> > 
> > -./configure: line 24663: test: -eq: unary operator expected

> Hmm I don't remember seeing this error, and I don't see it now.
> 
> Could you please try with master?  If it still happens, you can try to
> find from which line of the configure.ac or an m4 file this line comes
> from.  I presume it won't be too hard to fix.

Sorry, my fault. If I had looked a little closer I could have given you the 
context:

 checking for tput... /usr/bin/tput
 tput: No value for $TERM and no -T specified
./configure: line 24663: test: -eq: unary operator expected

When the package is built inside our automated buildsystem these variables are 
not set because this is no interactive shell. If I build with an interactive 
shell these warnings are in fact not there.

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Wrong "ar" used when cross-building lttng
       [not found]       ` <4096513.X5kWAsihKE@devpool35>
@ 2019-11-15 15:34         ` Simon Marchi
       [not found]         ` <50ff7646-3ca9-0fdd-f9bf-6bfa8e63bad3@simark.ca>
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Marchi @ 2019-11-15 15:34 UTC (permalink / raw)
  To: Rolf Eike Beer, lttng-dev

On 2019-11-15 3:18 a.m., Rolf Eike Beer wrote:
> Simon Marchi wrote:
>> On 2019-11-14 11:24 a.m., Rolf Eike Beer wrote:
> 
>>> I have not checked latest git, but maybe you may want to fix this warning,
>>> too?
>>>
>>> With 2.11.0 release tarball:
>>>
>>> -./configure: line 24663: test: -eq: unary operator expected
> 
>> Hmm I don't remember seeing this error, and I don't see it now.
>>
>> Could you please try with master?  If it still happens, you can try to
>> find from which line of the configure.ac or an m4 file this line comes
>> from.  I presume it won't be too hard to fix.
> 
> Sorry, my fault. If I had looked a little closer I could have given you the 
> context:
> 
>  checking for tput... /usr/bin/tput
>  tput: No value for $TERM and no -T specified
> ./configure: line 24663: test: -eq: unary operator expected
> 
> When the package is built inside our automated buildsystem these variables are 
> not set because this is no interactive shell. If I build with an interactive 
> shell these warnings are in fact not there.

It still sounds like the "test" command should be improved, it should not fail with
an invalid syntax.  Can you give us the relevant lines of configure around 24663,
and if possible match them to the source lines in configure.ac and/or one of the
m4 files in the m4 directory?

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Wrong "ar" used when cross-building lttng
       [not found]         ` <50ff7646-3ca9-0fdd-f9bf-6bfa8e63bad3@simark.ca>
@ 2019-11-18  8:10           ` Rolf Eike Beer
  0 siblings, 0 replies; 7+ messages in thread
From: Rolf Eike Beer @ 2019-11-18  8:10 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 2070 bytes --]

Am Freitag, 15. November 2019, 16:34:33 CET schrieb Simon Marchi:
> On 2019-11-15 3:18 a.m., Rolf Eike Beer wrote:
> > Simon Marchi wrote:
> >> On 2019-11-14 11:24 a.m., Rolf Eike Beer wrote:
> >>> I have not checked latest git, but maybe you may want to fix this
> >>> warning,
> >>> too?
> >>> 
> >>> With 2.11.0 release tarball:
> >>> 
> >>> -./configure: line 24663: test: -eq: unary operator expected
> >> 
> >> Hmm I don't remember seeing this error, and I don't see it now.
> >> 
> >> Could you please try with master?  If it still happens, you can try to
> >> find from which line of the configure.ac or an m4 file this line comes
> >> from.  I presume it won't be too hard to fix.
> > 
> > Sorry, my fault. If I had looked a little closer I could have given you
> > the
> > 
> > context:
> >  checking for tput... /usr/bin/tput
> >  tput: No value for $TERM and no -T specified
> > 
> > ./configure: line 24663: test: -eq: unary operator expected
> > 
> > When the package is built inside our automated buildsystem these variables
> > are not set because this is no interactive shell. If I build with an
> > interactive shell these warnings are in fact not there.
> 
> It still sounds like the "test" command should be improved, it should not
> fail with an invalid syntax.  Can you give us the relevant lines of
> configure around 24663, and if possible match them to the source lines in
> configure.ac and/or one of the m4 files in the m4 directory?

The line in configure is this:

    if test -n "$PS1" && test `"$pprint_tput" colors` -eq 256 && test -t 1; 
then :

Which seems to be one of these 3 lines from configure.ac:

PPRINT_INIT
PPRINT_SET_INDENT(1)
PPRINT_SET_TS(38)

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Wrong "ar" used when cross-building lttng
@ 2019-11-14  7:58 Rolf Eike Beer
  0 siblings, 0 replies; 7+ messages in thread
From: Rolf Eike Beer @ 2019-11-14  7:58 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 933 bytes --]

The unprefixed version of "ar" is being used, leading to this error:

arm-unknown-linux-gnueabi-gcc  -I. -Wall -I../../../include/ -I../../../
include/ \
        -O2 -g -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-
abi=hard -mthumb-interwork -pipe -Wl,--no-copy-dt-needed-entries,--as-needed -
Wl,--build-id -Wdate-time -c -o lttng-ust-provider-hello.o tp.c
ar -rc lttng-ust-provider-hello.a lttng-ust-provider-hello.o
make[4]: ar: Command not found

I fixed it for the moment with "make AR=arm-unknown-linux-gnueabi-ar", but 
ideally this would not be needed.

Greetings,

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-18  8:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2357817.GzqeBO7jDX@devpool35>
2019-11-14 16:01 ` Wrong "ar" used when cross-building lttng Simon Marchi
     [not found] ` <2e655403-71d2-ee11-3675-d9ad81d6fe85@simark.ca>
2019-11-14 16:24   ` Rolf Eike Beer
     [not found]   ` <3241563.NbJrRt7XGO@devpool35>
2019-11-14 16:43     ` Simon Marchi
     [not found]     ` <3c62ba15-bb2d-702e-86f4-90e8decc9fb1@simark.ca>
2019-11-15  8:18       ` Rolf Eike Beer
     [not found]       ` <4096513.X5kWAsihKE@devpool35>
2019-11-15 15:34         ` Simon Marchi
     [not found]         ` <50ff7646-3ca9-0fdd-f9bf-6bfa8e63bad3@simark.ca>
2019-11-18  8:10           ` Rolf Eike Beer
2019-11-14  7:58 Rolf Eike Beer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).