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

./kernel/yosys.h:42:10: fatal error: 'map' file not found #2697

Closed
Martoni opened this issue Aug 18, 2024 · 3 comments
Closed

./kernel/yosys.h:42:10: fatal error: 'map' file not found #2697

Martoni opened this issue Aug 18, 2024 · 3 comments

Comments

@Martoni
Copy link
Contributor

Martoni commented Aug 18, 2024

Following BUILDING.md, got a Yosys compile error.

Expected Behaviour

No yosys compile error

Current Behaviour

Building target(s): 
[ 63%] Built target libabc
[ 63%] Built target abc
[ 65%] Generating yosys-bin
In file included from kernel/driver.cc:20:
./kernel/yosys.h:42:10: fatal error: 'map' file not found
#include <map>
         ^~~~~
1 error generated.
make[4]: *** [Makefile:759 : kernel/driver.o] Erreur 1
make[3]: *** [yosys/CMakeFiles/yosys.dir/build.make:73 : yosys/yosys-bin] Erreur 2
make[2]: *** [CMakeFiles/Makefile2:1153 : yosys/CMakeFiles/yosys.dir/all] Erreur 2
make[1]: *** [Makefile:146 : all] Erreur 2
make: *** [Makefile:94 : all] Erreur 2

Steps to Reproduce

Following BUILDING.md :

$ git submodule init
$ git submodule update
$ ./install_apt_packages.sh
$ sudo apt-get install libc++-dev # added for test
$ make env
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ make

Your Environment

  • VTR revision used: master (f13f87b)
  • Operating System and version:
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=21
DISTRIB_CODENAME=vanessa
DISTRIB_DESCRIPTION="Linux Mint 21 Vanessa"
  • Compiler version: Don't know
@AlexandreSinger
Copy link
Contributor

Hi @Martoni , thanks for the issue!

This was actually a known issue on Yosys' side which was resolved recently:
See: YosysHQ/yosys#681 and YosysHQ/yosys#4234

VTR uses a slightly older version of Yosys which does not have this fix yet. We are currently in the process of upgrading Yosys in VTR up to the most recent version: See PR #2646

In summary, the issue is caused by Yosys implicitly setting CXX to be gcc and clang instead of g++ and clang++; this causes it to be unable to include the C++ standard library. This issue only manifests itself on OS's that are not Ubuntu (for some reason I am not completely sure). Here in VTR, we mainly develop on Ubuntu; which is the operating system that we recommend.

As a quick fix, you can resolve the issue in Yosys' makefile here (locally) by setting CXX to be proper: https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/master/yosys/Makefile

However, if you have access to a machine with a recent version of Ubuntu installed, I recommend using that instead for a smoother installation.

@Martoni
Copy link
Contributor Author

Martoni commented Aug 19, 2024

Thank you very much for the detailed explanation.
I'll try it this evening.

@Martoni
Copy link
Contributor Author

Martoni commented Aug 19, 2024

Ok, works with changing clang to gcc in yosys/Makefile
Thanks

@Martoni Martoni closed this as completed Aug 19, 2024
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

2 participants