Skip to contentSkip to conversation

lttng-ust cross compile broken for demo-tracef

PATCH New Jérémie Galarneau 2 participants 7 messages Apr 7, 2014 – Apr 8, 2014 6 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20140407114320.GA25948@hal

#1 lore raw

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

Quoted 23 lines · Jan Glauber

Hi list,

I get a compile error with current git head of lttng-ust if I cross-compile (bitbake):

| make[4]: Entering directory `/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'
| arm-linux-gnueabihf-gcc  -march=armv7-a     -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 --sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5 -L/home/jang/te
|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix this I get more errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 3 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

A message that is not in the archive (sent off-list or not yet received): CA+jJMxuPEipdetRy4ETyJ=LPARUOZq8a+dTKzP_esDS8zuonKQ@mail.gmail.com

#3 lore raw

Sure, it looks like there is a problem with python in lttng-get-tp:

| make[4]: Entering directory `/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp'
| ../../../tools/lttng-gen-tp -o sample_tracepoint.c sample_tracepoint.tp
|
CPPFLAGS="-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include -isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-I../../../include/ -I../../../include/" \
| CFLAGS="-Wall
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer -Wall -isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer" \
|
LDFLAGS="-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib -Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu
-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib -Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu -L../../../liblttng-ust/.libs/ -Wl,-rpath="/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/../../liblttng-ust/.libs/"" \
| CC="arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5"
\
| ../../../tools/lttng-gen-tp -o sample_tracepoint.o
sample_tracepoint.tp

| Invalid CC environment variable
| Traceback (most recent call last):
|   File "../../../tools/lttng-gen-tp", line 315, in <module>
|     sys.exit(main())
|   File "../../../tools/lttng-gen-tp", line 309, in main
|     dotobj.write()
|   File "../../../tools/lttng-gen-tp", line 132, in write
|     raise RuntimeError("No C Compiler detected")
| RuntimeError: No C Compiler detected
| make[4]: *** [sample_tracepoint.o] Error 1
| rm sample_tracepoint.c
| make[4]: Leaving directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | make[3]: *** [all-local] Error 1

--Jan

2014-04-07 15:57 GMT+02:00 Jérémie Galarneau <[email protected]

Quoted 47 lines

:

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

Quoted 3 lines · Jan Glauber

Hi list,

I get a compile error with current git head of lttng-ust if I

cross-compile (bitbake):

Quoted 2 lines

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'

Quoted 1 line

| arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork

(quoted diff) +0 -3
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5
-L/home/jang/te
Quoted 6 lines
|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix

this I get more

Quoted 11 lines

errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Quoted 5 lines

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): CAEiAFz2ugQhoA6RO7NbxAPNcii6tvc-qQoM9CaqDDW5LPSNT7w@mail.gmail.com

#5 lore raw
Quoted 22 lines · Jan Glauber

Sure, it looks like there is a problem with python in lttng-get-tp:

| make[4]: Entering directory `/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | ../../../tools/lttng-gen-tp -o sample_tracepoint.c sample_tracepoint.tp
|
CPPFLAGS="-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

(quoted diff) +0 -2
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-I../../../include/ -I../../../include/" \

| CFLAGS="-Wall

(quoted diff) +0 -4
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer -Wall
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer" \

| LDFLAGS="-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

(quoted diff) +0 -6
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu
-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu -L../../../liblttng-ust/.libs/
-Wl,-rpath="/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/../../liblttng-ust/.libs/""
Quoted 8 lines

\
| CC="arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 --sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5" \
| ../../../tools/lttng-gen-tp -o sample_tracepoint.o
sample_tracepoint.tp
| Invalid CC environment variable

Okay, this means that subprocess.call(cc, ...) (lttng-gen-tp:108) fails while trying to run your CC variable. Is arm-linux-gnueabihf-gcc in your PATH?

Jérémie

Quoted 71 lines
| Traceback (most recent call last):
|   File "../../../tools/lttng-gen-tp", line 315, in <module>
|     sys.exit(main())
|   File "../../../tools/lttng-gen-tp", line 309, in main
|     dotobj.write()
|   File "../../../tools/lttng-gen-tp", line 132, in write
|     raise RuntimeError("No C Compiler detected")
| RuntimeError: No C Compiler detected
| make[4]: *** [sample_tracepoint.o] Error 1
| rm sample_tracepoint.c
| make[4]: Leaving directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | make[3]: *** [all-local] Error 1

--Jan

2014-04-07 15:57 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 49 lines

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

Quoted 25 lines · Jan Glauber

Hi list,

I get a compile error with current git head of lttng-ust if I cross-compile (bitbake):

| make[4]: Entering directory `/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'
| arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork

