Loki-Astari / ThorsMongo

C++ MongoDB API and BSON/JSON Serialization library
GNU General Public License v3.0
316 stars 72 forks source link

missing include file magic_enum.hpp #80

Closed SteveS-Serrano closed 1 year ago

SteveS-Serrano commented 1 year ago

Describe the bug I am trying to compile the example applications using a header-only install. I am getting an error for a missing include file magic_enum.hpp:

include/ThorSerialize/Traits.h:692:10: fatal error: magic_enum.hpp: No such file or directory
  692 | #include <magic_enum.hpp>
      |          ^~~~~~~~~~~~~~~~

Is there a required package that I am missing? I didn't see anything in the documentation about a required package for the header-only version. Only the instructions to include the path to the headers in the build.

I used this instruction to clone the header-only branch:

git clone --single-branch --branch header-only https://github.com/Loki-Astari/ThorsSerializer.git

The branch has no tag at the top level.

$ git status
On branch header-only
Your branch is up to date with 'origin/header-only'.
nothing to commit, working tree clean

$ git log -n 5 --pretty=format:"%h %cd %s %an"
f22f0d2 Sun Apr 30 00:02:36 2023 -0700 Update the header only build to latest version Loki Astari
90629c8 Fri Aug 21 09:50:52 2020 +0000 Update the header only build to latest version Travis CI User
51b1cb5 Wed Aug 19 06:14:07 2020 +0000 Update the header only build to latest version Travis CI User
3cd65e6 Sat Aug 15 20:49:06 2020 +0000 Update the header only build to latest version Travis CI User
fcf0b3e Sat Aug 15 15:48:02 2020 +0000 Update the header only build to latest version Travis CI User
$

So I cloned the full repo, but still can't find magic_enum.hpp:

mv ThorsSerializer ThorsSerializer-ho
git clone git@github.com:Loki-Astari/ThorsSerializer.git
mv ThorsSerializer ThorsSerializer-full

$ ls -al
total 784
drwxrwxr-x  5 sscott sscott   4096 May 11 20:59 .
drwxr-xr-x 39 sscott sscott   4096 May 11 20:48 ..
drwxrwxr-x 12 sscott sscott   4096 May 11 20:59 ThorsSerializer-full
drwxrwxr-x  8 sscott sscott   4096 May 11 14:29 ThorsSerializer-ho
$

$ find . -name "*magic_enum*"
$

$ find . -iname "*magic*"
$

Environment:

Additional context

SteveS-Serrano commented 1 year ago

Getting the magic_enum sources at git clone git@github.com:Neargye/magic_enum.git seems to resolve this issue

palevi67 commented 1 year ago

hanpr@hanpr-rpi4:~ $ git clone git@github.com:Neargye/magic_enum.git Cloning into 'magic_enum'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

Loki-Astari commented 1 year ago

If you have not set up your private key with github (you should do this) you can use the http interface instead which does not require authentication.

> git clone https://github.com/Neargye/magic_enum.git