ProtonMail / proton-mail-export

https://proton.me/support/proton-mail-export-tool
GNU General Public License v3.0
2 stars 2 forks source link

Compilation failure on ubuntu 23.04 #2

Open gl-yziquel opened 9 months ago

gl-yziquel commented 9 months ago

Hi.

I've just tried to compile proton-mail-export from git source. Using standard mkdir build, cd build, cmake .., make command line instructions. (There is a dependency in cmake on clang-tidy which I believe should be removed, as that has IMO little to do in this context, but this is besides the point of this bug report.)

I get a build failure, which is tied to an #include <memory> statement:

mini-me@virtucon ~/h/c/p/build (master)> make
-- GLOB mismatch!
-- Running vcpkg install
Detecting compiler hash for triplet x64-linux...
All requested packages are currently installed.
Total install time: 645 ns
catch2 provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(Catch2 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)

cxxopts provides CMake targets:

    # this is heuristically generated, and may not be correct
    find_package(cxxopts CONFIG REQUIRED)
    target_link_libraries(main PRIVATE cxxopts::cxxopts)

The package fmt provides CMake targets:

    find_package(fmt CONFIG REQUIRED)
    target_link_libraries(main PRIVATE fmt::fmt)

    # Or use the header-only version
    find_package(fmt CONFIG REQUIRED)
    target_link_libraries(main PRIVATE fmt::fmt-header-only)

-- Running vcpkg install - done
-- Configuring done (2.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/mini-me/home/cellar/proton-mail-export/build
[  5%] Generating proton-mail-export.so
[  5%] Built target etcore-go-lib-build
[ 10%] Building CXX object lib/CMakeFiles/etcpp.dir/lib/etsession.cpp.o
/home/mini-me/home/cellar/proton-mail-export/lib/include/etsession.hpp:20:10: error: 'memory' file not found [clang-diagnostic-error]
#include <memory>
         ^~~~~~~~
1 error generated.
Error while processing /home/mini-me/home/cellar/proton-mail-export/lib/lib/etsession.cpp.
Found compiler error(s).
make[2]: *** [lib/CMakeFiles/etcpp.dir/build.make:76: lib/CMakeFiles/etcpp.dir/lib/etsession.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:312: lib/CMakeFiles/etcpp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
mini-me@virtucon ~/h/c/p/build (master) [2]>

Some info:

mini-me@virtucon ~/h/c/p/build (master)> uname -a
Linux virtucon 6.2.0-1010-nvidia #10-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 29 17:57:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
mini-me@virtucon ~/h/c/p/build (master)> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.04
Release:        23.04
Codename:       lunar
gl-yziquel commented 9 months ago

I had to install libstdc++-13-dev for the code to compile.

I am not closing this issue as it may be fixed for me but, in the end, I believe this should be handled in the cmake step and not fail in the make step.