Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions for CentOS7 #180

Closed
NicolasRouquette opened this issue Mar 30, 2019 · 13 comments
Closed

Installation instructions for CentOS7 #180

NicolasRouquette opened this issue Mar 30, 2019 · 13 comments

Comments

@NicolasRouquette
Copy link

Building ET on CentOS7 is tricky.

First, the cmake utility is too old (2.8) so we have to install cmake3 explicitly:

yum -y install epel-release
yum install cmake3

(found this tip here: https://www.heliocastro.info/?p=238#comment-5624)

Next, building failed:

cmake3 ../
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- 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
-- 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 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  
-- Could NOT find GFLAGS (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) 
CMake Error at /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake3/Modules/FindProtobuf.cmake:543 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:44 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeOutput.log".
See also "/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeError.log".

Here's the error log:

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_e3e96/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_e3e96.dir/build.make CMakeFiles/cmTC_e3e96.dir/build
gmake[1]: Entering directory `/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e3e96.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_e3e96.dir/CheckSymbolExists.c.o   -c /home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_e3e96
/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_e3e96.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_e3e96.dir/CheckSymbolExists.c.o  -o cmTC_e3e96 
CMakeFiles/cmTC_e3e96.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_e3e96] Error 1
gmake[1]: Leaving directory `/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_e3e96/fast] Error 2

File /home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_0f3b9/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_0f3b9.dir/build.make CMakeFiles/cmTC_0f3b9.dir/build
gmake[1]: Entering directory `/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0f3b9.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_0f3b9.dir/CheckFunctionExists.c.o   -c /usr/share/cmake3/Modules/CheckFunctionExists.c
Linking C executable cmTC_0f3b9
/usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_0f3b9.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_0f3b9.dir/CheckFunctionExists.c.o  -o cmTC_0f3b9 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_0f3b9] Error 1
gmake[1]: Leaving directory `/home/rouquett/tools/EternalTerminal/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_0f3b9/fast] Error 2
@MisterTea
Copy link
Owner

It looks like you are missing gflags and protobuf. IIRC on centos the packages are google-gflags and protobuf-devel . Please add to the README so future people know how to compile on centos

@NicolasRouquette
Copy link
Author

@MisterTea Can you please be more specific about what you're suggesting?

@MisterTea
Copy link
Owner

sudo yum install protobuf-devel protobuf-compiler gflags-devel libsodium-devel libutempter-devel

Then rerun cmake.

@NicolasRouquette
Copy link
Author

Thanks, that worked.

Unfortunately, I can't use et because our CentOS-based VM is in the GovCloud where we have a mandatory banner on login; so all I get is:

Error in authentication with etserver: Error:  Connection error communicating with et deamon: No such file or directory.
, please make sure you don't print anything in server's .bashrc/.zshrc

@MisterTea
Copy link
Owner

That's fixed in master. What are you using for a client? On mac, you can "brew install --HEAD et" to get master branch

@NicolasRouquette
Copy link
Author

I'm running on Ubuntu 18.04 LTS

I followed these instructions:

sudo add-apt-repository ppa:jgmath2000/et
sudo apt-get update
sudo apt-get install et

Should I use something else?

@MisterTea
Copy link
Owner

MisterTea commented Apr 1, 2019 via email

@NicolasRouquette
Copy link
Author

Argh... on ubuntu 18.04 LTS, I couldn't build:

sudo apt-get install cmake

then:

cmake ../
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- 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
-- 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 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 GFLAGS: /usr/include  
CMake Warning at /usr/share/cmake-3.10/Modules/FindProtobuf.cmake:455 (message):
  Protobuf compiler version doesn't match library version 3.0.0
Call Stack (most recent call first):
  CMakeLists.txt:44 (find_package)


-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0") 
-- Found sodium: /usr/lib/x86_64-linux-gnu/libsodium.so  
-- Found UTempter: /usr/include  
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/local/imce/github.utils/EternalTerminal/build

Then:

 make
CMakeFiles/generated-code.dir/build.make:63: *** target pattern contains no '%'.  Stop.
CMakeFiles/Makefile2:179: recipe for target 'CMakeFiles/generated-code.dir/all' failed
make[1]: *** [CMakeFiles/generated-code.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

@NicolasRouquette
Copy link
Author

line 63 of CMakeFiles/generated-code.dir/build.make is the 2nd line below:

ET.pb.cc: ../proto/ET.proto                                                                                                                                            
ET.pb.cc: ../protobuf::protoc                                                                                                                                          
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/opt/local/imce/github.utils/EternalTerminal/build/CMakeFiles --progress-\
num=$(CMAKE_PROGRESS_1) "Running C++ protocol buffer compiler on proto/ET.proto"                                                                                       
        protobuf::protoc --cpp_out=/opt/local/imce/github.utils/EternalTerminal/build -I /opt/local/imce/github.utils/EternalTerminal/proto /opt/local/imce/github.uti\
ls/EternalTerminal/proto/ET.proto        

@MisterTea
Copy link
Owner

"Protobuf compiler version doesn't match library version 3.0.0"

That sounds bad. Can you run "ccmake ../" and see what the difference is between protobuf and protobuf compiler?

@TraceyC77
Copy link
Contributor

On a related note, the installation documentation on the main Download page https://eternalterminal.dev/download/ are out of date in respect to the instructions on https://github.com/MisterTea/EternalTerminal

@MisterTea
Copy link
Owner

@NicolasRouquette were you able to get the protobuf issue resolved? It looks like compiling in centos works

@salemhilal
Copy link

For what it's worth, the installation instructions now in the README were enough for me to get the service running on CentOS 7. My local client (mac osx) hangs still when trying to connect (in a hard, non-killzble way), and I'm not sure if that's related or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants