mozilla-mobile / mozilla-vpn-client

A fast, secure and easy to use VPN. Built by the makers of Firefox.
https://vpn.mozilla.org
Other
465 stars 113 forks source link

Arch Linux Build Fails (CMAKE_MAKE_PROGRAM is not set. && /usr/bin/cc - broken) #8453

Open aemonge opened 1 year ago

aemonge commented 1 year ago

Describe the bug When trying to install the VPN with a arch linux (steam deck), i'm getting the following error after instlled the QT library:

❯ cmake --fresh -S . -B build -DCMAKE_PREFIX_PATH=~/opt/qt/6.6.0/gcc_64/lib/cmake
Configuring for Unix Makefiles
Setting build type Debug
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

which I've fixed with the following, but got another error

❯ cmake --fresh -S . -B build -DCMAKE_PREFIX_PATH=~/opt/qt/6.6.0/gcc_64/lib/cmake -DCMAKE_MAKE_PROGRAM=/home/deck/.conda/envs/vpn/bin/cmake
Configuring for Unix Makefiles
Setting build type Debug
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /home/deck/.conda/envs/vpn/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/deck/opt/mozilla-vpn-client/build/CMakeFiles/CMakeScratch/TryCompile-jKbEp8

    Run Build Command(s):/home/deck/.conda/envs/vpn/bin/cmake -E env VERBOSE=1 /home/deck/.conda/envs/vpn/bin/cmake -f Makefile cmTC_9011b/fast && CMake Warning:
      Ignoring extra path from command line:

       "cmTC_9011b/fast"

    CMake Error: Unknown argument -f
    CMake Error: Run 'cmake --help' for all supported options.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:15 (project)

-- Configuring incomplete, errors occurred!

┆Issue is synchronized with this Jira Bug

oskirby commented 12 months ago

Hey @aemonge I think you have specified the value of CMAKE_MAKE_PROGRAM incorrectly here. The typical build flow for this software is that we use CMake to find build dependencies and generate makefiles, which then hands off the building of the software to a program like GNU Make. The error happening here is that you have provided CMake in place of GNU Make.

Normally, we would expect to find the make program in the $PATH environment variable, and the fact that it was not found points to a lack of build tools in the environment.

Furthermore, Arch Linux is not a currently supported Linux distribution, so I am afraid that you are also in uncharted territory here. I believe that the software should be buildable on Arch, but we don't have any experience or documentation on hand to draw from.

aemonge commented 12 months ago

Hi @oskirby ,

Thanks a lot for the support. I know Arch is a bit different, but performance wise it excels (ask steam and the steam deck), so it would be great if mozilla can do more effort in this sense.

I'll keep this thread open for me, right now I need to update the packages; and that would take a bit more time for me to do so. As soon as a I find a solution, I'll post it here for anyone else looking for Arch support :)

aemonge commented 11 months ago

Hey @oskirby , any ideas on how to solve this error:

Using Qt version 6.4.0
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1q")  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'libsecret-1'
--   Found libsecret-1, version 0.20.5
Building sentry for Linux
-- Checking for module 'libsecret-1'
--   Found libsecret-1, version 0.20.5
-- Checking for module 'libcap'
--   Found libcap, version 2.66
-- Checking for module 'systemd'
--   Found systemd, version 251
CMake Error at src/CMakeLists.txt:66 (qt6_add_qml_module):
  Unknown CMake command "qt6_add_qml_module".