Bug 2225532 - 389-ds-base FTBFS with rust-1.71.0
Summary: 389-ds-base FTBFS with rust-1.71.0
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: 389-ds-base
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Simon Pichugin
QA Contact: LDAP QA Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-25 13:36 UTC by Tuomo Soini
Modified: 2023-08-17 08:29 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-2.3.6-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Work-around for rust-1.71.0 compiler issue (454 bytes, patch)
2023-07-25 13:39 UTC, Tuomo Soini
no flags Details | Diff
Remove unused mut which rust-1.71.0 does not tolerate (600 bytes, patch)
2023-07-25 13:40 UTC, Tuomo Soini
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 5861 0 None open FTBFS with rust-1.71.0 2023-07-25 13:50:30 UTC
Red Hat Issue Tracker IDMDS-3517 0 None None None 2023-08-07 20:25:08 UTC
Red Hat Issue Tracker IDMDS-3561 0 None None None 2023-08-14 08:15:53 UTC
Red Hat Issue Tracker RHELPLAN-163343 0 None None None 2023-07-25 13:37:54 UTC

Description Tuomo Soini 2023-07-25 13:36:50 UTC
Description of problem:

rust was updated to 1.71.0 on centos stream 9 causing FTBFS issues with 389-ds-base-2.3.4-3.el9

Issue #1:

error: using `.borrow()` on a double reference, which returns `&concread::cowcell::CowCellReadTxn<CacheStats>` instead of borrowing the inner type
  --> librslapd/src/cache.rs:60:28
   |
60 |     let stats = stat_rguard.borrow();
   |                            ^^^^^^^^^
   |
note: the lint level is defined here
  --> librslapd/src/lib.rs:1:9
   |
1  | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(suspicious_double_ref_op)]` implied by `#[deny(warnings)]`
error: could not compile `librslapd` (lib) due to previous error

This is also reported as bug#2225471

Issue #2:

error: variable does not need to be mutable
   --> slapi_r_plugin/src/value.rs:185:13
    |
185 |         let mut v = unsafe { slapi_value_new() };
    |             ----^
    |             |
    |             help: remove this `mut`
    |
note: the lint level is defined here
   --> slapi_r_plugin/src/lib.rs:1:9
    |
1   | #![deny(warnings)]
    |         ^^^^^^^^
    = note: `#[deny(unused_mut)]` implied by `#[deny(warnings)]`
error: could not compile `slapi_r_plugin` (lib) due to previous error

mut is obviously wrong here

Attaching work-around for issue #1 and fix for #2.

Comment 1 Tuomo Soini 2023-07-25 13:39:06 UTC
Created attachment 1977476 [details]
Work-around for rust-1.71.0 compiler issue

Comment 2 Tuomo Soini 2023-07-25 13:40:05 UTC
Created attachment 1977489 [details]
Remove unused mut which rust-1.71.0 does not tolerate

Comment 3 Viktor Ashirov 2023-07-25 13:50:13 UTC
Thank you for reporting this issue. I opened an upstream ticket for this: https://github.com/389ds/389-ds-base/issues/5861
Would you be okay to submit a PR upstream with your fixes?

Thanks!

Comment 4 Tuomo Soini 2023-07-25 14:45:37 UTC
Looks like these were both fixed upstream.

Comment 5 Viktor Ashirov 2023-08-14 15:42:12 UTC
Build 389-ds-base-2.3.6-2.el9 was successful with rust-1.71. Marking as Verified:Tested.

Comment 9 bsmejkal 2023-08-17 08:29:30 UTC
As per comment #c5 marking as VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.