Bug 261226 - sysutils/bareos-server: compiler error: undefined reference to json_object
Summary: sysutils/bareos-server: compiler error: undefined reference to json_object
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks: 237165
  Show dependency treegraph
 
Reported: 2022-01-15 13:24 UTC by O. Hartmann
Modified: 2022-01-29 21:24 UTC (History)
2 users (show)

See Also:
pi: maintainer-feedback+


Attachments
Patch for core/src/dird/catreq.cc eliminates a write-only variable named size (1.05 KB, patch)
2022-01-18 09:47 UTC, Trond Endrestøl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2022-01-15 13:24:25 UTC
On FreeBSD 13/STABLE jail performing poudriere job, the port sysutils/bareos-server fails to compile due to a linker error, see below.

Evironment:

=>> Building sysutils/bareos-server
build started at Sat Jan 15 11:42:23 UTC 2022
port directory: /usr/ports/sysutils/bareos-server
package name: bareos-server-20.0.3
building for: FreeBSD hostname.gder 13.0-STABLE FreeBSD 13.0-STABLE 1300523 amd64
maintained by: acm@FreeBSD.org
Makefile datestamp: -rw-r--r--  1 root  wheel  6710 Nov 26 00:06 /usr/ports/sysutils/bareos-server/Makefile
Ports top last git commit: bee5c815503c
Ports top unclean checkout: no
Port dir last git commit: 04b9da414081
Port dir unclean checkout: no
Poudriere version: poudriere-git-3.3.99.20211130
Host OSVERSION: 1400047
Jail OSVERSION: 1300523
Job Id: 01

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1300523
UNAME_v=FreeBSD 13.0-STABLE 1300523
UNAME_r=13.0-STABLE
BLOCKSIZE=K
MAIL=/var/mail/root
MM_CHARSET=UTF-8
LANG=C.UTF-8
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
POUDRIERE_NAME=poudriere-git
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.99.20211130
MAKEOBJDIRPREFIX=/pool/sources/13-STABLE/obj/
MASTERMNT=/pool/poudriere/data/.m/13-amd64-head-default/ref
LC_COLLATE=C
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
OUTPUT_REDIRECTED_STDERR=4
OUTPUT_REDIRECTED=1
PWD=/pool/poudriere/data/.m/13-amd64-head-default/01/.p
OUTPUT_REDIRECTED_STDOUT=3
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=13-amd64-head-default
SCRIPTPREFIX=/usr/local/share/poudriere
SCRIPTNAME=bulk.sh
OLDPWD=/pool/poudriere/data/.m/13-amd64-head-default/ref/.p/pool
POUDRIERE_PKGNAME=poudriere-git-3.3.99.20211130
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=
DEPENDS_ARGS=
MAKE_ARGS=
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
===> The following configuration options are available for bareos-server-20.0.3:
     LMDB=on: Enable faster accurate backup support
     MTX=off: Install mtx for control of autochanger devices
     NDMP=off: Enable build of NDMP support
     NLS=on: Native Language Support
     PYTHON=off: Python bindings or support
     SCSICRYPTO=on: Build LTO AME crypto plugin
====> Storage backends
     CEPHFS=off: CEPHFS backend support
     GFAPI=off: GFAPI backend support
     RADOS=off: RADOS backend support
====> Cryptographic library: you have to select exactly one of them
     OPENSSL=on: SSL/TLS support via OpenSSL
     GNUTLS=off: SSL/TLS support via GnuTLS
====> Database support: you have to select exactly one of them
     SQLITE3=off: SQLite 3 database support
     MYSQL=off: MySQL database support
     PGSQL=on: PostgreSQL database support
===> Use 'make config' to modify these settings
---End OPTIONS List---

--MAINTAINER--
acm@FreeBSD.org
--End MAINTAINER--

--CONFIGURE_ARGS--
--without-gnutls
--End CONFIGURE_ARGS--

--CONFIGURE_ENV--
ac_cv_path_PERL=/usr/local/bin/perl ac_cv_path_PERL_PATH=/usr/local/bin/perl  PERL_USE_UNSAFE_INC=1 PKG_CONFIG=pkgconf XDG_DATA_HOME=/wrkdirs/usr/ports/sysutils/bareos-server/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/sysutils/bareos-server/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/sysutils/bareos-server/work/.cache  HOME=/wrkdirs/usr/ports/sysutils/bareos-server/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/sysutils/bareos-server/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/sh CONFIG_SHELL=/bin/sh CMAKE_PREFIX_PATH="/usr/local"
--End CONFIGURE_ENV--

[...]

FAILED: core/src/stored/bls 
: && /usr/bin/c++ -O2 -pipe -DMDB_DSYNC=O_SYNC -DMDB_USE_POSIX_SEM=1 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wsuggest-override -Wformat -Werror=format-security -fdebug-prefix-map=/wrkdirs/usr/ports/sysutils/bareos-server/work/bareos-Release-20.0.3/core=. -fmacro-prefix-map=/wrkdirs/usr/ports/sysutils/bareos-server/work/bareos-Release-20.0.3/core=. -Wno-unknown-pragmas -Wall -Wno-deprecated-register -O2 -pipe -DMDB_DSYNC=O_SYNC -DMDB_USE_POSIX_SEM=1 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -L/usr/local/lib -L/usr/local/lib  -L/usr/local/lib -fstack-protector-strong core/src/stored/CMakeFiles/bls.dir/bls.cc.o -o core/src/stored/bls  -Wl,-rpath,/wrkdirs/usr/ports/sysutils/bareos-server/work/.build/core/src/stored:  -lintl  -lbareos  core/src/stored/libbareossd.so  -lbareosfind  /usr/lib/libpthread.so  -lintl && :
ld: error: core/src/stored/libbareossd.so: undefined reference to json_object [--no-allow-shlib-undefined]
ld: error: core/src/stored/libbareossd.so: undefined reference to json_integer [--no-allow-shlib-undefined]
ld: error: core/src/stored/libbareossd.so: undefined reference to json_object_set_new [--no-allow-shlib-undefined]
ld: error: core/src/stored/libbareossd.so: undefined reference to json_string [--no-allow-shlib-undefined]
ld: error: core/src/stored/libbareossd.so: undefined reference to json_dumps [--no-allow-shlib-undefined]
ld: error: core/src/stored/libbareossd.so: undefined reference to json_delete [--no-allow-shlib-undefined]
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Trond Endrestøl 2022-01-18 09:47:58 UTC
Created attachment 231114 [details]
Patch for core/src/dird/catreq.cc eliminates a write-only variable named size

Fixes: sysutils/bareos-server/work/bareos-Release-21.0.0/core/src/dird/catreq.cc:659:11: error: variable 'size' set but not used [-Werror,-Wunused-but-set-variable]
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-01-21 15:06:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c61a5657a0bb0a38489d5e3d2d5e8b9c86daec63

commit c61a5657a0bb0a38489d5e3d2d5e8b9c86daec63
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2022-01-21 15:04:05 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2022-01-21 15:05:50 +0000

    sysutils/bareos-server: Fix build

    PR:             261226
    Reported by:    Trond.Endrestol  _at_  ximalas.info

 .../files/patch-core-src-dird_catreq.cc (new)      | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)