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

compilation error when compiling casbin lib #2

Open
MaximAxelrodFirebolt opened this issue Feb 16, 2022 · 2 comments
Open

compilation error when compiling casbin lib #2

MaximAxelrodFirebolt opened this issue Feb 16, 2022 · 2 comments

Comments

@MaximAxelrodFirebolt
Copy link

Hi All,

I am trying to build the project and getting compilation error:

# create build directory
oem@maxim:~/work/casbin-CMake-setup$ mkdir build
oem@maxim:~/work/casbin-CMake-setup$ cd build/

# generate makefiles
oem@maxim:~/work/casbin-CMake-setup/build$ cmake ..
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oem/work/casbin-CMake-setup/build

# build  makefiles
oem@maxim:~/work/casbin-CMake-setup/build$ make CasbinClientTest
[  1%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/cmake_pch.hxx.gch
[  3%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/abac_data.cpp.o
[  5%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/enforcer.cpp.o
[  6%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/enforcer_cached.cpp.o
[  8%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/enforcer_synced.cpp.o
[ 10%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/internal_api.cpp.o
[ 12%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/logger.cpp.o
[ 13%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/management_api.cpp.o
[ 15%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/pch.cpp.o
[ 17%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/rbac_api.cpp.o
[ 18%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/rbac_api_with_domains.cpp.o
[ 20%] Building CXX object _deps/casbin-build/casbin/CMakeFiles/casbin.dir/config/config.cpp.o
/home/oem/work/casbin-CMake-setup/build/_deps/casbin-src/casbin/config/config.cpp:17:10: fatal error: pch.h: No such file or directory
   17 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
make[3]: *** [_deps/casbin-build/casbin/CMakeFiles/casbin.dir/build.make:253: _deps/casbin-build/casbin/CMakeFiles/casbin.dir/config/config.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:141: _deps/casbin-build/casbin/CMakeFiles/casbin.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:122: CMakeFiles/CasbinClientTest.dir/rule] Error 2
make: *** [Makefile:169: CasbinClientTest] Error 2

Can I get help with this issue? What I am doing wrong? Unfortunately I did not find "official" instructions to build.

@hsluoyz
Copy link

hsluoyz commented Jun 11, 2022

@cs1137195420

@EmperorYP7
Copy link
Collaborator

@MaximAxelrodFirebolt try updating the version of casbin being fetched by CMake.

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