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

Link stdc++fs for older gcc versions #2508

Merged
merged 7 commits into from
Mar 17, 2024
Merged

Link stdc++fs for older gcc versions #2508

merged 7 commits into from
Mar 17, 2024

Conversation

soheilshahrouz
Copy link
Contributor

@soheilshahrouz soheilshahrouz commented Mar 17, 2024

Fixes this issue.

According to filesystem library documentation, gcc versions older than 9.1 and clang prior to 9.0 need filesystem library to be explicitly linked. This PR adds the compiler option when it is necessary.

When trying to reproduce the compilation failure, I realized gcc-8.4 does not need the additional compiler option. However, to be consistent with the official documentation, I add the compiler flag for versions older than 9.1.

How Has This Been Tested?

Current Github Ubuntu images do not have gcc-8 installed by default. When I manually installed gcc-8.4, VTR was built without any problem. It seems that it is only gcc-8.3 and older version sthat need the link flag. I reproduced the compilation error on my local machine by building gcc-8.3 from source. Adding the compiler flag fixed the error. CI tests show that the flag is not applied for newer gcc versions.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool libarchfpga Library for handling FPGA Architecture descriptions lang-cpp C/C++ code build Build system lang-make CMake/Make code libvtrutil external_libs labels Mar 17, 2024
@vaughnbetz
Copy link
Contributor

Looks good, thanks!

@vaughnbetz vaughnbetz merged commit 6921a93 into master Mar 17, 2024
98 checks passed
@vaughnbetz vaughnbetz deleted the gcc8_support_issue branch March 17, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system external_libs lang-cpp C/C++ code lang-make CMake/Make code libarchfpga Library for handling FPGA Architecture descriptions libvtrutil VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to build target 'libarchfpga'
2 participants