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

failed to compile on linux #54

Closed
bdouxx opened this issue Dec 21, 2020 · 1 comment · Fixed by #72
Closed

failed to compile on linux #54

bdouxx opened this issue Dec 21, 2020 · 1 comment · Fixed by #72

Comments

@bdouxx
Copy link

bdouxx commented Dec 21, 2020

hi,
trying to compile and install on linux :
cmake : 3.17.4
GNU Make : 4.2.1

LANG=EN
rm -rf /tmp/debug; mkdir /tmp/debug; cd /tmp/debug
git clone git@github.com:google/cppdap.git
cd cppdap
git submodule update --init

mkdir build; cd build
cmake .. -DCPPDAP_BUILD_TESTS=1 -DCPPDAP_BUILD_EXAMPLES=1 -DCPPDAP_INSTALL=ON
make
make install

problem :

cmake .. -DCPPDAP_BUILD_TESTS=1 -DCPPDAP_BUILD_EXAMPLES=1 -DCPPDAP_INSTALL=ON

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "cppdap" INTERFACE_INCLUDE_DIRECTORIES property contains path:
    "/tmp/debug/cppdap/include"
  which is prefixed in the source directory.
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

workaround:

< set(CPPDAP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
---
> set(CPPDAP_INCLUDE_DIR  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)

but

make install

[ 46%] Built target cppdap
[ 93%] Built target cppdap-unittests
[100%] Built target hello_debugger
Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:41 (file):
  file INSTALL cannot find "/tmp/debug/cppdap/include/cppdap": No such file or directory.
make: *** [Makefile:106: install] Error 1
@ben-clayton
Copy link
Contributor

Sorry for the silly-long delay in responding to this. This issue somehow slipped my attention.

I'm afraid the install targets have never really been supported. cppdap is only internally used and tested as a library that is included as a sub-module of another project. While I've tried hard to ensure that the public API / ABI has remained backwards compatible, I've made no absolute guarantees here, and installation targets really need this property.

For this reason, I think the best course of option is to remove the installation target entirely.

ben-clayton added a commit to ben-clayton/cppdap that referenced this issue Sep 7, 2021
CMake installation target has been broken for years.
cppdap is only internally used and tested as a library that is included as a sub-module of another project.

In order for a package to be installable, it really needs a stable ABI / API, which we've made no explicit guarantees about.
cppdap is small enough that it can easily be included in a third_party directory of another project.

Remove the broken, unmaintained installation rules.

Fixes: google#54
ben-clayton added a commit that referenced this issue Sep 7, 2021
CMake installation target has been broken for years.
cppdap is only internally used and tested as a library that is included as a sub-module of another project.

In order for a package to be installable, it really needs a stable ABI / API, which we've made no explicit guarantees about.
cppdap is small enough that it can easily be included in a third_party directory of another project.

Remove the broken, unmaintained installation rules.

Fixes: #54
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

Successfully merging a pull request may close this issue.

2 participants