Go tool pprof list command gives 'Syntax error: "(" unexpected' - go

I've got a cpu profile file that I've been examining for a bottleneck in my code and using the commands like top10 works fine. However, when I want to look at the source code listing by typing
list Remove
Where Remove is the function I want to list, it gives the following output:
(pprof) list Remove
Total: 207 samples
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
Any ideas?

Related

llvm 14 fail to build linux kernel v5.10 or v5.11

When I use LLVM 14.0.3 to build Linux Kernel v5.11.22 or v5.10.118 for aarch64, it reports the below error:
CC arch/arm64/kernel/vdso/vgettimeofday.o
/tmp/vgettimeofday-0dc7a1.s: Assembler messages:
/tmp/vgettimeofday-0dc7a1.s:15: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:15: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:16: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:17: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:18: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:19: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:25: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:25: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:50: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:151: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:191: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:236: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:277: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:382: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:382: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:746: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:747: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:748: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:749: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:750: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:757: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:757: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1063: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1063: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1155: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:1162: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1162: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1295: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1295: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1324: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1324: Error: junk at end of line, first unrecognized character is `2'
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/Makefile.build:279: arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
make: *** [arch/arm64/Makefile:191: vdso_prepare] Error 2
Below are the build commands that I use:
make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu-
But I can build Linux Kernel v5.15.43 and the latest v5.18 by using the same build commands.
Also I tried LLVM 13.0.0, it can build Linux Kernel v5.11.22 for aarch64.
Pass LLVM_IAS=1 to kernel Makefile along with LLVM=-14 to ensure Clang use cross toolchain compatible for LLVM 14.x.x version.

bash if statement gives syntax error in console, but works properly

Using a bash if statement to check if two numbers in two different arrays are equal. It seems that on the condition where the statement should evaluate to false (ie. the two numbers are not equal) then console displays a syntax error.
Code in question:
for((i=0;i<=passes256Size;i+=1));do
if((${passes212[$i]}==${passes256[$i]})); then
passesBoth[$i]=${passes256[$i]}
fi
done
Error:
./partii.sh: line 46: 102==: syntax error: operand expected (error token is "=")
./partii.sh: line 46: ==103: syntax error: operand expected (error token is "==103")
The program still runs and gives me the desired result, however I get those two errors coming up during run time. Is there any way to fix this issue?
You are attempting to test two numbers for equality using bash's arithmetic context. Let's simplify and observe error messages:
$ ((2==)) && echo yes
bash: ((: 2==: syntax error: operand expected (error token is "==")
$ ((==2)) && echo yes
bash: ((: ==2: syntax error: operand expected (error token is "==2")
The above match fairly closely the error messages that you observe.
The following, of course, works as expected:
$ ((2==2)) && echo yes
yes
It appears that, depending on which message you observed, that either the value of ${passes212[$i]} or ${passes256[$i]} is empty.
Let's try this again but using variables with or without assigned values:
$ x=2; y=""; (($x==$y)) && echo yes
bash: ((: 2==: syntax error: operand expected (error token is "==")
$ x=""; y=2; (($x==$y)) && echo yes
bash: ((: ==2: syntax error: operand expected (error token is "==2")
If the variable's value is empty, we get the same error messages as above when no variable was present at all. This would seem to confirm our diagnosis.
The solution is to make sure both arrays have assigned values.

brew install coreutils error for 10.12.6 OSX

in OSX install error,
brew install coreutils
Error: coreutils: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:73: syntax error, unexpected << def caveats; <<~EOS
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:77: syntax error, unexpected tIDENTIFIER, expecting keyword_end
can add a "gnubin" directory to your PATH from your bashrc like:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:77: syntax error, unexpected ':', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:79: dynamic constant assignment
PATH="#{opt_libexec}/gnubin:$PATH"
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: dynamic constant assignment
Additionally, you can access their man pag...
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
Additionally, you can access their man pages with ...
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:82: syntax error, unexpected tIDENTIFIER, expecting keyword_end
the "gnuman" directory to your MANPATH from your bashrc as well:
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:82: syntax error, unexpected ':', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:84: dynamic constant assignment
MANPATH="#{opt_libexec}/gnuman:$MANPATH"`
What is the reason?
Please help me thanks
There is a closed issue on GitHub about this: https://github.com/Homebrew/brew/issues/3353
According to that discussion, this resolves the error:
rm -rf /usr/local/Homebrew/.git
brew update
brew config
I have not tested this myself.

Ruby and ctioga2 issue

I am trying to run ctioga2 and I keep getting the same error:
bash-4.1$ ctioga2
/usr/bin/ctioga2:49:in `require': /usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:646: syntax error, unexpected ')' (SyntaxError)
) do |plotmaker, size, options|
^
/usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:646: syntax error, unexpected '|', expecting '='
/usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:867: syntax error, unexpected kEND, expecting $end
from /usr/bin/ctioga2:49
Do you guys know why this happens?
Not familiar with the code base exactly of tioga2. Based on the error message it was expecting an assignment (=) and ran into a | and )
This is a ruby-1.8 specific bug. It is now fixed in the git repository (commit: be1cc4b).
But stackoverflow is not the place to file bug reports for programs, you're lucky I stumbled upon this one.
For ctioga2, please use either the bug tracker at sourceforge: https://sourceforge.net/p/ctioga2/tickets/ or the one at github if you prefer: https://github.com/fourmond/ctioga2/issues/.

⌃⇧L 'Wrap selection/word as a link' broken in TextMate

I regularly use ⌃⇧L in TextMate to wrap selection as a link. When I used it this morning, i got...
/tmp/temp_textmate.RRepHN:13: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected keyword_when, expecting keyword_end
when %r{http://www.(amazon.(?:com...
^
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A[a-zA-Z][a-zA-Z0-9.+-]*://.*\z}:
^
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:19: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A(www\..*|.*\.(com|uk|net|org|info))\z}:
^
/tmp/temp_textmate.RRepHN:19: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:21: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A.*\.(com|uk|net|org|info)\z}:
^
/tmp/temp_textmate.RRepHN:21: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:23: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A\S+\z}:
^
/tmp/temp_textmate.RRepHN:23: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:27: warning: else without rescue is useless
/tmp/temp_textmate.RRepHN:28: syntax error, unexpected keyword_end, expecting
I can't think of anything specific I might have done to cause the issue.
I have reloaded bundles and reinstalled TextMate.
I also tried using the code at http://svn.textmate.org/trunk/Bundles/Hyperlink%20Helper.tmbundle/Commands/Wrap%20Selection%20as%20Link.tmCommand.
None of them fixed the problem.
Anyone have any ideas?!
Thanks.
There shouldn't be a colon at the when ... line. You can edit the snippet and remove it in the Bundle Editor.

Resources