amazon-web-servicesmemgraphdbmemgraph

Error during instalation of MAGE on Ubuntu


I run Ubuntu version of Memgraph on AWS. I use Memgraph 2.0.12. I want to add MAGE alogirths to it. Here is a seuence of my commands. What is this mg_exceptions.hpp that seem to be missing?

ubuntu@ip-10-0-10-157:~/repos$ git clone https://github.com/memgraph/mage.git
Cloning into 'mage'...
remote: Enumerating objects: 7314, done.
remote: Counting objects: 100% (2354/2354), done.
remote: Compressing objects: 100% (1193/1193), done.
remote: Total 7314 (delta 1456), reused 1772 (delta 1157), pack-reused 4960
Receiving objects: 100% (7314/7314), 21.99 MiB | 11.22 MiB/s, done.
Resolving deltas: 100% (3706/3706), done.
ubuntu@ip-10-0-10-157:~/repos$ cd mage
ubuntu@ip-10-0-10-157:~/repos/mage$ python3 setup build -p /usr/lib/memgraph/query_modules
2023-11-06 16:15:10,414 [INFO]: [Terminal] Starting building and copying source code...
2023-11-06 16:15:10,414 [INFO]: [Terminal] (1/7) Building C++ modules started.
2023-11-06 16:15:10,414 [DEBUG]: [Terminal] Running command `['cmake', '..', '-DCMAKE_BUILD_TYPE=Release']`.
2023-11-06 16:15:16,061 [DEBUG]: [Terminal] Running command `['make', '-j2']`.
Cloning into 'gtest-proj'...
Cloning into 'uuid-proj'...
HEAD is now at 5c538cc Merge pull request #57 from rickyviking/windows_defines
HEAD is now at e2239ee6 Googletest export
Cloning into 'mgclient-proj'...
HEAD is now at 1999893 Add column names to the Cpp client (#55)
In file included from /home/ubuntu/repos/mage/cpp/mg_utility/mg_utils.hpp:12,
                 from /home/ubuntu/repos/mage/cpp/betweenness_centrality_module/betweenness_centrality_module.cpp:3:
/home/ubuntu/repos/mage/cpp/mg_utility/mg_graph.hpp:15:10: fatal error: mg_exceptions.hpp: No such file or directory
   15 | #include "mg_exceptions.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [betweenness_centrality_module/CMakeFiles/betweenness_centrality.dir/build.make:76: betweenness_centrality_module/CMakeFiles/betweenness_centrality.dir/betweenness_centrality_module.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1652: betweenness_centrality_module/CMakeFiles/betweenness_centrality.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:146: all] Error 2
2023-11-06 16:16:04,262 [ERROR]: [Terminal] Running command ['make', '-j2'] failed.
2023-11-06 16:16:04,262 [ERROR]: [Terminal] (1/8) Building C++ modules failed.
2023-11-06 16:16:04,262 [ERROR]: [Terminal] An error occurred while building. Check the output message for more information.
ubuntu@ip-10-0-10-157:~/repos/mage$

Solution

  • You need to install submodules. You can either do

    git submodule init 
    git submodule update
    

    or if you want to clone it all over again do git clone --recurse-submodules https://github.com/memgraph/mage.git