Syntax error running lttng
Hi,
I have compiled LTTNG for ARM but when I try to run the executable, I get this error:
lttng: line 1: syntax error: unexpected "("
E.G. lttng create my-kernel-session
--output=/mnt/sd1/nfs/temp/Innotech/lttng/my-kernel-trace
lttng list --kernel
lttng-sessiond
all produce the same error.
There were no compiler errors. I am at a loss to understand what it is complaining about from the message.
Modules seem to load fine.
~ # lsmod
Module Size Used by Tainted: G
lttng_ring_buffer_client_discard 20480 0
lttng_ring_buffer_client_mmap_discard 20480 0
lttng_ring_buffer_metadata_mmap_client 16384 0
lttng_ring_buffer_metadata_client 16384 0
lttng_ring_buffer_event_notifier_client 16384 0
lttng_ring_buffer_client_overwrite 20480 0
lttng_tracer 1167360 6
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_metadata_mmap_client,lttng_ring_buffer_metadata_client,lttng_ri ng_buffer_event_notifier_client,lttng_ring_buffer_client_overwrite
lttng_kprobes 16384 1 lttng_tracer
lttng_lib_ring_buffer 57344 7
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_metadata_mmap_client,lttng_ring_buffer_metadata_client,lttng_ri ng_buffer_event_notifier_client,lttng_ring_buffer_client_overwrite,lttng_tra cer
lttng_kretprobes 16384 1 lttng_tracer
lttng_statedump 20480 1 lttng_tracer
lttng_wrapper 16384 2 lttng_tracer,lttng_statedump
lttng_clock 16384 4
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_client_overwrite,lttng_tracer
Any suggestions appreciated.
Thank you.
Merlin
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Hi,
Quoted 6 lines · Merlin via lttng-dev
Hi,
I have compiled LTTNG for ARM but when I try to run the executable, I get this error:
Do you have any of the logs for the lttng-tools project?
That would be config.log and the output from make and make install
Quoted 4 lines
lttng: line 1: syntax error: unexpected "("
Hmmm that does not look like an error from a elf executable.
Do you have any bash or shell alias for the lttng command?
Please provide the output of the following commands:
$ file $(which lttng) $ head -n 10 $(which lttng)
Quoted 1 line
lttng-sessiond
If this happens also on the lttng-sessiond via command line but works using a service, it would point to weird shell setup.
Quoted 7 lines
all produce the same error.
There were no compiler errors. I am at a loss to understand what it is complaining about from the message.
Me too.
Quoted 4 lines
Modules seem to load fine.
Modules are loaded by the lttng-sessiond executable. Here only the CLI executable seems to be having some problem.
Signature · 6 lines
Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Hi,
Thank you for the response.
I have it installed on a small ARM computer that does not feature many tools, specifically file & which are missing.
I don't have any shell aliases and the output of find is:
~ # find / -name "lttng" 2>/dev/null
/mnt/sd1/modulesLTTNG/lttng
/mnt/sd1/modulesLTTNG/lttng/usr/local/bin/lttng
/mnt/sd1/modulesLTTNG/lttng/usr/local/lib/lttng
~ #Limiting it to finding files is only the one:
~ # find / -name "lttng" -type f 2>/dev/null /mnt/sd1/modulesLTTNG/lttng/usr/local/bin/lttng ~ #
head -n 10 /mnt/sd1/modulesLTTNG/lttng/usr/local/bin/lttng
outputs binary, examining it on the build computer shows it is an ELF
executable built for ARM
I didn't set up the shell so that could be questionable, but I'm not sure exactly how.
I couldn't find that error message in the lttng source but to me it looked a little like errors I have seen from libXML (possibly reaching for straws).
The error message looks like it is trying to read some sort of configuration file and failing.
This is a link to the config.log
https://drive.google.com/file/d/1_3QQEbfMcnS2_jX-MzJFO1JdGAArRRwW/view?usp=s
haring
I don't have the make output available at the moment but I can regenerate it tomorrow if it will help.
-----Original Message-----
From: Jonathan Rajotte-Julien <[email protected]>
Sent: Wednesday, 2 June 2021 04:56
To: [email protected]
Cc: [email protected]
Subject: Re: [lttng-dev] Syntax error running lttng
Hi,
Quoted 6 lines · Merlin via lttng-dev
Hi,
I have compiled LTTNG for ARM but when I try to run the executable, I get this error:
Do you have any of the logs for the lttng-tools project?
That would be config.log and the output from make and make install
Quoted 4 lines
lttng: line 1: syntax error: unexpected "("
Hmmm that does not look like an error from a elf executable.
Do you have any bash or shell alias for the lttng command?
Please provide the output of the following commands:
$ file $(which lttng) $ head -n 10 $(which lttng)
Quoted 1 line
lttng-sessiond
If this happens also on the lttng-sessiond via command line but works using a service, it would point to weird shell setup.
Quoted 7 lines
all produce the same error.
There were no compiler errors. I am at a loss to understand what it is complaining about from the message.
Me too.
Quoted 4 lines
Modules seem to load fine.
Modules are loaded by the lttng-sessiond executable. Here only the CLI executable seems to be having some problem.
--
Jonathan Rajotte-Julien
EfficiOS
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Hi,
Side note: not sure what is wrong with my email setup or the mailing list but I cannot see the reply you sent in my email folder, but it is available here:
https://lists.lttng.org/pipermail/lttng-dev/2021-June/030021.html
In any case, this look strangely like the problem seen in [1][2]. Considering your cross compilation setup I would take a deeper look at the generated executable both locally and when on the device.
The file command is a must here I think.
[1] https://unix.stackexchange.com/questions/336436/syntax-error-unexpected-when-execute-a-compiled-c-program
[2] https://unix.stackexchange.com/questions/499641/syntax-error-unexpected-when-execute-a-cross-compiled-pjsip-binary-in-arm
Not sure if this is exactly your problem. strace might give a bit more info on what is going on and at least see if the problem is lttng or anything else.
Cheers
Quoted 89 lines · Merlin via lttng-dev
Hi,
I have compiled LTTNG for ARM but when I try to run the executable, I get this error:
lttng: line 1: syntax error: unexpected "("
E.G. lttng create my-kernel-session
--output=/mnt/sd1/nfs/temp/Innotech/lttng/my-kernel-tracelttng list --kernel
lttng-sessiond
all produce the same error.
There were no compiler errors. I am at a loss to understand what it is complaining about from the message.
Modules seem to load fine.
~ # lsmod
Module Size Used by Tainted: G
lttng_ring_buffer_client_discard20480 0
lttng_ring_buffer_client_mmap_discard20480 0
lttng_ring_buffer_metadata_mmap_client16384 0
lttng_ring_buffer_metadata_client16384 0
lttng_ring_buffer_event_notifier_client16384 0
lttng_ring_buffer_client_overwrite20480 0
lttng_tracer1167360 6
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_metadata_mmap_client,lttng_ring_buffer_metadata_client,lttng_ri ng_buffer_event_notifier_client,lttng_ring_buffer_client_overwrite
lttng_kprobes16384 1lttng_tracer
lttng_lib_ring_buffer57344 7
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_metadata_mmap_client,lttng_ring_buffer_metadata_client,lttng_ri ng_buffer_event_notifier_client,lttng_ring_buffer_client_overwrite,lttng_tra cer
lttng_kretprobes16384 1lttng_tracer
lttng_statedump20480 1lttng_tracer
lttng_wrapper16384 2 lttng_tracer,lttng_statedump
lttng_clock16384 4
lttng_ring_buffer_client_discard,lttng_ring_buffer_client_mmap_discard,lttng _ring_buffer_client_overwrite,lttng_tracerAny suggestions appreciated.
Thank you.
Merlin
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 6 lines
Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev