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

debian bullseye: python packages missing from buildserver #4082

Closed
markus2330 opened this issue Oct 7, 2021 · 9 comments · Fixed by #4261
Closed

debian bullseye: python packages missing from buildserver #4082

markus2330 opened this issue Oct 7, 2021 · 9 comments · Fixed by #4261
Assignees
Labels
bug build cm2022s for university course triage needed Issue needs clarifications. urgent
Milestone

Comments

@markus2330
Copy link
Contributor

markus2330 commented Oct 7, 2021

@dev2718 said that it could be a wrong hard-coded swig3.0 reference. This was needed for older Debian versions but with new Debian versions it leads to not building the python binding (as swig3.0 is not available).

doc/COMPILE.md:-DSWIG_EXECUTABLE=/usr/bin/swig3.0
doc/COMPILE.md:For Bindings swig3 is recommended. swig2 only works on some distributions.
doc/COMPILE.md:Thus you need to install swig3 manually:
scripts/packaging/package.sh:   -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
scripts/docker/debian/buster/Dockerfile:        swig3.0 \
scripts/docker/debian/stretch/Dockerfile:        swig3.0 \
scripts/docker/ubuntu/focal/Dockerfile:RUN ln -s /usr/bin/swig /usr/bin/swig3.0
scripts/docker/legacy/Dockerfile:       swig3.0 \
scripts/dev/configure-home:cmake -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
scripts/dev/configure-debian-log:cmake -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
scripts/dev/configure-debian-debug:cmake -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
scripts/dev/configure-debian-optimizations:cmake -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
scripts/dev/configure-ini:cmake -DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
src/bindings/swig/python/README.md:-DSWIG_EXECUTABLE=/usr/bin/swig3.0 \
@buhtz
Copy link

buhtz commented Oct 7, 2021

I never tried to installed it from the build-servers repository because I was not aware of its existence. Sorry.

https://www.libelektra.org/installation/installation

How does "redshift" react when there is no "elektra" present on a system?
For example "redshift" is in the official Debian repository, but "elektra" not. How is "redshift" packed then?

EDIT:
I would also recommand to mention the "Install" (https://www.libelektra.org/installation/installation) section in the "Get started" (https://www.libelektra.org/getstarted/guide) section.
I was not able to "Get started" because I did not know how to install elektra for use in Python.

@markus2330
Copy link
Contributor Author

How does "redshift" react when there is no "elektra" present on a system?

As the PR is now it will fail in ./configure.

For example "redshift" is in the official Debian repository, but "elektra" not. How is "redshift" packed then?

Elektra will have to be added to Debian's official repository (again).

mention the "Install" (https://www.libelektra.org/installation/installation) section in the "Get started" (https://www.libelektra.org/getstarted/guide) section.

There is a link to doc/INSTALL.md in doc/GETSTARTED.md, can you maybe create an issue or PR with the text you would have expected?

@markus2330 markus2330 added bug build cm2022s for university course triage needed Issue needs clarifications. urgent labels Oct 13, 2021
@4ydan 4ydan self-assigned this Oct 20, 2021
@4ydan
Copy link
Contributor

4ydan commented Oct 20, 2021

FLOSS H1

I m not sure If I did the right triage as I did not fully understand the problem. So I tried building elektra on debian and buster and checked if the python binding was included.

Debian buster

1. start docker container

2.

sudo apt get update

3.

sudo apt-get install cmake git build-essential

4.

git clone https://github.com/ElektraInitiative/libelektra.git

5.

cd libelektra && mkdir build
cd build
cmake ..

Log after cmake ..

-- Exclude binding python because neither swig2/3/4 found. Please install swig 2/3/4 and set -DSWIG_EXECUTABLE=
-- Exclude binding lua because neither swig2/3/4 found. Please install swig 2/3/4 and set -DSWIG_EXECUTABLE=

6.

sudo apt-get install swig

Log after cmake ..

-- Exclude binding python because python3 libs not found

7.

sudo apt-get install libpython3-dev

Log after cmake ..

-- Include binding python
CMake Warning at src/bindings/swig/python/CMakeLists.txt:94 (message):
  Python bindings for elektra tools require SWIG 4 or later.  Not building.


Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'distutils.sysconfig'
CMake Error at src/bindings/swig/python/CMakeLists.txt:126 (install):
  install DIRECTORY given no DESTINATION!

Debian bullseye

1. start docker container

2.

sudo apt get update

3.

sudo apt-get install cmake git build-essential

4.

git clone https://github.com/ElektraInitiative/libelektra.git

5.

cd libelektra && mkdir build
cd build
cmake ..

Log after cmake ..:

-- Exclude binding python because neither swig2/3/4 found. Please install swig 2/3/4 and set -DSWIG_EXECUTABLE=

Expected Result

debian buster and bullseye to have swig3
the python binding should be included

Actual Result

swig 3 is not included in debian buster or bullseye so the python binding failed on building.

System Information

docker container from windows
mcr.microsoft.com/vscode/devcontainers/base:0-buster
mcr.microsoft.com/vscode/devcontainers/base:0-bullseye

@buhtz
Copy link

buhtz commented Oct 20, 2021

Swig is present in "all" Debian version.
https://tracker.debian.org/pkg/swig

Not sure what the problem is here.

@4ydan
Copy link
Contributor

4ydan commented Nov 23, 2021

So I build elektra on a debian bullseye OS by following https://www.libelektra.org/installation/installation. How can I help to solve this Issue. What exactly is the problem with swig? Should I just remove the hardcoded appearances from the files above mentioned?
Thx in advance

@markus2330
Copy link
Contributor Author

Should I just remove the hardcoded appearances from the files above mentioned?

It is the best guess so far what the problem could be. Even if it does not fully solve the issue, these references are not correct anymore.

@markus2330 markus2330 added this to the 0.9.9 milestone Mar 7, 2022
@markus2330
Copy link
Contributor Author

@lukashartl this would be also great to have for the 0.9.9 release and the upcoming CM course as there might be a student who wants to use Python.

@robaerd can you help?

@mpranj
Copy link
Member

mpranj commented Mar 7, 2022

Closed via #4261.

@mpranj mpranj closed this as completed Mar 7, 2022
@markus2330
Copy link
Contributor Author

Thank you, works perfectly now! 🎆

python3
>>> import kdb

From my point of view the release can be done asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build cm2022s for university course triage needed Issue needs clarifications. urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants