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

libzip build issue on vanilla Ubuntu 22.04 #104

Open
donjan opened this issue May 3, 2023 · 2 comments · Fixed by #117
Open

libzip build issue on vanilla Ubuntu 22.04 #104

donjan opened this issue May 3, 2023 · 2 comments · Fixed by #117

Comments

@donjan
Copy link
Contributor

donjan commented May 3, 2023

Running qss-compiler 128c937 on a fresh Ubuntu 22.04 VM with Python 3.10.6.
Default Conan 1.59.0 profile and CMake updated to 3.26.1.

Observed behaviour

The build fails with

CMake Error at cmake/AddQSSC.cmake:115 (target_link_libraries):
  Target "QSSCPayloadZip" links to:

    libzip::zip

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Expected behaviour
The build system should pick up on libzip.

Workaround
Telling CMake to use the OS's zip library works, but requires additional intervention.

--- a/lib/Payload/ZipPayload/CMakeLists.txt
+++ b/lib/Payload/ZipPayload/CMakeLists.txt
@@ -24,7 +24,7 @@ qssc_add_plugin(QSSCPayloadZip QSSC_PAYLOAD_PLUGIN
 
         LINK_LIBS
         QSSCPayload
-        libzip::zip
+        zip
taalexander pushed a commit that referenced this issue Jul 14, 2023
Closes #104 and
#105

Testing was done on a fresh Ubuntu 22.04 VM running on a Ubuntu 22.04
host.
To reproduce, install VirtualBox on the host with:
`sudo apt install virtualbox-qt`
Then download the Ubuntu ISO from:
`https://releases.ubuntu.com/22.04.2/ubuntu-22.04.2-desktop-amd64.iso`
Launch the VirtualBox GUI, install the image, inside the VM install the
common build tools with:
```bash
sudo apt install build-essential git ninja-build python3-pip python3-setuptools-scm
sudo pip install --upgrade pip
sudo pip install cmake  # newer version than repo
sudo pip install --upgrade conan==1.59.0
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
```
Copy the repo into the VM (either by `git clone` with valid credentials
or a passthrough directory to the host) and `cd` into it.
```bash
mkdir build && cd build
conan install .. --build=missing
conan build ..
```

Co-authored-by: Donjan Rodic <[email protected]>
@donjan
Copy link
Contributor Author

donjan commented Jul 14, 2023

Unfortunately, this is not closed by #117 (got autoclosed on merge). Please reopen, should be easy to reproduce.

@taalexander taalexander reopened this Jul 14, 2023
@taalexander
Copy link
Collaborator

My VM failed over the weekend when building LLVM, restarting.

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

Successfully merging a pull request may close this issue.

2 participants