Bug 237823 - sysutils/bareos-client: core/src/include/baconfig.h insists on including libintl.h when NLS is off
Summary: sysutils/bareos-client: core/src/include/baconfig.h insists on including libi...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
Depends on:
Reported: 2019-05-10 10:02 UTC by Trond.Endrestol
Modified: 2019-05-11 01:56 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (acm)


Note You need to log in before you can comment on or make changes to this bug.
Description Trond.Endrestol 2019-05-10 10:02:44 UTC
bareos-client is configured like this:

===> The following configuration options are available for bareos-client-18.2.6:
     LMDB=off: Enable build of LMDB support
     NLS=off: Native Language Support
     PYTHON=off: Python bindings or support
     SCSICRYPTO=off: Build LTO AME crypto plugin
====> Cryptographic library: you have to select exactly one of them
     OPENSSL=on: SSL/TLS support via OpenSSL
     GNUTLS=off: SSL/TLS support via GnuTLS
===> Use 'make config' to modify these settings

Which leads to:

[2/137] /usr/local/libexec/ccache/c++  -DVERSION=\"18.2.6\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/local/include/python2.7 -Icore/src -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing   -std=gnu++11 -MD -MT core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o -MF core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o.d -o core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o -c core/src/filed/accurate.cc
FAILED: core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o
/usr/local/libexec/ccache/c++  -DVERSION=\"18.2.6\" -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/local/include/python2.7 -Icore/src -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing   -std=gnu++11 -MD -MT core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o -MF core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o.d -o core/src/filed/CMakeFiles/bareos-fd.dir/accurate.cc.o -c core/src/filed/accurate.cc
In file included from core/src/filed/accurate.cc:24:
In file included from core/src/include/bareos.h:204:
In file included from core/src/lib/attribs.h:23:
core/src/include/baconfig.h:114:13: fatal error: 'libintl.h' file not found
   #include <libintl.h>
1 error generated.
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make[1]: stopped in /xports/sysutils/bareos-client
*** Error code 1

Turning on NLS solves this issue in the short run.
Comment 1 Trond.Endrestol 2019-05-10 11:22:49 UTC
I had no luck in adding


to the ports' Makefile, and also adding a patch for core/src/include/baconfig.h, changing, around line 113



#if ENABLE_NLS == 1

ENABLE_NLS is defined to 1 no matter what I do.
Comment 2 Trond.Endrestol 2019-05-10 11:28:43 UTC
CMake has correctly deducted Intl support to be FALSE, yet the code doesn't adhere.

