Skip to content

Conversation

@ddejong-therp
Copy link
Contributor

I've noticed that these python packages with their versions did not work in NixOS.

For pyldap, I think python-ldap superseeds it, so I removed it.
It was depending on a file that existed in some older version of libldap, but not in the newer version like 2.6.9.
Debian still uses libldap 2.5, which has the libldap_r library file, so it should still work on debian.
If pyldap is still really needed, version 3 can also be used, like the requirements-default.txt of 17.0 does.

reportlab gave me some sort of C error that I couldn't really figure out what it was from. But I noticed it went away with a newer version.
I guess this doesn't happen on debian based distros, but it does on NixOS.

@ddejong-therp ddejong-therp self-assigned this Jun 4, 2025
@ddejong-therp ddejong-therp added the bug Something isn't working label Jun 4, 2025
@Hussam-Suleiman
Copy link
Member

@ddejong-therp
Our system is based on Ubuntu 22.04, and Waft is fully compatible with Ubuntu 22.04. It is good to make Waft compatible with NixOS, but only if this does not come at the expense of compatibility with Ubuntu 22.04.
Also, please take a look at https://github.com/OCA/OCB/blob/16.0/requirements.txt#L66
Have you tested a fresh installation of this versions on Ubuntu 22.04?

@ddejong-therp
Copy link
Contributor Author

ddejong-therp commented Jun 5, 2025

Yeah I have not tested it with ubuntu because I don't have ubuntu but I could test it with debian.

That being said, I just hoped that it wouldn't cause issues on other systems because they versions are newer and hopefully work better, but you never know that it does.

However, now that I look at it, the requirements-default.txt file of odoo 17 also has never versions for pyldap, python-ldap & reportlab.
I think those versions work for my version of NixOS as well, and because they are a part of waft, I assume it works for ubuntu as well.

Maybe another solution in this case is to use a earlier version of openldap than what I have, so that maybe the ldap packages do compile again, but I think there was another bug with one of the packages as well, that I didn't have with the newer versions. So maybe it doesn't solve it.

For the other c error I encountered, I don't know why they don't happen on ubuntu or debian, but maybe it is because there we are able to get the precompiled wheel package, and for some reason I am not on my system.

I can try to play around with another version of openldap in my environment, but if the template for odoo17 already uses newer versions and both use python 3.10, do you think it could hurt if we adapt those versions for odoo16 as well?

@Hussam-Suleiman
Copy link
Member

@thomaspaulb what do you think?

@thomaspaulb
Copy link
Member

@ddejong-therp Can you post the errors you got?

@thomaspaulb
Copy link
Member

It's to me strange that some Python packages would not install on NixOS. The errors I'm used to come upon compilation of the package when it would miss certain headers, which are normally installable as "dev" packages in Debian+Ubuntu

@ddejong-therp
Copy link
Contributor Author

It's to me strange that some Python packages would not install on NixOS. The errors I'm used to come upon compilation of the package when it would miss certain headers, which are normally installable as "dev" packages in Debian+Ubuntu

Yeah some of the c errors I got I think were due to the fact that I was having a newer version of the c library than debian has. THe others I don't really know and I just experimented with other versions and that worked.

I can try to post some of the errors but there were multiple and it is a bit of a pain to try to reproduce my efforts here. In any case, most errors were not really clear as to why the c code didn't work

@thomaspaulb
Copy link
Member

It's not -that- much of a pain to reproduce the errors you got.

Just:

  • Clone a fresh version of github.com/sunflowerit/waft
  • set ODOO_VERSION in .env-secret to 16.0
  • ./bootstrap
  • ./build

Meanwhile you go eat.

You'll get the errors and post them here.

qrcode==6.1
raven==6.10.0
reportlab==3.5.59
reportlab==3.6.13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odoo 16 explicitly states that 3.5.59 is needed

python-dateutil==2.8.2
python-dotenv==0.17.1
python-ldap==3.4.0
python-ldap==3.4.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What we actually need is:

python-ldap==3.4.0 ; sys_platform != 'win32' and python_version < '3.12' # min version = 3.2.0 (Focal with security backports)
python-ldap==3.4.4 ; sys_platform != 'win32' and python_version >= '3.12'  # (Noble) Mostly to have a wheel package

pudb==2019.1
pydot==1.4.1
Pygments==2.10.0
pyldap==2.4.28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think we can remove this. Helpdesk uses it, but we can try to remove it on helpdesk-nightly and see if we can still log in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants