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

Ubuntu Focal build container with HTML5 VNC interface and QtCreator (#343) #344

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

pbek
Copy link

@pbek pbek commented Jun 13, 2020

image

@pbek
Copy link
Author

pbek commented Jun 13, 2020

The external dependencies are now built and installed.
But when I run cmake in QtCreator for ksnip I get an error:

-- XCB: XFIXES requires XCB;RENDER;SHAPE
-- XCB: XFIXES requires XCB;RENDER;SHAPE
-- XCB: XFIXES requires XCB;RENDER;SHAPE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found XCB_XCB: /usr/lib/x86_64-linux-gnu/libxcb.so (found version "1.14") 
-- Could NOT find XCB_RENDER (missing: XCB_RENDER_LIBRARY XCB_RENDER_INCLUDE_DIR) (found version "")
-- Could NOT find XCB_SHAPE (missing: XCB_SHAPE_LIBRARY XCB_SHAPE_INCLUDE_DIR) (found version "")
-- Could NOT find XCB_XFIXES (missing: XCB_XFIXES_LIBRARY XCB_XFIXES_INCLUDE_DIR XCB_RENDER_FOUND XCB_SHAPE_FOUND) (found version "")
-- Could NOT find XCB (missing: XFIXES) (found version "1.14")
-- Configuring done
CMake Error at src/CMakeLists.txt:152 (add_executable):
  Target "ksnip" links to target "XCB::XFIXES" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?

Can you make anything out of it? Several xcb packages are installed.

@pbek
Copy link
Author

pbek commented Jun 13, 2020

I found the missing packages.

@pbek
Copy link
Author

pbek commented Jun 13, 2020

ksnip builds now in QtCreator inside the Docker container 🥳

@pbek
Copy link
Author

pbek commented Jun 13, 2020

image

@pbek pbek changed the title Add bare-bone Ubuntu Focal with HTML5 VNC interface and QtCreator (#343) Ubuntu Focal build container with HTML5 VNC interface and QtCreator (#343) Jun 13, 2020
@pbek
Copy link
Author

pbek commented Jun 13, 2020

I wanted to map the ksnip source code directory in the Docker container to the local ksnip directory in 4e6dd97, but that has the disadvantage that the new owner will be root.

Using an unprivileged user in the Docker container had the disadvantage that its home directory isn't yet available in the Dockerfile. 😬

@pbek
Copy link
Author

pbek commented Jun 13, 2020

I found a way around that. 👍
The ksnip source code directory in the Docker container is now mapped to the local ksnip directory. 😁 Works great unless your local user has another UID than 1000.

You could now test the container yourself if you like.

@DamirPorobic
Copy link
Member

DamirPorobic commented Jun 13, 2020

It fails to run the build script:

Removing intermediate container cfde12e705a9
 ---> 54c69a451d67
Step 6/9 : RUN mkdir /code && cd /code &&     git clone git://github.com/ksnip/kColorPicker &&     git clone git://github.com/ksnip/kImageAnnotator &&     git clone git://github.com/KDE/extra-cmake-modules
 ---> Running in 9923882cca76
Cloning into 'kColorPicker'...
Cloning into 'kImageAnnotator'...
Cloning into 'extra-cmake-modules'...
Removing intermediate container 9923882cca76
 ---> d8e4d529eae7
Step 7/9 : COPY build-deps.sh /code
 ---> 97fbaeb6f871
Step 8/9 : RUN /code/build-deps.sh
 ---> Running in abe35999b985
/bin/sh: 1: /code/build-deps.sh: not found
ERROR: Service 'desktop' failed to build: The command '/bin/sh -c /code/build-deps.sh' returned a non-zero code: 127

Under OpenSUSE I need to run docker with sudo, could it be related to that?

@DamirPorobic
Copy link
Member

Very strange, the file is there, I'm in the correct directory, I'm root, the file has the execute bit but still is says "file not found".

Step 9/10 : RUN ls -al && pwd && whoami && exec build-deps.sh
 ---> Running in 198ef28d5554
total 24
drwxr-xr-x  1 root root 4096 Jun 13 20:28 .
drwxr-xr-x  1 root root 4096 Jun 13 20:30 ..
-rwxr-xr-x  1 root root  705 Jun 13 20:28 build-deps.sh
drwxr-xr-x 12 root root 4096 Jun 13 20:04 extra-cmake-modules
drwxr-xr-x 10 root root 4096 Jun 13 20:04 kColorPicker
drwxr-xr-x 11 root root 4096 Jun 13 20:04 kImageAnnotator
/code
root
/bin/sh: 1: exec: build-deps.sh: not found

@pbek
Copy link
Author

pbek commented Jun 13, 2020

Under OpenSUSE I need to run docker with sudo, could it be related to that?

Maybe you need to do a sudo docker-compose build.

@DamirPorobic
Copy link
Member

Nah, it's not that, looks like something wrong with the fileformat of the script. I've started the container and tried to run the script from there and got this error:
/bin/sh^M : bad interpreter

After fixing the file like described here in the solution it worked from the container. Now I'm trying to build again after I've fixed the file in the repo.

@DamirPorobic
Copy link
Member

Didn't work and now the container is also not coming up, running build or up results in same behavior or console output. Need to restart I guess.

@pbek
Copy link
Author

pbek commented Jun 13, 2020

Strange, never saw that issue before. Meanwhile I pushed a version to https://hub.docker.com/r/pbeke/ksnip-desktop.

@DamirPorobic
Copy link
Member

Thanks a lot :)

I'll try to fix the script tomorrow.

@pbek
Copy link
Author

pbek commented Jun 13, 2020

If you want to test the pre-built container 😁

docker-compose up ksnip-desktop-pre-built

@pbek
Copy link
Author

pbek commented Jun 14, 2020

Nice, I'm able to run the ksnip binary, built inside the container outside of the container.

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 this pull request may close these issues.

None yet

2 participants