Closed suntianq closed 1 year ago
If you can provide the path/command and all the error info, that would be helpful for us to target the error reason.
I have executed chmod -R +x ./joern in ~/GraphSPD, there is an error when i run gen_cpg.py: @.***:/workspace/GraphSPD# python3 gen_cpg.py /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list /usr/bin/env: ‘bash\r’: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory Traceback (most recent call last): File "/workspace/GraphSPD/locate_and_align.py", line 122, in <module> idx = filename.index(funcInfo[i][0]) ValueError: 'c' is not in list
OS is ubuntu18.04.
------------------ 原始邮件 ------------------ 发件人: "SunLab-GMU/GraphSPD" @.>; 发送时间: 2023年6月26日(星期一) 上午10:42 @.>; @.**@.>; 主题: Re: [SunLab-GMU/GraphSPD] When running gen_cpg.py, there is an error : /usr/bin/env: 'bash\r': No such file or directory when I run "./joern xxx". (Issue #3)
If you can provide the path/command and all the error info, that would be helpful for us to target the error reason.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Can you simply run $ pyenv --version
and provide the results?
/usr/bin/env: ‘bash\r’: No such file or directory
means your pyenv configuation file contains \r
, which should be replaced with ''.
Can you simply run
$ pyenv --version
and provide the results?
If you find:
$ pyenv --version
/usr/bin/env: ‘bash\r’: No such file or directory
Use
$ cd ~/.pyenv && find . -type f | xargs sed -i $'s/\r$//' && cd -
Thank you. I have a new question. I want to test my own commits. How to generate raw_patch file as same as your type.
------------------ 原始邮件 ------------------ 发件人: "SunLab-GMU/GraphSPD" @.>; 发送时间: 2023年6月26日(星期一) 中午11:22 @.>; @.**@.>; 主题: Re: [SunLab-GMU/GraphSPD] When running gen_cpg.py, there is an error : /usr/bin/env: 'bash\r': No such file or directory when I run "./joern xxx". (Issue #3)
Can you simply run $ pyenv --version and provide the results?
If you find: $ pyenv --version /usr/bin/env: ‘bash\r’: No such file or directory
Use $ cd ~/.pyenv && find . -type f | xargs sed -i $'s/\r$//' && cd -
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
If it is a GitHub commit, follow step 1.2 instead of 1.1: python3 get_ab_file.py [owner] [repository] [commitID].
If you test a private commit, you also need to copy the changed files only (both a and b versions) to “ab_files/a” and "ab_files/b". See get_ab_files.py and you can know how to place these files.
Did you run the scripts under the folder
GraphSPD/
? Thejoern/
is the sub-folder under the main folder (need tochmod -R +x ./joern
). All the operations in this repo should be run at theGraphSPD
path.