Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: _ZN5Yosys8Frontend7executeESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEPNS_5RTLIL6DesignE #1934

Closed
gkamendje opened this issue Sep 6, 2023 · 5 comments

Comments

@gkamendje
Copy link

Using version 3d041df
OS= CentOS Linux release 7.9.2009
I am running Centos7 and I was able to compile and install as reported here #1826. However, I get the message undefined symbol: _ZN5Yosys8Frontend7executeESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEPNS_5RTLIL6DesignE
when I try to load the module in Yosys.

Yosys 0.13+15 (git sha1 bc027b2ca, gcc 8.3.1 -fPIC -Os)

ERROR: Can't load module `./systemverilog': /my_path/OpenROAD-flow-scripts/tools/install/yosys/bin/../share/yosys/plugins/systemverilog.so: undefined symbol: _ZN5Yosys8Frontend7executeESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEPNS_5RTLIL6DesignE

Any hint what is going on?

@pgielda
Copy link
Member

pgielda commented Sep 14, 2023

It means that the plugin is referencing to _ZN5Yosys8Frontend7executeESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEPNS_5RTLIL6DesignE symbol that is not in the yosys binary.

echo "_ZN5Yosys8Frontend7executeESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEPNS_5RTLIL6DesignE" | c++filt 
Yosys::Frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Yosys::RTLIL::Design*)

Most probably it means that the signature changed.

The pinned version to this repo is currently https://github.com/YosysHQ/yosys/tree/8b2a0010216f9a15c09bd2f4dc63691949b126df which is newer (0.33+34) so I would suggest using a newer yosys version.

@gkamendje
Copy link
Author

gkamendje commented Sep 15, 2023

I got the following error message while trying to use it with the latest version of Yosys (b84ed5d3ad2ac8b533e1d6a83dbdb6d5c2be9ce7). I am running ./build_binaries.sh -y. My version of the plugin is bc99d46

g++ -I../../third_party/yosys_mod -Wall -Wextra -ggdb -I/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include -MD -MP -D_YOSYS_ -fPIC -I/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_ZLIB -I/usr/include/tcl8.5 -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER   -std=c++17 -Wall -W -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I/home/gkamendje/tmp_compile/UHDM/synlig/image/include     -MMD -c -o /home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/simplify.cc.o /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc
PKG_CONFIG_PATH=/home/gkamendje/tmp_compile/UHDM/synlig/image/lib/pkgconfig:/cad/verilator/v5.002/share/pkgconfig PKG_CONFIG_PATH_FOR_TARGET=/home/gkamendje/tmp_compile/UHDM/synlig/image/lib/pkgconfig: pkg-config --cflags Surelog
-I/home/gkamendje/tmp_compile/UHDM/synlig/image/include  
In file included from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast.cc:12:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/uhdm_ast.cc.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/const2ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc:32:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/simplify.cc.o] Error 1
In file included from /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/const2ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/const2ast.cc:41:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/const2ast.cc.o] Error 1
In file included from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_common_frontend.h:20,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast_frontend.cc:22:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_common_frontend.h:20,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_common_frontend.cc:20:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: In file included from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_ast.h:4,
                 from /home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog/uhdm_surelog_ast_frontend.cc:20:
/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include/frontends/ast/ast.h:33:10: fatal error: kernel/fmt.h: No such file or directory
   33 | #include "kernel/fmt.h"
      |          ^~~~~~~~~~~~~~
*** [/home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/uhdm_ast_frontend.cc.o] Error 1

I noticed that the file kernel/fmt.h does not exists in the include subdirectory of the Yosys installation directory. So copied it from the Yosys compilation directory and now I am getting the following error:

g++ -I../../third_party/yosys_mod -Wall -Wextra -ggdb -I/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/share/yosys/include -MD -MP -D_YOSYS_ -fPIC -I/home/gkamendje/tmp_compile/openroad-flow-branch-smic018/tools/install/yosys/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_ZLIB -I/usr/include/tcl8.5 -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER   -std=c++17 -Wall -W -Wextra -Wno-deprecated-declarations -Wno-unused-parameter -I/home/gkamendje/tmp_compile/UHDM/synlig/image/include     -MMD -c -o /home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/simplify.cc.o /home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc
PKG_CONFIG_PATH=/home/gkamendje/tmp_compile/UHDM/synlig/image/lib/pkgconfig:/cad/verilator/v5.002/share/pkgconfig PKG_CONFIG_PATH_FOR_TARGET=/home/gkamendje/tmp_compile/UHDM/synlig/image/lib/pkgconfig: pkg-config --cflags Surelog
-I/home/gkamendje/tmp_compile/UHDM/synlig/image/include  
/home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc: In function ‘bool systemverilog_plugin::simplify(Yosys::AST::AstNode*, bool, bool, bool, int, int, bool, bool)’:
/home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc:728:46: error: ‘struct Yosys::AST::AstNode’ has no member named ‘process_format_str’; did you mean ‘processFormat’?
  728 |                 std::string sout = ast_node->process_format_str(sformat, 1, stage, width_hint, sign_hint);
      |                                              ^~~~~~~~~~~~~~~~~~
      |                                              processFormat
/home/gkamendje/tmp_compile/UHDM/synlig/third_party/yosys_mod/simplify.cc:3334:62: error: ‘struct Yosys::AST::AstNode’ has no member named ‘process_format_str’; did you mean ‘processFormat’?
 3334 |                                 std::string sout = ast_node->process_format_str(sformat, 1, stage, width_hint, sign_hint);
      |                                                              ^~~~~~~~~~~~~~~~~~
      |                                                              processFormat
make: *** [/home/gkamendje/tmp_compile/UHDM/synlig/build/systemverilog-plugin/simplify.cc.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/gkamendje/tmp_compile/UHDM/synlig/frontends/systemverilog'

@gkamendje
Copy link
Author

looks like the issue is reported in #1961

@pgielda
Copy link
Member

pgielda commented Sep 24, 2023

Yes, it will be fixed via #2008

@alaindargelas
Copy link
Collaborator

This is fixed with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants