389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
210 stars 90 forks source link

dbscan build error in 1.4.3 branch #5458

Closed progier389 closed 1 year ago

progier389 commented 2 years ago

Issue Description A wrong merge during a cherry pick has broken 1.4.3 build (and the libldap_r issue prevented to see it when the cherrypick was done): Clearly there should not be any dependence to the DBI_xxx (db independent interface allowing to switch between BDB and LMDB database (which is a 2.x feature)) in 1.4.3 branch (BDB api should be used directly)

2022-09-22T18:49:06.6209709Z ldap/servers/slapd/tools/dbscan.c:1363:16: error: 'DBI_RC_NOTFOUND' undeclared (first use in this function); did you mean 'DB_NOTFOUND'? 2022-09-22T18:49:06.6210174Z 1363 | if (ret == DBI_RC_NOTFOUND) { 2022-09-22T18:49:06.6210432Z | ^~~~~~~ 2022-09-22T18:49:06.6210666Z | DB_NOTFOUND 2022-09-22T18:49:06.6243285Z ldap/servers/slapd/tools/dbscan.c:1370:32: error: 'DBI_OP_CLOSE' undeclared (first use in this function) 2022-09-22T18:49:06.6244017Z 1370 | dblayer_cursor_op(&cursor, DBI_OP_CLOSE, NULL, NULL); 2022-09-22T18:49:06.6244325Z | ^~~~ 2022-09-22T18:49:06.6244932Z ldap/servers/slapd/tools/dbscan.c:1372:52: warning: format '%s' expects argument of type 'char ', but argument 2 has type 'int' [-Wformat=] 2022-09-22T18:49:06.6245512Z 1372 | printf("Unable to shutdown the db plugin: %s\n", dblayer_strerror(1)); 2022-09-22T18:49:06.6245849Z | ~^ ~~~~~~~ 2022-09-22T18:49:06.6248477Z | | | 2022-09-22T18:49:06.6248756Z | | int 2022-09-22T18:49:06.6249032Z | char 2022-09-22T18:49:06.6249301Z | %d 2022-09-22T18:49:06.6249779Z rm -f /_w/389-ds-base/389-ds-base/rpmbuild/BUILD/389-ds-base-1.4.3.31/man/man3/ 2022-09-22T18:49:06.6260149Z ldap/servers/slapd/tools/dbscan.c: In function 'removedb': 2022-09-22T18:49:06.6266696Z ldap/servers/slapd/tools/dbscan.c:1381:5: error: unknown type name 'dbi_env_t' 2022-09-22T18:49:06.6267056Z 1381 | dbi_env_t env = NULL; 2022-09-22T18:49:06.6267275Z | ^~~~~ 2022-09-22T18:49:06.6283121Z touch doxyfile.stamp 2022-09-22T18:49:06.6288751Z ldap/servers/slapd/tools/dbscan.c:1382:5: error: unknown type name 'dbi_db_t'; did you mean 'db_indx_t'? 2022-09-22T18:49:06.6289128Z 1382 | dbi_db_t *db = NULL; 2022-09-22T18:49:06.6289357Z | ^~~~ 2022-09-22T18:49:06.6289575Z | db_indx_t

Package Version and Platform:

Steps to Reproduce Steps to reproduce the behavior:

  1. Build 389ds
  2. See error
progier389 commented 1 year ago

FYI: same issue was reported and fixed by @Firstyear in issue 5461 for branches 1.4.4 and 2.0 9e6ef10b4..d4c4ff1b9 389-ds-base-1.4.4 -> 389-ds-base-1.4.4 31aa1c8fc..9a47b3d22 389-ds-base-2.0 -> 389-ds-base-2.0