Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933875 - net-nds/openldap: 2.6.6-r2 fails to compile against gnutls: tls_g.c:971:57: error: passing argument 4 of 'gnutls_fingerprint' from incompatible pointer type [-Wincompatible-pointer-types]
Summary: net-nds/openldap: 2.6.6-r2 fails to compile against gnutls: tls_g.c:971:57: e...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-09 17:32 UTC by Petr Šourek
Modified: 2024-06-13 20:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.txt,138.03 KB, text/plain)
2024-06-09 17:34 UTC, Petr Šourek
Details
environment (environment.txt,149.23 KB, text/plain)
2024-06-09 17:34 UTC, Petr Šourek
Details
emerge --info '=net-nds/openldap-2.6.6-r2::gentoo' (emerge.info.txt,10.24 KB, text/plain)
2024-06-09 17:34 UTC, Petr Šourek
Details
emerge -pqv '=net-nds/openldap-2.6.6-r2::gentoo' (pqv.txt,288 bytes, text/plain)
2024-06-09 17:35 UTC, Petr Šourek
Details
Fix Incompatible pointer type assignments (openldap_2_6_6_explicitly_cast_private_values.patch,2.56 KB, patch)
2024-06-13 19:00 UTC, Joachim IONOFF
Details | Diff
build.log 2 (build.log.2.txt,138.05 KB, text/plain)
2024-06-13 19:23 UTC, Petr Šourek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Šourek 2024-06-09 17:32:58 UTC
Hello,

I have tried to compile openldap-2.6.6-r2 and it ends with error. The reason is, i guess, the gnutls flag, since without it it installs. I guess I can use the option -Wincompatible-pointer-types, but not sure if its systematic solution.

Thanks,
Regards,
Petr Sourek
Comment 1 Petr Šourek 2024-06-09 17:34:01 UTC
Created attachment 895474 [details]
build.log
Comment 2 Petr Šourek 2024-06-09 17:34:17 UTC
Created attachment 895475 [details]
environment
Comment 3 Petr Šourek 2024-06-09 17:34:40 UTC
Created attachment 895476 [details]
emerge --info '=net-nds/openldap-2.6.6-r2::gentoo'
Comment 4 Petr Šourek 2024-06-09 17:35:04 UTC
Created attachment 895477 [details]
emerge -pqv '=net-nds/openldap-2.6.6-r2::gentoo'
Comment 5 Joachim IONOFF 2024-06-13 19:00:56 UTC
Created attachment 895770 [details, diff]
Fix Incompatible pointer type assignments

Hello,

I found it has been reported to openldap and already fixed.
Bug: https://bugs.openldap.org/show_bug.cgi?id=10171
Fix: https://git.openldap.org/openldap/openldap/-/commit/fb9e6a81bbee880549e7ec18f0a74ddddbd2d1ab

I tested it on x86_32 arch.
Comment 6 Joachim IONOFF 2024-06-13 19:09:41 UTC
Maybe not exactly the same issue as the one you encountered. I hope it will help you.
Comment 7 Petr Šourek 2024-06-13 19:23:12 UTC
(In reply to Joachim IONOFF from comment #6)
> Maybe not exactly the same issue as the one you encountered. I hope it will
> help you.

Hello,

thanks for the patch, but error still remains. I am attaching build.log2.txt, not sure if I should post all other info again (if yes, I will).

I had downloaded this patch to /etc/portage/patches/net-nds/openldap-2.6.6/ as incompatibleAssignments.patch using wget.

Then I had launched:
USE="gnutls" emerge -av1 openldap

It correctly had applied the patch, but error is the same. Then I had looked into the bug on OpenLDAP forum, I went to whole merge request (https://git.openldap.org/openldap/openldap/-/merge_requests/683) downloaded it as incompatibleAssignments.patch using wget. It was a little larger, than the previous one If I had seen it.

Launched the same command:
USE="gnutls" emerge -av1 openldap

And it failed again. But maybee would be better if I post the error to openldap issue tracker?

Thanks,
Regards,
Petr Sourek
Comment 8 Petr Šourek 2024-06-13 19:23:43 UTC
Created attachment 895772 [details]
build.log 2
Comment 9 Joachim IONOFF 2024-06-13 20:15:39 UTC
I can see on your emerge log "x86_64-pc-linux-gnu-gcc -m32". It seems you (emerge) are trying to compile openldap in 32bits with (maybe) gnutls library in 64 bits. Maybe an include/lib path issue ?
Is it possible ?
Comment 10 Joachim IONOFF 2024-06-13 20:31:32 UTC
Maybe you can try to build with "(size_t *) (&keyhash.bvlen)" to convert to the right type.

On the file libraries/libldap/tls_g.c, by updating the line 971:

from:
					keyhash.bv_val, &keyhash.bv_len ) < 0 ) {

to:
					keyhash.bv_val, (size_t *) (&keyhash.bvlen) ) < 0 ) {
Comment 11 Joachim IONOFF 2024-06-13 20:35:36 UTC
(without the typo on bv_len)

from:
					keyhash.bv_val, &keyhash.bv_len ) < 0 ) {

to:
					keyhash.bv_val, (size_t *) (&keyhash.bv_len) ) < 0 ) {
Comment 12 Petr Šourek 2024-06-13 20:47:10 UTC
(In reply to Joachim IONOFF from comment #9)
> I can see on your emerge log "x86_64-pc-linux-gnu-gcc -m32". It seems you
> (emerge) are trying to compile openldap in 32bits with (maybe) gnutls
> library in 64 bits. Maybe an include/lib path issue ?
> Is it possible ?

I am still having abi_x86_32 in my default use configuration to have backward compatibility for 32bit architecture, but not sure if I need it in 2024. I mean, I was using MacOS from 2008 till 2021, when I switched back to Gentoo after 15 years and I was not sure if I need it so I had defined it.

I might start to disable it for gnutls and openldap to see if it works correctly, than maybee for rest of the world?