The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.42k stars 497 forks source link

ABCREV default error when build locally #3495

Open Simonliudan opened 1 year ago

Simonliudan commented 1 year ago

Describe the bug

git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts cd OpenROAD-flow-scripts sudo ./setup.sh ./build_openroad.sh --local the error occured

in the tools/yosys/Makefile, i set ABCREV = default, the error still there

Expected Behavior

i want to build openroad-flow-scripts locally

Environment

centos

To Reproduce

git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts cd OpenROAD-flow-scripts sudo ./setup.sh ./build_openroad.sh --local

Relevant log output

No response

Screenshots

No response

Additional Context

No response

vijayank88 commented 1 year ago

Centos 07 or 08?

Attach build_openroad.log

Simonliudan commented 1 year ago

CentOS 07 build_openroad.log:

[root@bogon OpenROAD-flow-scripts]# ./build_openroad.sh [INFO FLW-0027] Saving logs to build_openroad.log [INFO FLW-0028] ./build_openroad.sh [INFO FLW-0002] Updating git submodules. [INFO FLW-0001] Using local build method. This will create binaries at 'tools/install' unless overwritten. [INFO FLW-0017] Compiling Yosys. make: Entering directory '/root/Desktop/OpenRoad/OpenROAD-flow-scripts/tools/yosys' [ 0%] Building kernel/version_bc027b2.cc [ 12%] Building frontends/verilog/verilog_lexer.o [ 12%] Building abc/abc-bc027b2 Debug: ABCREV=bc027b2 [ 22%] Building passes/techmap/filterlib.o [ 22%] Building yosys-smtbmc ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile! make: [Makefile:747: abc/abc-bc027b2] Error 1 make: Waiting for unfinished jobs.... frontends/verilog/verilog_lexer.l: In function ‘int frontend_verilog_yylex(FRONTEND_VERILOG_YYSTYPE, FRONTEND_VERILOG_YYLTYPE)’: frontends/verilog/verilog_lexer.cc:199:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘yy_size_t’ {aka ‘long unsigned int’} [-Wsign-compare] for ( yyl = n; yyl < frontend_verilog_yyleng; ++yyl )\


frontends/verilog/verilog_lexer.cc:210:9: note: in expansion of macro ‘YY_LESS_LINENO’
         YY_LESS_LINENO(yyless_macro_arg);\
         ^~~~~~~~~~~~~~
frontends/verilog/verilog_lexer.l:413:3: note: in expansion of macro ‘yyless’
   yyless(len);
   ^~~~~~
make: Leaving directory '/root/Desktop/OpenRoad/OpenROAD-flow-scripts/tools/yosys'
vvbandeira commented 1 year ago

Environment

centos

Please follow the Issue template, the ./etc/Env.sh info is important.

image

Also, provide the log files for the first compile, without the modification:

in the tools/yosys/Makefile, i set ABCREV = default, the error still there

Simonliudan commented 1 year ago

[root@bogon OpenROAD]# ./etc/Env.sh Unknown git commit, this is not a git repository.

Please make sure that you have the latest code changes and add the commit hash in the description.

kernel: Linux 3.10.0-1160.90.1.el7.x86_64 os: CentOS Linux 7 (Core) ./etc/Env.sh: line 57: cmake: command not found [root@bogon OpenROAD]# cat build/openroad-env.log Unknown git commit, this is not a git repository.

Please make sure that you have the latest code changes and add the commit hash in the description.

kernel: Linux 3.10.0-1160.90.1.el7.x86_64 os: CentOS Linux 7 (Core) ./etc/Env.sh: line 57: cmake: command not found

vijayank88 commented 1 year ago

Don't use root login for installation

vvbandeira commented 1 year ago

If you run as you said:

git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
sudo ./setup.sh
./build_openroad.sh --local

Then the message below is not possible since you will be in a freshly cloned git repo.

Unknown git commit, this is not a git repository.

The root user and the message above lead me to think that you running this inside a docker image. Is this a correct assumption? Are you trying to compile again from inside docker?

Simonliudan commented 1 year ago

Don't use root login for installation

i use another user, but the error still there:

[autumn@bogon OpenROAD-flow-scripts]$ ./build_openroad.sh --local [INFO FLW-0027] Saving logs to build_openroad.log [INFO FLW-0028] ./build_openroad.sh --local [INFO FLW-0002] Updating git submodules. [INFO FLW-0001] Using local build method. This will create binaries at 'tools/install' unless overwritten. [INFO FLW-0017] Compiling Yosys. make: Entering directory '/home/autumn/Desktop/OpenROAD-flow-scripts/tools/yosys' [ 0%] Building abc/abc-bafd2a7 Unknown option: -C usage: git [--version] [--help] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-p|--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] [] ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile! make: *** [Makefile:745: abc/abc-bafd2a7] Error 1 make: Leaving directory '/home/autumn/Desktop/OpenROAD-flow-scripts/tools/yosys'

