MisterTea/EternalTerminal

Building et on AL2

CmdQ opened this issue · 11 comments

CmdQ commented

I had trouble with my last install (#547), but this time, it doesn't even build. I'm trying to build on Linux #1 SMP Wed Jul 12 19:43:54 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux.

Running cmake3 .. works:

% cmake3 ..
-- Architecture: x86_64
-- VCPKG TRIPLET: x64-linux
-- Running vcpkg install
-- Running vcpkg install - done
-- The C compiler identification is GNU 7.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 7.3.1
-- 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
-- Found OpenSSL: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/debug/lib/libcrypto.a
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found sodium: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/debug/lib/libsodium.a
-- Found Protobuf: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/lib/libprotobuf.a;-lpthread (found version "3.21.12")
-- Found ZLIB: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/lib/libz.a (found version "1.2.13")
-- Found Unwind: /usr/include (found version "1.2")
-- Found httplib: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/include/httplib.h (found version "0.11.3")
-- Found nlohmann_json: /tmp/EternalTerminal/build/vcpkg_installed/x64-linux/share/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.2")
-- Could NOT find UTempter (missing: UTEMPTER_INCLUDE_DIR UTEMPTER_LIBRARIES)
-- cotire 1.8.0 loaded.
-- CXX target et-lib cotired.
-- CXX target TerminalCommon cotired.
-- CXX target et cotired without precompiled header. Too few applicable sources.
-- CXX target etserver cotired without precompiled header. Too few applicable sources.
-- CXX target etterminal cotired without precompiled header. Too few applicable sources.
-- CXX target HtmCommon cotired.
-- CXX target htm cotired without precompiled header. Too few applicable sources.
-- CXX target htmd cotired without precompiled header. Too few applicable sources.
-- CXX target et-test cotired.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/EternalTerminal/build

But then make fails:

% make
Scanning dependencies of target generated-code
[  0%] Running cpp protocol buffer compiler on proto/ET.proto
[  1%] Running cpp protocol buffer compiler on proto/ETerminal.proto
[  1%] Built target generated-code
[  3%] Generating CXX prefix source cotire/et-lib_CXX_prefix.cxx
[  4%] Generating CXX prefix header cotire/et-lib_CXX_prefix.hxx
[  4%] Building CXX precompiled header cotire/et-lib_CXX_prefix.hxx.gch
Scanning dependencies of target et-lib
[  4%] Building CXX object CMakeFiles/et-lib.dir/external/easyloggingpp/src/easylogging++.cc.o
[  6%] Building CXX object CMakeFiles/et-lib.dir/external/PlatformFolders/sago/platform_folders.cpp.o
[  8%] Building CXX object CMakeFiles/et-lib.dir/src/base/BackedReader.cpp.o
[  8%] Building CXX object CMakeFiles/et-lib.dir/src/base/BackedWriter.cpp.o
[  9%] Building CXX object CMakeFiles/et-lib.dir/src/base/ClientConnection.cpp.o
[ 11%] Building CXX object CMakeFiles/et-lib.dir/src/base/Connection.cpp.o
[ 13%] Building CXX object CMakeFiles/et-lib.dir/src/base/CryptoHandler.cpp.o
[ 13%] Building CXX object CMakeFiles/et-lib.dir/src/base/ServerClientConnection.cpp.o
[ 14%] Building CXX object CMakeFiles/et-lib.dir/src/base/ServerConnection.cpp.o
[ 16%] Building CXX object CMakeFiles/et-lib.dir/src/base/SocketHandler.cpp.o
[ 18%] Building CXX object CMakeFiles/et-lib.dir/src/base/PipeSocketHandler.cpp.o
[ 18%] Building CXX object CMakeFiles/et-lib.dir/src/base/TcpSocketHandler.cpp.o
[ 19%] Building CXX object CMakeFiles/et-lib.dir/src/base/UnixSocketHandler.cpp.o
[ 21%] Building CXX object CMakeFiles/et-lib.dir/src/base/LogHandler.cpp.o
/tmp/EternalTerminal/src/base/LogHandler.cpp: In static member function ‘static std::__cxx11::string et::LogHandler::createLogFile(const string&, const string&)’:
/tmp/EternalTerminal/src/base/LogHandler.cpp:87:9: error: ‘create_directories’ is not a member of ‘fs’
     fs::create_directories(path);
         ^~~~~~~~~~~~~~~~~~
/tmp/EternalTerminal/src/base/LogHandler.cpp:87:9: note: suggested alternatives:
In file included from /usr/include/c++/7/experimental/filesystem:41:0,
                 from /tmp/EternalTerminal/src/base/Headers.hpp:109,
                 from /tmp/EternalTerminal/build/cotire/et-lib_CXX_prefix.cxx:4,
                 from /tmp/EternalTerminal/build/cotire/et-lib_CXX_prefix.hxx:4:
/usr/include/c++/7/experimental/bits/fs_ops.h:89:8: note:   ‘std::experimental::filesystem::v1::create_directories’
   bool create_directories(const path& __p, error_code& __ec) noexcept;
        ^~~~~~~~~~~~~~~~~~
/usr/include/c++/7/experimental/bits/fs_ops.h:89:8: note:   ‘std::experimental::filesystem::v1::create_directories’
/tmp/EternalTerminal/src/base/LogHandler.cpp:88:39: error: expected unqualified-id before ‘&’ token
   } catch (const fs::filesystem_error &fse) {
                                       ^
/tmp/EternalTerminal/src/base/LogHandler.cpp:88:39: error: expected ‘)’ before ‘&’ token
/tmp/EternalTerminal/src/base/LogHandler.cpp:88:39: error: expected ‘{’ before ‘&’ token
/tmp/EternalTerminal/src/base/LogHandler.cpp:88:40: error: ‘fse’ was not declared in this scope
   } catch (const fs::filesystem_error &fse) {
                                        ^~~
/tmp/EternalTerminal/src/base/LogHandler.cpp:88:40: note: suggested alternative: ‘fs’
   } catch (const fs::filesystem_error &fse) {
                                        ^~~
                                        fs
make[2]: *** [CMakeFiles/et-lib.dir/src/base/LogHandler.cpp.o] Error 1
make[1]: *** [CMakeFiles/et-lib.dir/all] Error 2
make: *** [all] Error 2

I'm commit 8ce83c9239a881bf433aa29bbd7f0cef3777ea1e with these submodules:

% git submodule status
 97c48e0c343d26d50764fafdc90b1e630fbd10ce external/Catch2 (v3.1.0)
 d096651dfefcec30e91eba48cd52da32059caa8e external/PlatformFolders (4.0.0)
 9a42ec1329f259a5f4881a291db1dcb8f2ad9040 external/ThreadPool (heads/master)
 e6ca24525f28556dd4847443b07dd4b9a4affa9d external/UniversalStacktrace (e6ca245)
 6780d5b26f73fb1df39589d943ea21aefd5c3726 external/base64 (heads/master)
 391bf6b7609e14f5976bd5247b68d63cbf8d4d12 external/cotire (cotire-1.8.0)
 9452c0a4b69c5e4e31169ed32e961d330695122c external/cpp-httplib (v0.10.7)
 eb787304d67ec22f7c3a184ee8b4c481d04357fd external/cxxopts (v3.1.1)
 8489989bb26c6371df103f6cbced3fbee1bc3c2f external/easyloggingpp (v9.80-529-g8489989)
 176d8e261a00dc27bfbf334e12d50572bf43fc4c external/json (v3.9.1-170-g176d8e26)
 6e7deb809120881634b3ca895e66b2a946084f34 external/msgpack-c (cpp-1.3.0-557-g6e7deb80)
 99e159ec9bc8dd362b08d18436bd40ff0648417b external/sanitizers-cmake (99e159e)
 22b9b937272952be0e344c0d6c442878982e8caa external/sentry-native (0.4.14-80-g22b9b93)
 7bca74f6535a37846162383e52071f380c99a43a external/simpleini (4.17-22-g7bca74f)
 424b96931da2ffe1b51c94c212ffca5bae983b1e external/sole (1.0.1-4-g424b969)
 ae59b93af0c1dce4126e963fca5b330662495fa1 external/vcpkg (2022.02.02-3168-gae59b93af)

Did I miss something?

AL2 is Alpine Linux 2? Do you have a Dockerfile that I can run?

CmdQ commented

Sorry. No, it is Amazon Linux what you get by default when spinning up EC2 hosts.

For me, unfortunately, I have to use it. It's a CentOS derivative (has yum) which is why I was following the CentOS guidelines.

It seems you can get it as a container. I got the Amazon Linux 2 x86_64 5.10 Kernel.

CmdQ commented

Wasn't easy, but I arrived at something the runs through Docker (#591). I don't know how you run your tests.

Unfortunately, it's not exactly the same Linux as I only realize now, but a newer version. But let's keep what I got so far.

CmdQ commented

Added one more commit, pull request is now #592 and shows the build failure.

CmdQ commented

Hey, checking in if you already found a lead.

I miss running et, ssh is so inferior. 😞

@CmdQ it's fixed in #596

CmdQ commented

Yes, that does it for me. Thank you!

Once you merge, will it also work from Homebrew on that Linux?

It will be in the next release. Will make a release once we have gcc-13 confirmed working

CmdQ commented

Feel free to close. I didn't want to, in case your using this as a tracker until merged.

Thanks for helping the project