mozilla-mobile / mozilla-vpn-client

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

Fail to build mozila-vpn-client on Debian Buster #995

Closed zekefast closed 1 year ago

zekefast commented 3 years ago

Description

I found no binaries for Debian Buster, so decided to build it from source as suggested in "Other Linux distributions" section on the https://support.mozilla.org/en-US/kb/how-install-mozilla-vpn-linux-computer page.

I followed instructions in README.md.

I successfully compiled Qt5 using instructions. One thing that I had to do is to install clang and llvm packages on my system which led to installation of clang-7 and llvm-7 packages.

./scripts/generate_clean.py

from https://github.com/mozilla-mobile/mozilla-vpn-client/#initialization did not worked, but I assumed that I had to run ./scripts/generate_glean.py instead. generate_clean.py is absent at the given location.

And instead of python scripts/importLanguages.py I ran python3 scripts/importLanguages.py which succeeded.

After all of this I started building and make -j$(nproc) failed with

~/repos/mozilla-vpn-client (main % u=)$ make -j$(nproc)
cd src/ && ( test -e Makefile || ~/repos/mozilla-vpn-client/qt/qt/bin/qmake -o Makefile ~/repos/mozilla-vpn-client/src/src.pro CONFIG+=production ) && make -f Makefile 
cd tests/unit/ && ( test -e Makefile || ~/repos/mozilla-vpn-client/qt/qt/bin/qmake -o Makefile ~/repos/mozilla-vpn-client/tests/unit/unit.pro CONFIG+=production ) && make -f Makefile 
make[1]: Entering directory '~/repos/mozilla-vpn-client/tests/unit'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory '~/repos/mozilla-vpn-client/tests/unit'
make[1]: Entering directory '~/repos/mozilla-vpn-client/src'
make[1]: *** No rule to make target '../translations/mozillavpn_oc.ts', needed by '.qm/mozillavpn_oc.qm'.  Stop.
make[1]: Leaving directory '~/repos/mozilla-vpn-client/src'
make: *** [Makefile:48: sub-src-make_first] Error 2

My Installed Package Versions

As was request in dependencies I installed them, but with some differences in versions.

Environment

$ uname -a
Linux zf-mws 5.10.0-0.bpo.5-amd64 #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) x86_64 GNU/Linux
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Issue

Could you please help me resolve this compilation errors so I can try the service?

┆Issue is synchronized with this Jira Bug ┆Reporter: Data Sync

oskirby commented 3 years ago

It seems that the build is failing because something wasn't generated correctly by scripts/importLanguages.py. The expected outcome should go something like this:

However, it sounds like the script was able to find enough of the locales to build translations/translations.pri but it either failed to generate translations/mozillavpn_oc.ts or placed it in the wrong location.

Could you provide us with a listing of the files in the translations directory to see what got created there?

zekefast commented 3 years ago

@oskirby Today I complete removed the repository, cloned it again with --recurse-submodules and I repeated all the instructions from https://github.com/mozilla-mobile/mozilla-vpn-client#qt5 and https://github.com/mozilla-mobile/mozilla-vpn-client#initialization

For the locale generation I got the following output:

$ ./scripts/importLanguages.py
Step 0: Locate the lupdate and lconvert tools...
Step 1: Validate the XLIFF file...
OK  - co added (100.0% translated)
OK  - cy added (100.0% translated)
OK  - de added (100.0% translated)
OK  - dsb added (100.0% translated)
OK  - el added (100.0% translated)
OK  - en added (reference locale)
OK  - en_CA added (100.0% translated)
OK  - en_GB added (100.0% translated)
OK  - es_AR added (100.0% translated)
OK  - es_MX added (99.43% translated)
OK  - fr added (100.0% translated)
OK  - fy_NL added (100.0% translated)
OK  - hsb added (100.0% translated)
OK  - hu added (100.0% translated)
OK  - ia added (100.0% translated)
OK  - it added (100.0% translated)
OK  - ja added (100.0% translated)
OK  - nl added (100.0% translated)
OK  - oc added (100.0% translated)
OK  - pt_BR added (100.0% translated)
OK  - ru added (100.0% translated)
OK  - sk added (100.0% translated)
OK  - sq added (100.0% translated)
OK  - sv_SE added (100.0% translated)
OK  - uk added (100.0% translated)
OK  - zh_TW added (100.0% translated)
Step 2: Create folders and localization files for the languages...
Step 3: Write PRI file to import the locales that are ready...
Step 4: Generate the Js/C++ string definitions...
Step 5: Generate new ts files...
lupdate: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lupdate': No such file or directory
Step 5: Now merge translations into the files...
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
Imported 26 locales

But when I ran compilation I got the next error:

$ make -j$(nproc)
make: *** No targets specified and no makefile found.  Stop.

Here is the content of translations/ directory:

$ tree translations/
translations/
|-- co
|   `-- locversion.plist
|-- cy
|   `-- locversion.plist
|-- de
|   `-- locversion.plist
|-- dsb
|   `-- locversion.plist
|-- el
|   `-- locversion.plist
|-- en
|   `-- locversion.plist
|-- en_CA
|   `-- locversion.plist
|-- en_GB
|   `-- locversion.plist
|-- es_AR
|   `-- locversion.plist
|-- es_MX
|   `-- locversion.plist
|-- fr
|   `-- locversion.plist
|-- fy_NL
|   `-- locversion.plist
|-- generated
|   |-- l18nstrings.h
|   `-- l18nstrings_p.cpp
|-- hsb
|   `-- locversion.plist
|-- hu
|   `-- locversion.plist
|-- ia
|   `-- locversion.plist
|-- it
|   `-- locversion.plist
|-- ja
|   `-- locversion.plist
|-- nl
|   `-- locversion.plist
|-- oc
|   `-- locversion.plist
|-- pt_BR
|   `-- locversion.plist
|-- ru
|   `-- locversion.plist
|-- servers-template.json
|-- servers.json
|-- servers.qrc
|-- sk
|   `-- locversion.plist
|-- sq
|   `-- locversion.plist
|-- strings.yaml
|-- sv_SE
|   `-- locversion.plist
|-- translations.pri
|-- uk
|   `-- locversion.plist
`-- zh_TW
    `-- locversion.plist

27 directories, 33 files

Do you have an idea how to solve issue with the make command and absent target?

data-sync-user commented 1 year ago

➤ Andrea Marchesini commented:

Can we close this bug?

data-sync-user commented 1 year ago

➤ Andrea Marchesini commented:

See the latest comments