Configuration on 2019-05-10 11:18:23 :

   Host:                         FreeBSD-12.0-SYNTH -- freebsd 12.0-SYNTH
   Bareos version:               Bareos 18.2.6 (13 February 2019)
   Distribution:                 freebsd OBS PROJECT: OBS DIST: OBS ARCH:
   Source code location:         /construction/xports/sysutils/bareos-client/work/bareos-Release-18.2.6/core
   Modify Debian Control file:   OFF
   Install binaries:             /usr/local/bin
   Install system binaries:      /usr/local/sbin
   Install libraries:            /usr/local/lib
   Install system config files:  /usr/local/etc
   Install Bareos config dir:    /usr/local/etc/bareos
   Install Bareos config files:  /usr/local/etc/bareos
   Log directory:                /var/log/bareos
   Scripts directory:            /usr/local/lib/bareos/scripts
   Archive directory:            /var/db/bareos/storage
   Working directory:            /var/db/bareos
   BSR directory:                /var/db/bareos
   PID directory:                /var/run/bareos
   Subsys directory:             /var/db/bareos
   Man directory:                /usr/local/man
   Data directory:               /usr/local/share
   Backend directory:            /usr/local/lib/bareos/backends
   Plugin directory:             /usr/local/lib/bareos/plugins
   C Compiler:                   /usr/local/libexec/ccache/cc 8.0.0
   C++ Compiler:                 /usr/local/libexec/ccache/c++ 8.0.0
   C Compiler flags:             -O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register
   C++ Compiler flags:           -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-deprecated-register
   Linker flags:                  -L/usr/local/lib -L/usr/local/lib  -fstack-protector-strong  -L/usr/local/lib -L/usr/local/lib  -fstack-protector-strong  -L/usr/local/lib -L/usr/local/lib  -fstack-protector-strong
   Statically Linked Tools:
   Statically Linked FD:
   Statically Linked SD:
   Statically Linked DIR:
   Statically Linked CONS:
   Database backends:
   Database port:
   Database name:                bareos
   Database user:                bareos
   Database version:             2171

   Job Output Email:             root@localhost
   Traceback Email:              root@localhost
   SMTP Host Address:            root@localhost

   Director Port:                9101
   File daemon Port:             9102
   Storage daemon Port:          9103

   Director User:
   Director Group:
   Storage Daemon User:
   Storage DaemonGroup:
   File Daemon User:             root
   File Daemon Group:            wheel

   Large file support:
   Bareos conio support:
   readline support:             TRUE ROOT_DIR:/usr/local INCLUDE_DIR:/usr/local/include LIBRARY:/usr/local/lib/libreadline.so

   TCP Wrappers support:
   TLS support:                  1
   Encryption support:           1
   OpenSSL support:              TRUE 1.1.1b /usr/include /usr/lib/libssl.so;/usr/lib/libcrypto.so
   PAM support:                  TRUE /usr/lib/libpam.so /usr/include
   ZLIB support:                 TRUE /usr/lib/libz.so /usr/include
   LZO2 support:                 TRUE /usr/local/lib/liblzo2.so /usr/local/include
   FASTLZ support:               FALSE
   JANSSON support:              TRUE /usr/local/lib/libjansson.so /usr/local/include
   LMDB support:                 OFF
   NDMP support:                 ON
   Build ndmjob binary:          OFF
   enable-smartalloc:            ON
   enable-lockmgr:               OFF
   bat support:
   tray-monitor support:         0
   test-plugin support:
   client-only:                  ON
   Plugin support:               ON
   AFS support:
   ACL support:                  1
   XATTR support:                YES
   SCSI Crypto support:          OFF
   GFAPI(GLUSTERFS) support:     FALSE
   DROPLET support:              FALSE
   CEPH RADOS support:           FALSE
   RADOS striping support:       FALSE
   CEPHFS support:               FALSE
   ELASTO support:
   Python support:               TRUE 2.7.16 /usr/local/include/python2.7
   systemd support:              OFF
   Batch insert enabled:         1
   gtest support:                FALSE
   Intl support:                 FALSE <-------------------
   Dynamic cats backends:        ON 1
   Dynamic storage backends:     ON 1
   Build for Test Coverage :     OFF
   PSCMD:                        ps -ax -o pid,command
   PS:                           /bin/ps
   PGREP:                        /bin/pgrep
   AWK:                          /usr/bin/awk
   GAWK:                         GAWK-NOTFOUND
   RPCGEN:                       /usr/bin/rpcgen
   MTX:                          MTX-NOTFOUND
   DEVELOPER:                    OFF
   LocalBuildDefinitionsFile     /construction/xports/sysutils/bareos-client/work/bareos-Release-18.2.6/core/cmake/BareosLocalBuildDefinitions.cmake
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:


-- Build files have been written to: /construction/xports/sysutils/bareos-client/work/bareos-Release-18.2.6
Comment 3 commit-hook freebsd_committer 2019-05-10 20:20:01 UTC
A commit references this bug:

Author: acm
Date: Fri May 10 20:19:44 UTC 2019
New revision: 501197
URL: https://svnweb.freebsd.org/changeset/ports/501197

  - Fix pthread error [1]
  - Fix build when python 2.x is not default version [2]
  - Fix build when NLS option is not selected [3]
  - Fix pkg-plist
  - Few other modifications

  PR:		237818 237823 237825
  Submitted by:	Trond.Endrestol _ at _ ximalas.info [1][3], beldin _ at _ beldin.org [2]
  Reported by:	pkg-fallout