vi tools/yosys/Makefile

ABCREV = default

the default is setup in Makefile

vvbandeira commented 1 year ago

Please start with a fresh clone and provide the log files for the first compile, without any modification to ORFS or Yosys.

In other words, re-run all the following as a regular user from scratch

git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
cd OpenROAD-flow-scripts
sudo ./setup.sh
./build_openroad.sh --local

Upload build_openroad.log if there are any errors.

KingKeshav2002 commented 1 year ago

Am also facing similar error while building ORFS docker based with WSL/Ubuntu22.04

#8 946.1 Unknown option: -C
#8 946.1 usage: git [--version] [--help] [-c name=value]
#8 946.1            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
#8 946.1            [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
#8 946.1            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
#8 946.1            <command> [<args>]
#8 946.1 ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile!
#8 946.1 make: *** [Makefile:745: abc/abc-bafd2a7] Error 1
#8 946.1 make: Leaving directory '/OpenROAD-flow-scripts/tools/yosys'
#8 ERROR: process "/bin/sh -c ./build_openroad.sh --no_init --local --threads ${numThreads}" did not complete successfully: exit code: 2
------
 > [4/4] RUN ./build_openroad.sh --no_init --local --threads 1:
#8 946.1 [100%] Building abc/abc-bafd2a7
#8 946.1 Unknown option: -C
#8 946.1 usage: git [--version] [--help] [-c name=value]
#8 946.1            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
#8 946.1            [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
#8 946.1            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
#8 946.1            <command> [<args>]
#8 946.1 ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile!
#8 946.1 make: *** [Makefile:745: abc/abc-bafd2a7] Error 1
#8 946.1 make: Leaving directory '/OpenROAD-flow-scripts/tools/yosys'
------
Dockerfile.builder:14
--------------------
  12 |     WORKDIR /OpenROAD-flow-scripts
  13 |
  14 | >>> RUN ./build_openroad.sh --no_init --local --threads ${numThreads}
  15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./build_openroad.sh --no_init --local --threads ${numThreads}" did not complete successfully: exit code: 2

Log attached: build_openroad.log

vvbandeira commented 1 year ago

@KingKeshav2002, please clean your workspace or use a clean clone.

git clean -xdf
git submodule foreach git clean -xdf
git submodule foreach git checkout .
git submodule update --init
./build_openroad.sh
vijayank88 commented 1 year ago

Am also facing similar error while building ORFS docker based with WSL/Ubuntu22.04

#8 946.1 Unknown option: -C
#8 946.1 usage: git [--version] [--help] [-c name=value]
#8 946.1            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
#8 946.1            [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
#8 946.1            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
#8 946.1            <command> [<args>]
#8 946.1 ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile!
#8 946.1 make: *** [Makefile:745: abc/abc-bafd2a7] Error 1
#8 946.1 make: Leaving directory '/OpenROAD-flow-scripts/tools/yosys'
#8 ERROR: process "/bin/sh -c ./build_openroad.sh --no_init --local --threads ${numThreads}" did not complete successfully: exit code: 2
------
 > [4/4] RUN ./build_openroad.sh --no_init --local --threads 1:
#8 946.1 [100%] Building abc/abc-bafd2a7
#8 946.1 Unknown option: -C
#8 946.1 usage: git [--version] [--help] [-c name=value]
#8 946.1            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
#8 946.1            [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
#8 946.1            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
#8 946.1            <command> [<args>]
#8 946.1 ERROR: ABC contains local modifications! Set ABCREV=default in Yosys Makefile!
#8 946.1 make: *** [Makefile:745: abc/abc-bafd2a7] Error 1
#8 946.1 make: Leaving directory '/OpenROAD-flow-scripts/tools/yosys'
------
Dockerfile.builder:14
--------------------
  12 |     WORKDIR /OpenROAD-flow-scripts
  13 |
  14 | >>> RUN ./build_openroad.sh --no_init --local --threads ${numThreads}
  15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c ./build_openroad.sh --no_init --local --threads ${numThreads}" did not complete successfully: exit code: 2

Log attached: build_openroad.log

Made a fresh clone of ORFS repo and started running ./build_openroad.sh --threads 1 has passed yosys-abc build and continuing to build OpenROAD now. @Simonliudan Can you do fresh installation and build with the --threads 1 option?