Skip to content

Build Failure with PR #1869 #1877

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

Closed
Srivat97 opened this issue Oct 15, 2021 · 5 comments
Closed

Build Failure with PR #1869 #1877

Srivat97 opened this issue Oct 15, 2021 · 5 comments
Assignees

Comments

@Srivat97
Copy link
Contributor

Srivat97 commented Oct 15, 2021

Since the "capnproto" library is now added as a submodule, when we do a clone onto the VTR repo, the "capnproto" related files
are not downloaded locally. This ends up breaking the build since the "libs/EXTERNAL/capnproto" directory is empty.

Expected Behaviour

During the build procedure the "capnproto" repo should be cloned, so that the relevant files are present locally.

or

During the initial VTR repo clone, the "capnproto" repository should also be downloaded locally.

Current Behaviour

After I do a clone onto the VTR repo, the "libs/EXTERNAL/capnproto" directory is empty by default. Then when I try to build VTR, I get the following error:
`CMake Error at libs/EXTERNAL/CMakeLists.txt:43 (add_subdirectory):
The source directory

/home/srivat97/Research_Project/Test/libs/EXTERNAL/capnproto

does not contain a CMakeLists.txt file.

CMake Error at libs/EXTERNAL/CMakeLists.txt:47 (target_include_directories):
Cannot specify include directories for target "kj" which is not built by
this project.

-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-undef
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-undef - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-non-virtual-dtor
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-non-virtual-dtor - Success
CMake Error at libs/libvtrcapnproto/CMakeLists.txt:29 (capnp_generate_cpp):
Unknown CMake command "capnp_generate_cpp".

-- Configuring incomplete, errors occurred!
See also "/home/srivat97/Research_Project/Test/build/CMakeFiles/CMakeOutput.log".
make: *** [Makefile:128: clean] Error 1`

Possible Solution

What I have been doing to get the build working is the following:
git submodule init
git submodule update

Steps to Reproduce

  1. Perform a clone of the VTR repo: git clone https://github.com/verilog-to-routing/vtr-verilog-to-routing.git
  2. At this point if we go into the "libs/EXTERNAL/capnproto" directory, we should see that it is emoty
  3. Go back to vtr root directory and run 'make', this should fail.

Context

Your Environment

  • VTR revision used: 8.0.0
  • Operating System and version: Ubuntu 20.04.3 LTS
  • Compiler version: GCC 9.3.0
@acomodi
Copy link
Collaborator

acomodi commented Oct 15, 2021

Probably the submodule update step is not working correctly. You may run git submodule update --init --recursive to download the required data from the capnproto repository

@acomodi
Copy link
Collaborator

acomodi commented Oct 15, 2021

In alternative, cloning with the following should also solve the problem: git clone --recurse-submodules https://github.com/verilog-to-routing/vtr-verilog-to-routing.git

@mithro
Copy link
Contributor

mithro commented Oct 16, 2021

@acomodi - To avoid submodule issues, VtR generally uses git-subtree, see https://docs.verilogtorouting.org/en/latest/dev/developing/?highlight=subtrees#adding-a-new-subtree

Any reason we didn't use subtrees for cap'n'proto here?

@acomodi
Copy link
Collaborator

acomodi commented Oct 16, 2021

@mithro I have actually missed that section in the docs, so I wasn't aware that subtree was used in this case. At this point I guess we should stick with the current subtree strategy.

I have opened #1880 to revert the changes from #1869

@mithro
Copy link
Contributor

mithro commented Oct 18, 2021

Fixed by #1880 ?

@mithro mithro closed this as completed Oct 18, 2021
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