Closed
Description
I was using codeql-v2.15.3, and I hope to test the latest version (v2.16.6). After downloading the latest bundle and decompressing it, I moved the new version to a new directory. The folder looks like
- codeql-v2.15.3
- codeql-v2.16.6
Then I changed the PATH
from using the directory of v2.15.3 to v2.16.6, and running codeql --version
looks good (see below).
CodeQL command-line toolchain release 2.16.6.
Copyright (C) 2019-2024 GitHub, Inc.
Unpacked in: /export/codeql
Analysis results depend critically on separately distributed query and
extractor modules. To list modules that are visible to the toolchain,
use 'codeql resolve qlpacks' and 'codeql resolve languages'.
Next, I tried to use the new codeql
with new queries and got the following errors.
codeql query run IntegerOverflowTainted_1.ql -d /path/to/codeql_db -o IntegerOverflowTainted_1.ql.bqrs
ERROR: Referenced pack 'codeql/dataflow' was found in multiple locations. Could be one of: '/export/d1/hwangdz/llm-codeql/codeql-v2.15.3/qlpacks/codeql/dataflow/0.1.3/qlpack.yml', '/export/codeql-v2.16.6/qlpacks/codeql/dataflow/0.2.3/qlpack.yml'. (/export/CVE_QLOpt_output/autotrace/ql/qlpack.yml:1,1-1)
ERROR: Referenced pack 'codeql/rangeanalysis' was found in multiple locations. Could be one of: '/export/codeql-v2.15.3/qlpacks/codeql/rangeanalysis/0.0.2/qlpack.yml', '/export/codeql-v2.16.6/qlpacks/codeql/rangeanalysis/0.0.11/qlpack.yml'. (/export/CVE_QLOpt_output/autotrace/ql/qlpack.yml:1,1-1)
ERROR: Referenced pack 'codeql/ssa' was found in multiple locations. Could be one of: '/export/codeql-v2.15.3/qlpacks/codeql/ssa/0.2.3/qlpack.yml', '/export/codeql-v2.16.6/qlpacks/codeql/ssa/0.2.12/qlpack.yml'. (/export/CVE_QLOpt_output/autotrace/ql/qlpack.yml:1,1-1)
ERROR: Referenced pack 'codeql/tutorial' was found in multiple locations. Could be one of: '/export/codeql-v2.15.3/qlpacks/codeql/tutorial/0.2.3/qlpack.yml', '/export/codeql-v2.16.6/qlpacks/codeql/tutorial/0.2.12/qlpack.yml'. (/export/CVE_QLOpt_output/autotrace/ql/qlpack.yml:1,1-1)
...
A fatal error occurred: A 'codeql resolve extensions-by-pack' operation failed with error code 2
Changing the folder of codeql-v2.15.3
to other folders like abcd
does not help. Does it mean I have to remove the old directory?
Is there any way to switch the used version without removing the old one?
Thank you in advance.