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

building from source on PureOS (Debian) #382

Open
gurucubano opened this issue Jun 25, 2024 · 14 comments
Open

building from source on PureOS (Debian) #382

gurucubano opened this issue Jun 25, 2024 · 14 comments

Comments

@gurucubano
Copy link

OK, let's go the hard way and build from source the gpclient.

I git cloned from from

purism@pureos:~/guru$ rm -rf GlobalProtect-openconnect
purism@pureos:~/guru$ git clone https://github.com/yuezk/GlobalProtect-openconnect.git
Cloning into 'GlobalProtect-openconnect'...
...

installed all the Prerequisites mentioned in README.mdand run:

export INCLUDE_GUI=1
make
/bin/sh: 1: jq: not found
error: failed to parse manifest at `/home/purism/guru/GlobalProtect-openconnect/Cargo.toml`

Caused by:
  invalid type: unit variant, expected string only for key `profile.release.strip`
rm -rf .build/gpgui
if [ 1 -eq 1 ]; then \
	echo "Downloading GlobalProtect GUI..."; \
	mkdir -p .build/gpgui; \
	curl -sSL https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v/gpgui_aarch64.bin.tar.xz \
		-o .build/gpgui/gpgui_aarch64.bin.tar.xz; \
	tar -xJf .build/gpgui/*.tar.xz -C .build/gpgui; \
else \
	echo "Skipping GlobalProtect GUI download (INCLUDE_GUI=0)"; \
fi
Downloading GlobalProtect GUI...
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make: *** [Makefile:67: download-gui] Error 2

The downloaded file contains only

cat .build/gpgui/gpgui_aarch64.bin.tar.xz
Not Found

uname -m
aarch64




.build/gpgui/gpgui_aarch64.bin.tar.xz
@yuezk
Copy link
Owner

yuezk commented Jun 25, 2024

Try to install the jq command first. Looks the doc omit this one.

@gurucubano
Copy link
Author

gurucubano commented Jun 25, 2024

Yep, I saw it in the Makefile what is causing this.
What could jp be for apt install ....?

@yuezk
Copy link
Owner

yuezk commented Jun 25, 2024

It's jq, not jp. Try sudo apt-get install jq

@gurucubano
Copy link
Author

With jq installed it gives now:

$ make
error: failed to parse manifest at `/home/purism/guru/GlobalProtect-openconnect/Cargo.toml`

Caused by:
  invalid type: unit variant, expected string only for key `profile.release.strip`
rm -rf .build/gpgui
if [ 1 -eq 1 ]; then \
	echo "Downloading GlobalProtect GUI..."; \
	mkdir -p .build/gpgui; \
	curl -sSL https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v/gpgui_aarch64.bin.tar.xz \
		-o .build/gpgui/gpgui_aarch64.bin.tar.xz; \
...

The rest are errors due not detecting the VERSION (...) correctly.

@yuezk
Copy link
Owner

yuezk commented Jun 26, 2024

Run the cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version' command in your directly and see what's the output.

@yuezk
Copy link
Owner

yuezk commented Jun 26, 2024

The RUST version must be 1.75 or later. That could be the problem.

@gurucubano
Copy link
Author

gurucubano commented Jun 26, 2024 via email

@gurucubano
Copy link
Author

gurucubano commented Jun 26, 2024 via email

@yuezk
Copy link
Owner

yuezk commented Jun 26, 2024

You need to upgrade Rust to 1.75 or above.

@gurucubano
Copy link
Author

gurucubano commented Jun 26, 2024 via email

@yuezk
Copy link
Owner

yuezk commented Jun 27, 2024

1.4.9 was written in C++, while 2.x was refactored using Rust. And the Rust version is at least 1.75.

@gurucubano
Copy link
Author

I started compiling 1.4.9 from source:

purism@pureos:~/FreeBSD/GlobalProtect-openconnect-1.4.9$ ./scripts/install.sh
-- CMAKE_INSTALL_PREFIX was set to: /usr
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5WebEngine" with
  any of the following names:

    Qt5WebEngineConfig.cmake
    qt5webengine-config.cmake

  Add the installation prefix of "Qt5WebEngine" to CMAKE_PREFIX_PATH or set
  "Qt5WebEngine_DIR" to a directory containing one of the above files.  If
  "Qt5WebEngine" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:23 (find_package)


-- Configuring incomplete, errors occurred!

I’ve install everything which smells of qt5webengine*:

sudo apt install qtbase5-dev
sudo apt install qtdeclarative5-dev
sudo apt install libqt5websockets5
sudo apt install libqt5websockets5-dev
sudo apt install libqt5webengine5
sudo apt install libqt5webchannel5-dev
sudo apt install libqt5webenginewidgets5
sudo apt install libqt5webkit5-dev
sudo apt install libqt5webview5-dev

apt search qt5web* | grep byzantium | grep  installed
libqt5webchannel5/byzantium,now 5.15.2-2 arm64 [installed,automatic]
libqt5webchannel5-dev/byzantium,now 5.15.2-2 arm64 [installed]
libqt5webengine-data/byzantium,now 5.15.2+dfsg-3 all [installed,automatic]
libqt5webengine5/byzantium,now 5.15.2+dfsg-3 arm64 [installed]
libqt5webenginecore5/byzantium,now 5.15.2+dfsg-3 arm64 [installed,automatic]
libqt5webenginewidgets5/byzantium,now 5.15.2+dfsg-3 arm64 [installed]
libqt5webkit5/byzantium,now 5.212.0~alpha4-11 arm64 [installed,automatic]
libqt5webkit5-dev/byzantium,now 5.212.0~alpha4-11 arm64 [installed]
libqt5websockets5/byzantium,now 5.15.2-2 arm64 [installed]
libqt5websockets5-dev/byzantium,now 5.15.2-2 arm64 [installed]
libqt5webview5/byzantium,now 5.15.2-2 arm64 [installed,automatic]
libqt5webview5-dev/byzantium,now 5.15.2-2 arm64 [installed]


ls -C1d /usr/lib/aarch64-linux-gnu/cmake/Qt5Web*
/usr/lib/aarch64-linux-gnu/cmake/Qt5WebChannel
/usr/lib/aarch64-linux-gnu/cmake/Qt5WebKit
/usr/lib/aarch64-linux-gnu/cmake/Qt5WebKitWidgets
/usr/lib/aarch64-linux-gnu/cmake/Qt5WebSockets
/usr/lib/aarch64-linux-gnu/cmake/Qt5WebView

How could I get:

    Qt5WebEngineConfig.cmake
    qt5webengine-config.cmake

@yuezk
Copy link
Owner

yuezk commented Jul 1, 2024

@gurucubano you may need to install the QtWebEngine component on your OS. The package name may vary.

@gurucubano
Copy link
Author

Thank you! With this and another pkg I’ve got it made:

sudo apt install qtwebengine5-dev
sudo apt install qt5keychain-dev



...
[ 98%] Building CXX object GPClient/CMakeFiles/gpclient.dir/gpclient_autogen/EWIEGA46WW/qrc_resources.cpp.o
[100%] Linking CXX executable gpclient
[100%] Built target gpclient
-- Install configuration: "Release"
-- Installing: /usr/bin/gpservice
-- Installing: /usr/share/dbus-1/system.d/com.yuezk.qt.GPService.conf
-- Installing: /usr/share/dbus-1/system-services/com.yuezk.qt.GPService.service
-- Installing: /etc/gpservice/gp.conf
-- Installing: /usr/lib/systemd/system/gpservice.service
-- Installing: /usr/bin/gpclient
...

and it works fine, I can SSH into my company’s network directly from the L5.

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

2 participants