Hi guys,
I'm looking to make something kind of like an SSH client, except it'll control Windows using the RDP protocol (since it's extremely common for Windows Servers to have Remote Desktop enabled, but extremely rare for them to have an SSH server set up.) I figure I'll start with FreeRDP (an open source implementation of a Remote Desktop Client) and then make it so that when a connection is made, it automatically launch CMD and run whatever command you pass it, then it'll respond with the output and close the CMD session.
Link to directions for compiling FreeRDP: https://github.com/FreeRDP/FreeRDP/wiki/Compilation
So I've cloned it with git. I have CMake 3.5.2 installed. I tried running the command to compile it on Mac:
And it spat out this:
I can't tell - what's important here and what isn't? It says a lot of files aren't found, but then it continues... does that indicate that those files are optional and just some features won't be enabled, or are they important to have and that's why the build fails?
The last one catches my attention, about it trying and failing to find OpenSSL. I'd guess it's pretty important and non-optional, since I know RDP encrypts all of its communications.
I have OpenSSL installed... at least an executable. I can do
and it tells me I have it at /usr/bin/openssl
Is that what this build script wants? Or is there some sort of library that I need to tell it about using the OPENSSL_ROOT_DIR environment variable?
Then again, the CMakeError.log file makes me feel like OpenSSL isn't the reason my configuration failed, because there's no mention of it there.
The contents of CMakeError.log:
So what do you guys think? What's important that I fix... and then how do I fix them?
I'm looking to make something kind of like an SSH client, except it'll control Windows using the RDP protocol (since it's extremely common for Windows Servers to have Remote Desktop enabled, but extremely rare for them to have an SSH server set up.) I figure I'll start with FreeRDP (an open source implementation of a Remote Desktop Client) and then make it so that when a connection is made, it automatically launch CMD and run whatever command you pass it, then it'll respond with the output and close the CMD session.
Link to directions for compiling FreeRDP: https://github.com/FreeRDP/FreeRDP/wiki/Compilation
So I've cloned it with git. I have CMake 3.5.2 installed. I tried running the command to compile it on Mac:
Code:
/Applications/CMake.app/contents/bin/cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64" . && make
And it spat out this:
Code:
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28")
-- FreeRDP GIT
-- Git Revision bd7ed27
-- Performing Test Wno-deprecated-declarations
-- Performing Test Wno-deprecated-declarations - Success
-- Performing Test Wno-deprecated-declarationsCXX
-- Performing Test Wno-deprecated-declarationsCXX - Success
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file execinfo.h
-- Looking for include file execinfo.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file sys/modem.h
-- Looking for include file sys/modem.h - not found
-- Looking for include file sys/filio.h
-- Looking for include file sys/filio.h - found
-- Looking for include file sys/sockio.h
-- Looking for include file sys/sockio.h - found
-- Looking for include file sys/strtio.h
-- Looking for include file sys/strtio.h - not found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - found
-- Looking for include file syslog.h
-- Looking for include file syslog.h - found
-- Performing Test HAVE_TM_GMTOFF
-- Performing Test HAVE_TM_GMTOFF - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for pthread_mutex_timedlock in pthread
-- Looking for pthread_mutex_timedlock in pthread - not found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - not found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - not found
-- Looking for include file sys/timerfd.h
-- Looking for include file sys/timerfd.h - not found
-- Looking for include file poll.h
-- Looking for include file poll.h - found
-- Looking for ceill
-- Looking for ceill - found
-- Finding recommended feature libsystemd for systemd journal appender (allows to export wLog to systemd journal)
-- Disable feature libsystemd using "-DWITH_LIBSYSTEMD=OFF"
-- Could NOT find libsystemd (missing: LIBSYSTEMD_LIBRARY LIBSYSTEMD_INCLUDE_DIR)
CMake Warning at cmake/FindFeature.cmake:46 (message):
feature libsystemd was requested but could not be found! ON / FALSE
Call Stack (most recent call first):
CMakeLists.txt:642 (find_feature)
-- Skipping optional feature X11 for X11 (X11 client and server)
-- Enable feature X11 using "-DWITH_X11=ON"
-- Skipping disabled feature Wayland for Wayland (Wayland client)
-- Skipping disabled feature DirectFB for DirectFB (DirectFB client)
-- Finding required feature ZLIB for compression (data compression)
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Finding required feature OpenSSL for cryptography (encryption, certificate validation, hashing functions)
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOpenSSL.cmake:317 (find_package_handle_standard_args)
cmake/FindFeature.cmake:16 (find_package)
CMakeLists.txt:674 (find_feature)
-- Configuring incomplete, errors occurred!
See also "/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeOutput.log".
See also "/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeError.log".
I can't tell - what's important here and what isn't? It says a lot of files aren't found, but then it continues... does that indicate that those files are optional and just some features won't be enabled, or are they important to have and that's why the build fails?
The last one catches my attention, about it trying and failing to find OpenSSL. I'd guess it's pretty important and non-optional, since I know RDP encrypts all of its communications.
I have OpenSSL installed... at least an executable. I can do
Code:
which openssl
and it tells me I have it at /usr/bin/openssl
Is that what this build script wants? Or is there some sort of library that I need to tell it about using the OPENSSL_ROOT_DIR environment variable?
Then again, the CMakeError.log file makes me feel like OpenSSL isn't the reason my configuration failed, because there's no mention of it there.
The contents of CMakeError.log:
Code:
Determining if files sys/modem.h exist failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_5e193/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_5e193.dir/build.make CMakeFiles/cmTC_5e193.dir/build
Building C object CMakeFiles/cmTC_5e193.dir/CheckIncludeFiles.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_5e193.dir/CheckIncludeFiles.c.o -c /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'sys/modem.h' file not found
#include <sys/modem.h>
^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_5e193.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTC_5e193/fast] Error 2
Source:
/* */
#include <sys/modem.h>
int main(void){return 0;}
Determining if files sys/strtio.h exist failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_23450/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_23450.dir/build.make CMakeFiles/cmTC_23450.dir/build
Building C object CMakeFiles/cmTC_23450.dir/CheckIncludeFiles.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_23450.dir/CheckIncludeFiles.c.o -c /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'sys/strtio.h' file not found
#include <sys/strtio.h>
^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_23450.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTC_23450/fast] Error 2
Source:
/* */
#include <sys/strtio.h>
int main(void){return 0;}
Determining if the function pthread_mutex_timedlock exists in the pthread failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_8c537/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_8c537.dir/build.make CMakeFiles/cmTC_8c537.dir/build
Building C object CMakeFiles/cmTC_8c537.dir/CheckFunctionExists.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -DCHECK_FUNCTION_EXISTS=pthread_mutex_timedlock -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_8c537.dir/CheckFunctionExists.c.o -c /Applications/CMake.app/Contents/share/cmake-3.5/Modules/CheckFunctionExists.c
Linking C executable cmTC_8c537
/Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8c537.dir/link.txt --verbose=1
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -DCHECK_FUNCTION_EXISTS=pthread_mutex_timedlock -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_8c537.dir/CheckFunctionExists.c.o -o cmTC_8c537 -lpthread
Undefined symbols for architecture x86_64:
"_pthread_mutex_timedlock", referenced from:
_main in CheckFunctionExists.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_8c537] Error 1
make: *** [cmTC_8c537/fast] Error 2
Determining if files sys/eventfd.h exist failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_eba47/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_eba47.dir/build.make CMakeFiles/cmTC_eba47.dir/build
Building C object CMakeFiles/cmTC_eba47.dir/CheckIncludeFiles.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_eba47.dir/CheckIncludeFiles.c.o -c /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'sys/eventfd.h' file not found
#include <sys/eventfd.h>
^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_eba47.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTC_eba47/fast] Error 2
Source:
/* */
#include <sys/eventfd.h>
int main(void){return 0;}
Determining if files sys/eventfd.h exist failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_56f4d/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_56f4d.dir/build.make CMakeFiles/cmTC_56f4d.dir/build
Building C object CMakeFiles/cmTC_56f4d.dir/CheckIncludeFiles.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_56f4d.dir/CheckIncludeFiles.c.o -c /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'sys/eventfd.h' file not found
#include <sys/eventfd.h>
^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_56f4d.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTC_56f4d/fast] Error 2
Source:
/* */
#include <sys/eventfd.h>
int main(void){return 0;}
Determining if files sys/timerfd.h exist failed with the following output:
Change Dir: /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_48ed0/fast"
/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_48ed0.dir/build.make CMakeFiles/cmTC_48ed0.dir/build
Building C object CMakeFiles/cmTC_48ed0.dir/CheckIncludeFiles.c.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-deprecated-declarations -DWINPR_EXPORTS -DFREERDP_EXPORTS -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fPIE -o CMakeFiles/cmTC_48ed0.dir/CheckIncludeFiles.c.o -c /Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/Users/Taylor/Dropbox/Programming/FreeRDP/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'sys/timerfd.h' file not found
#include <sys/timerfd.h>
^
1 error generated.
make[1]: *** [CMakeFiles/cmTC_48ed0.dir/CheckIncludeFiles.c.o] Error 1
make: *** [cmTC_48ed0/fast] Error 2
Source:
/* */
#include <sys/timerfd.h>
int main(void){return 0;}
So what do you guys think? What's important that I fix... and then how do I fix them?