View Issue Details

IDProjectCategoryView StatusLast Update
0001451bareos-coreGeneralpublic2022-05-12 09:38
Reporterxyros Assigned Tobruno-at-bareos  
Status acknowledgedResolutionopen 
Platformx86-64OSUbuntu OS Version22.04
Product Version21.1.2 
Summary0001451: Cannot build due to "lmdb/mdb.c:2282:13: error: variable ‘rc’ set but not used" error
DescriptionBareos 21.1.2 fails to build on Ubuntu 22.04 due to the following code issues, as illustrated below:

[ 2%] Building C object core/src/lmdb/CMakeFiles/bareoslmdb.dir/mdb.c.o
/usr/src/bareos-Release-21.1.2/core/src/lmdb/mdb.c: In function ‘mdb_page_dirty’:
/usr/src/bareos-Release-21.1.2/core/src/lmdb/mdb.c:2282:13: error: variable ‘rc’ set but not used [-Werror=unused-but-set-variable]
 2282 | int rc, (*insert)(MDB_ID2L, MDB_ID2 *);
      | ^~
cc1: all warnings being treated as errors

If I try compiling with error ignored, it will subsequently fail due to the the following code issues:

/usr/src/bareos-Release-21.1.2/core/src/lib/ In member function ‘void ConfigurationParser::StoreMd5Password(LEX*, ResourceItem*, int, int)’:
/usr/src/bareos-Release-21.1.2/core/src/lib/ error: ‘int MD5_Init(MD5_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  554 | MD5_Init(&md5c);
      | ~~~~~~~~^~~~~~~
In file included from /usr/src/bareos-Release-21.1.2/core/src/lib/lib.h:43,
                 from /usr/src/bareos-Release-21.1.2/core/src/include/bareos.h:189,
                 from /usr/src/bareos-Release-21.1.2/core/src/lib/
/usr/include/openssl/md5.h:49:27: note: declared here
   49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
      | ^~~~~~~~
/usr/src/bareos-Release-21.1.2/core/src/lib/ error: ‘int MD5_Update(MD5_CTX*, const void*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  555 | MD5_Update(&md5c, (unsigned char*)(lc->str), lc->str_len);
      | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/bareos-Release-21.1.2/core/src/lib/lib.h:43,
                 from /usr/src/bareos-Release-21.1.2/core/src/include/bareos.h:189,
                 from /usr/src/bareos-Release-21.1.2/core/src/lib/
/usr/include/openssl/md5.h:50:27: note: declared here
   50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
      | ^~~~~~~~~~
/usr/src/bareos-Release-21.1.2/core/src/lib/ error: ‘int MD5_Final(unsigned char*, MD5_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  556 | MD5_Final(digest, &md5c);
      | ~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/src/bareos-Release-21.1.2/core/src/lib/lib.h:43,
                 from /usr/src/bareos-Release-21.1.2/core/src/include/bareos.h:189,
                 from /usr/src/bareos-Release-21.1.2/core/src/lib/
/usr/include/openssl/md5.h:51:27: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
      | ^~~~~~~~~
cc1plus: all warnings being treated as errors

Steps To Reproduce1. apt update
2. apt install build-essential
3. apt install pkg-config libcap-dev libpython2.7-dev libpython3.10-dev libssl-dev libpq-dev librados-dev libradosstriper-dev libcephfs-dev libglusterfs-dev libgfapi0 libpam0g-dev libpam-wrapper pamtester libpamtest0-dev liblzo2-dev libglib2.0-dev libreadline-dev libjansson-dev libxml2-dev libjsoncpp-dev libgtest-dev python3-selenium python3-fastapi php libgmock-dev liblmdb-dev gdb mtx s3cmd libsystemd-dev golang-github-minio-minio-go-v7-dev
4. cd /usr/src
5. wget
6. tar zxf 21.1.2.tar.gz
7. cd /usr/src/bareos-Release-21.1.2
8. mkdir build
9. cd build
10. cmake .. -DCMAKE_BUILD_TYPE=Release
11. make
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action




2022-05-12 09:38

developer   ~0004617

Ubuntu 22.04 wasn't yet a target for build.
It will be soon for subscriber normally on next release 21.1.4
see related PR

Issue History

Date Modified Username Field Change
2022-05-02 06:19 xyros New Issue
2022-05-12 09:38 bruno-at-bareos Assigned To => bruno-at-bareos
2022-05-12 09:38 bruno-at-bareos Status new => acknowledged
2022-05-12 09:38 bruno-at-bareos Note Added: 0004617