(quoted diff) +0 -3
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5
-L/home/jang/te
|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix this I get more
errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

Quoted 4 lines

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

Signature · 3 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

A message that is not in the archive (sent off-list or not yet received): CA+jJMxtjWp-a1smz_hwZEVL70HQ6pKj2JXKXnUgxzg3QVR0HKA@mail.gmail.com

#7 lore raw

Yes:

$ which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc

IIRC the examples have not been build by default in the past, right?

2014-04-07 16:20 GMT+02:00 Jérémie Galarneau <[email protected]

Quoted 131 lines

:

Quoted 4 lines · Jan Glauber

Sure, it looks like there is a problem with python in lttng-get-tp:

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp'

Quoted 1 line

| ../../../tools/lttng-gen-tp -o sample_tracepoint.c

sample_tracepoint.tp

Quoted 2 lines

|

CPPFLAGS="-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

Quoted 1 line

-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

Quoted 3 lines

-I../../../include/ -I../../../include/" \
| CFLAGS="-Wall

-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

Quoted 2 lines

-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer -Wall

-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

Quoted 3 lines

-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer" \
|

LDFLAGS="-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

Quoted 1 line

-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

Quoted 2 lines

-Wl,-O1 -Wl,--hash-style=gnu

-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

Quoted 1 line

-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

Quoted 2 lines

-Wl,-O1 -Wl,--hash-style=gnu -L../../../liblttng-ust/.libs/

-Wl,-rpath="/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/../../liblttng-ust/.libs/""

Quoted 4 lines

\
| CC="arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15

--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5"

Quoted 4 lines

\
| ../../../tools/lttng-gen-tp -o sample_tracepoint.o
sample_tracepoint.tp
| Invalid CC environment variable

Okay, this means that subprocess.call(cc, ...) (lttng-gen-tp:108) fails while trying to run your CC variable. Is arm-linux-gnueabihf-gcc in your PATH?

Jérémie

Quoted 12 lines
| Traceback (most recent call last):
|   File "../../../tools/lttng-gen-tp", line 315, in <module>
|     sys.exit(main())
|   File "../../../tools/lttng-gen-tp", line 309, in main
|     dotobj.write()
|   File "../../../tools/lttng-gen-tp", line 132, in write
|     raise RuntimeError("No C Compiler detected")
| RuntimeError: No C Compiler detected
| make[4]: *** [sample_tracepoint.o] Error 1
| rm sample_tracepoint.c
| make[4]: Leaving directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp'

Quoted 21 lines

| make[3]: *** [all-local] Error 1

--Jan

2014-04-07 15:57 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 13 lines

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

On Mon, Apr 7, 2014 at 7:43 AM, Jan Glauber <[email protected]>

Quoted 7 lines · wrote:
Quoted 7 lines
Quoted 7 lines

Hi list,

I get a compile error with current git head of lttng-ust if I cross-compile (bitbake):

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

| arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15

--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5

Quoted 22 lines
Quoted 22 lines
Quoted 19 lines

-L/home/jang/te

|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix this I get more
errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Quoted 6 lines
Quoted 4 lines

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

Quoted 5 lines

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

A message that is not in the archive (sent off-list or not yet received): CAEiAFz3WC7tp4PRdOXE991reuNDm+qc86ughb8JrOw8R=whoKA@mail.gmail.com

#9 lore raw
Quoted 5 lines · Jan Glauber

Yes:

$ which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc

IIRC the examples have not been build by default in the past, right?

