Aorimn / dislocker

FUSE driver to read/write Windows' BitLocker-ed volumes under Linux / Mac OSX
GNU General Public License v2.0
1.59k stars 196 forks source link

Unable to build code on CentOS 7 #205

Open rohanphathiwala opened 4 years ago

rohanphathiwala commented 4 years ago

I am trying to build the latest code on CentOS 7, however I am getting the following error on screen when I do cmake .

[rohan@rohansde dislocker]$ cmake . -- The C 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 CMake Error at cmake/FindPackageHandleStandardArgs.cmake:64 (cmake_parse_arguments): Unknown CMake command "cmake_parse_arguments". Call Stack (most recent call first): cmake/FindPolarSSL.cmake:44 (find_package_handle_standard_args) src/CMakeLists.txt:115 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/rohan/dislocker/dislocker/CMakeFiles/CMakeOutput.log". Am I missing any dependency packages?

Attaching CMakeOutput.log CMakeOutput.log

rwehrli commented 4 years ago

cmake/FindPolarSSL.cmake:44 (find_package_handle_standard_args) src/CMakeLists.txt:115 (find_package)

I am seeing the exact same issue on CentOS 7...and mbedtls is installed.

KGardevoir commented 4 years ago

This issue is caused by the use of the HINTS directive in cmake/FindPolarSSL.cmake. To get it to compile change:

find_path(POLARSSL_INCLUDE_DIRS NAMES mbedtls/ssl.h HINTS /usr/local/include)

to

find_path(POLARSSL_INCLUDE_DIRS NAMES mbedtls/ssl.h HINTS /usr/local/include /usr/include)

If I can get around to it I'll submit a pull request if desired.

burnalting commented 4 years ago

Not quite, I'm afraid as per

[burn@swtf1 ~]$ git clone https://github.com/Aorimn/dislocker.git
Cloning into 'dislocker'...
remote: Enumerating objects: 3453, done.
remote: Total 3453 (delta 0), reused 0 (delta 0), pack-reused 3453
Receiving objects: 100% (3453/3453), 891.12 KiB | 326.00 KiB/s, done.
Resolving deltas: 100% (2388/2388), done.
[burn@swtf1 ~]$ cd dislocker/
[burn@swtf1 dislocker]$ uname -a
Linux swtf1.swtf.dyndns.org 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[burn@swtf1 dislocker]$ cmake .
-- The C 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
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:64 (cmake_parse_arguments):
  Unknown CMake command "cmake_parse_arguments".
Call Stack (most recent call first):
  cmake/FindPolarSSL.cmake:44 (find_package_handle_standard_args)
  src/CMakeLists.txt:115 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/burn/dislocker/CMakeFiles/CMakeOutput.log".
[burn@swtf1 dislocker]$ vi cmake/FindPolarSSL.cmake
[burn@swtf1 dislocker]$ grep find_path !$
grep find_path cmake/FindPolarSSL.cmake
find_path(POLARSSL_INCLUDE_DIRS NAMES mbedtls/ssl.h HINTS /usr/local/include /usr/include)
  find_path(POLARSSL_INCLUDE_DIRS NAMES polarssl/ssl.h)
[burn@swtf1 dislocker]$ cmake .
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:64 (cmake_parse_arguments):
  Unknown CMake command "cmake_parse_arguments".
Call Stack (most recent call first):
  cmake/FindPolarSSL.cmake:44 (find_package_handle_standard_args)
  src/CMakeLists.txt:115 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/burn/dislocker/CMakeFiles/CMakeOutput.log".
[burn@swtf1 dislocker]$ uname -a
Linux swtf1.swtf.dyndns.org 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[burn@swtf1 dislocker]$ cat /etc/redhat-release 
CentOS Linux release 7.8.2003 (Core)
[burn@swtf1 dislocker]$ sudo yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.launtel.net.au
 * centos-qemu-ev: mirror.nsw.coloau.com.au
 * epel: mirror.in2p3.fr
 * extras: mirror.nsw.coloau.com.au
 * updates: mirror.nsw.coloau.com.au
No packages marked for update
[burn@swtf1 dislocker]$ 
KGardevoir commented 4 years ago

That particular problem is being caused by using cmake2 not cmake3

burnalting commented 4 years ago

Thanks. To close this off, one installs cmake3 on Centos 7 as per the following link

KGardevoir commented 4 years ago

That is not strictly necessary. Just installing cmake3 (from the EPEL repository) and running cmake3 instead of cmake during configuration will accomplish the same thing.

rwehrli commented 4 years ago

I probably should have mentioned that I have successfully built it using cmake3...which I tried almost immediately after modifying the cmake file to add the additional search/find path. By default, my cmake is aliased to cmake2 and not cmake3...so I invoked cmake3 and it worked (at least built).

I now need to test the built artifacts to ensure that it no longer segfaults.

Take Care.

Rob!

On Tue, Sep 29, 2020 at 12:23 PM Enmar Abrams notifications@github.com wrote:

That is not strictly necessary. Just installing cmake3 (from the EPEL repository) and running cmake3 instead of cmake during configuration will accomplish the same thing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aorimn/dislocker/issues/205#issuecomment-700818399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5ANYXZ3HM7LCJG73EIGADSIICZNANCNFSM4JZ3HN5A .