vinniefalco / BeastLounge

Massively Multiplayer Online Blackjack Game using Boost.Beast
http://beastlounge.com
Boost Software License 1.0
2 stars 0 forks source link

Build issue #26

Open smalls12 opened 4 years ago

smalls12 commented 4 years ago

Coming across the following issue when building:

You have called ADD_LIBRARY for library beast_lounge without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at CMakeLists.txt:32 (target_compile_features):
  target_compile_features cannot use features from non-enabled language CXX

-- The CXX compiler identification is GNU 7.5.0
-- 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
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
CMake Error at /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake:141 (find_package):
  Could not find a configuration file for package "boost_json" that exactly
  matches requested version "1.73.0".

  The following configuration files were considered but not accepted:

    /usr/local/lib/cmake/boost_json/boost_json-config.cmake, version: 1

Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.73.0/BoostConfig.cmake:258 (boost_find_component)
  CMakeLists.txt:134 (find_package)

-- Configuring incomplete, errors occurred!

Could be due to my system: Ubuntu 18.04 gcc 7.5.0 cmake 3.10.2

smalls12 commented 4 years ago

Oh that's the develop branch. Switching to master.

smalls12 commented 4 years ago
CMake Error at CMakeLists.txt:10 (cmake_minimum_required):
  CMake 3.13 or higher is required.  You are running version 3.10.2

Dropping requirement down to 3.10.2

smalls12 commented 4 years ago
CMake Error at CMakeLists.txt:11 (cmake_policy):
  Policy "CMP0074" is not known to this version of CMake.

Removing this requirement.

smalls12 commented 4 years ago
CMake Error at test/beast/json/CMakeLists.txt:21 (add_executable):
  Cannot find source file:

    /usr/local/include/boost/beast/_experimental/unit_test/main.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

Can't seem to build tests, so I disabled them.

vinniefalco commented 4 years ago

I am using cmake-3.17.2 if that helps

smalls12 commented 4 years ago

I'm passed the cmake parts now, but into some issues compiling.

It seems master branch needs c++14

3rdparty/BeastLounge/server/http_session.cpp:249:16: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14
         [this](auto&& response)

and I might not have built boost correctly

# error Do not compile Beast library source with BOOST_BEAST_HEADER_ONLY defined
vinniefalco commented 4 years ago

Yep it looks like this is not ready even to be compiled yet... perhaps check back in a week?

smalls12 commented 4 years ago

okay will do :)

smalls12 commented 4 years ago

Hey Vinnie, have you had a chance to look into this? Thanks!

vinniefalco commented 4 years ago

I moved my in-progress refactoring to a new branch. This will replace the current develop eventually, but it needs more time to be worked on: https://github.com/vinniefalco/BeastLounge/tree/refactor

Meanwhile, I have rolled back the changes in develop to when it used to work. It might build for you now:

https://github.com/vinniefalco/BeastLounge/

smalls12 commented 4 years ago

Okay, that branch gives me my initial issue. I'm guessing its because of an older cmake maybe.

smalls12 commented 4 years ago

I was actually able to get it building on the develop branch. The issue was my installation of boost_json. I had to go and manually edit the cmake file to set the version to 1.73.0.

rajeev-variant commented 3 years ago

Hi , I am getting similar error . Could you please let me know what needs to be configured ? I am using cmake_minimum_required(VERSION 3.19)

image
vinniefalco commented 3 years ago

No idea, this project has been paused for now. It is not complete.

rajeev-variant commented 3 years ago

No idea, this project has been paused for now. It is not complete.

hey Vinnie thanks for reply . "paused" meaning , should I not use Boost Json in 1.75 . I asked this because I was using it for one of my projects , and it did successfully solved my needs . Now when I was packaging the library I was not able to generate lib boost_json.a . and ran into these problems . I am still working on this build this .

PS: when I started development I installed using 'brew install boost" and I got it in my system .

Thanks for your help !

vinniefalco commented 3 years ago

This issue is on BeastLounge though. Boost.JSON has shipped in Boost and yes it is quite stable. If you have an issue with building the library you should open it here: https://github.com/boostorg/json/issues

rajeev-variant commented 3 years ago

Thanks Vinnie , will go over it thanks!!