They have been for around a year. I think I found the issue:
lttng-gen-tp doesn't expect the CC variable to contain command line arguments.

Can you apply and test the following diff?

tools/lttng-gen-tp +1 -1
index a3a01f2..b62cd99 100755
@@ -94,7 +94,7 @@ class ObjFile:
         if 'CC' in os.environ:
             cc = os.environ['CC']
             try:
-                subprocess.call(cc,
+                subprocess.call(cc.split(),
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
             except OSError as msg:

Thanks,
Jérémie

Quoted 142 lines

2014-04-07 16:20 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 135 lines
Quoted 40 lines · Jan Glauber

Sure, it looks like there is a problem with python in lttng-get-tp:

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | ../../../tools/lttng-gen-tp -o sample_tracepoint.c
sample_tracepoint.tp
|

CPPFLAGS="-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

(quoted diff) +0 -2
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-I../../../include/ -I../../../include/" \

| CFLAGS="-Wall

(quoted diff) +0 -5
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer
-Wall
 
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer" \

|

LDFLAGS="-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

(quoted diff) +0 -6
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu
 
-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
 
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu -L../../../liblttng-ust/.libs/
 
-Wl,-rpath="/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/../../liblttng-ust/.libs/""

\
| CC="arm-linux-gnueabihf-gcc -march=armv7-a

(quoted diff) +0 -3
-mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
 
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5"
Quoted 4 lines

\
| ../../../tools/lttng-gen-tp -o sample_tracepoint.o
sample_tracepoint.tp
| Invalid CC environment variable

Okay, this means that subprocess.call(cc, ...) (lttng-gen-tp:108) fails while trying to run your CC variable. Is arm-linux-gnueabihf-gcc in your PATH?

Jérémie

Quoted 12 lines
| Traceback (most recent call last):
|   File "../../../tools/lttng-gen-tp", line 315, in <module>
|     sys.exit(main())
|   File "../../../tools/lttng-gen-tp", line 309, in main
|     dotobj.write()
|   File "../../../tools/lttng-gen-tp", line 132, in write
|     raise RuntimeError("No C Compiler detected")
| RuntimeError: No C Compiler detected
| make[4]: *** [sample_tracepoint.o] Error 1
| rm sample_tracepoint.c
| make[4]: Leaving directory
Quoted 63 lines

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | make[3]: *** [all-local] Error 1

--Jan

2014-04-07 15:57 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 52 lines

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

Quoted 27 lines · Jan Glauber

Hi list,

I get a compile error with current git head of lttng-ust if I cross-compile (bitbake):

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'
| arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork

(quoted diff) +0 -3
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
 
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5
-L/home/jang/te
|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix this I get more
errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

Quoted 4 lines

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

Signature · 3 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

A message that is not in the archive (sent off-list or not yet received): CA+jJMxuaxABSCf7iWJNS2==B8nQAB8VSPhRSojMeSEesWzx0xA@mail.gmail.com

#11 lore raw
Quoted 10 lines · Jérémie Galarneau
Quoted 5 lines · Jan Glauber

Yes:

$ which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc

IIRC the examples have not been build by default in the past, right?

They have been for around a year. I think I found the issue:
lttng-gen-tp doesn't expect the CC variable to contain command line arguments.

I've been on version 2.2.

Quoted 1 line

Can you apply and test the following diff?

Yes, that fixes the issue!

Many thanks,
Jan

Quoted 167 lines
tools/lttng-gen-tp +1 -1
index a3a01f2..b62cd99 100755
@@ -94,7 +94,7 @@ class ObjFile:
         if 'CC' in os.environ:
             cc = os.environ['CC']
             try:
-                subprocess.call(cc,
+                subprocess.call(cc.split(),
                                 stdout=subprocess.PIPE,
                                 stderr=subprocess.PIPE)
             except OSError as msg:

Thanks,
Jérémie

Quoted 142 lines

2014-04-07 16:20 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 135 lines
Quoted 40 lines · Jan Glauber

Sure, it looks like there is a problem with python in lttng-get-tp:

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | ../../../tools/lttng-gen-tp -o sample_tracepoint.c
sample_tracepoint.tp
|

CPPFLAGS="-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include

(quoted diff) +0 -2
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-I../../../include/ -I../../../include/" \

| CFLAGS="-Wall

(quoted diff) +0 -5
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer
-Wall
 
-isystem/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/include
-O2 -pipe -g -feliminate-unused-debug-types -fno-omit-frame-pointer" \

|

LDFLAGS="-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib

(quoted diff) +0 -6
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu
 
-L/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
 
-Wl,-rpath-link,/home/jang/temp/p4/JGlauber_hal_share/poky/../toolchain//arm-linux-gnueabihf/lib
-Wl,-O1 -Wl,--hash-style=gnu -L../../../liblttng-ust/.libs/
 
-Wl,-rpath="/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/../../liblttng-ust/.libs/""

\
| CC="arm-linux-gnueabihf-gcc -march=armv7-a

(quoted diff) +0 -3
-mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
 
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5"
Quoted 4 lines

\
| ../../../tools/lttng-gen-tp -o sample_tracepoint.o
sample_tracepoint.tp
| Invalid CC environment variable

Okay, this means that subprocess.call(cc, ...) (lttng-gen-tp:108) fails while trying to run your CC variable. Is arm-linux-gnueabihf-gcc in your PATH?

Jérémie

Quoted 12 lines
| Traceback (most recent call last):
|   File "../../../tools/lttng-gen-tp", line 315, in <module>
|     sys.exit(main())
|   File "../../../tools/lttng-gen-tp", line 309, in main
|     dotobj.write()
|   File "../../../tools/lttng-gen-tp", line 132, in write
|     raise RuntimeError("No C Compiler detected")
| RuntimeError: No C Compiler detected
| make[4]: *** [sample_tracepoint.o] Error 1
| rm sample_tracepoint.c
| make[4]: Leaving directory
Quoted 63 lines

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/gen-tp' | make[3]: *** [all-local] Error 1

--Jan

2014-04-07 15:57 GMT+02:00 Jérémie Galarneau
<[email protected]>:

Quoted 52 lines

Hi Jan,

Can you post the errors you get if you set the "CC=gcc" line in demo-tracef/Makefile by

ifdef AM_CC

    CC = $(AM_CC)

endif

Regards,
Jérémie

Quoted 27 lines · Jan Glauber

Hi list,

I get a compile error with current git head of lttng-ust if I cross-compile (bitbake):

| make[4]: Entering directory

`/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/work/armv7ahf-vfp-neon-elina-linux-gnueabi/lttng-ust-2.4-r0/git/doc/examples/demo-tracef'
| arm-linux-gnueabihf-gcc -march=armv7-a -mthumb-interwork

(quoted diff) +0 -3
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a15
 
--sysroot=/home/jang/temp/p4/JGlauber_hal_share/poky/build/tmp/sysroots/omap5
-L/home/jang/te
|               -o demo-tracef demo-tracef.o -ldl -llttng-ust
| demo-tracef.o: file not recognized: File format not recognized
| collect2: error: ld returned 1 exit status
| make[4]: *** [demo-tracef] Error 1

Looks like the demo-tracef Makefile sets CC hard to gcc. But if I fix this I get more
errors which I don't undertand. Am I the only one running into this?

thx, Jan
---
Harman Becker Automotive GmbH
System Profiling & Optimizing Team

Quoted 4 lines

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

Signature · 3 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
#12 lore raw

PATCH 1/1 Fix: Use $AM_CC when it is defined instead of gcc in demo-tracef

In reply to a message not in the archive
---
 doc/examples/demo-tracef/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
doc/examples/demo-tracef/Makefile +4 -1
index 644acdc..40e9a58 100644
@@ -15,7 +15,10 @@
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-CC = gcc
+ifdef AM_CC
+	CC = $(AM_CC)
+endif
+
 LIBS = -ldl -llttng-ust	# On Linux
 #LIBS = -lc	# On BSD
 LOCAL_CPPFLAGS += -I.
Signature · 7 lines
1.9.1


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev