# Can not install bareos-server 15.2.1



## Edwin Mhondiwa (Oct 26, 2015)

My OS is freebsdFreeBSD 10.2.

`portmaster sysutils/bareos-server`

mModified Makefile -> OPTIONS_DEFAULT?=  NLS OPENSSL MYSQL

eError:

```
/usr/bin/ld: undefined reference to symbol `json_integer' (try adding -ljansson)
/usr/local/lib/libjansson.so.4: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [bareos-dir] Error code 1
```


----------



## SirDice (Oct 27, 2015)

Why are you modifying the Makefile? Just run `make config`, see ports(7). Or with portmaster: `portmaster --force-config sysutils/bareos-server`. See portmaster(8).


----------



## Edwin Mhondiwa (Oct 28, 2015)

Thanks for the reply and kind advice. I did a fresh install of FreeBSD 10.2 and tried to build sysutils/bareos-server. It failed with the following error


```
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[3]: stopped in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/dird
  ====== Error in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/dird ======
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/sysutils/bareos-server
*** Error code 1
Stop.
make: stopped in /usr/ports/sysutils/bareos-server
===>>> make build failed for sysutils/bareos-server
===>>> Aborting update
```


----------



## SirDice (Oct 28, 2015)

Please post the whole error, not just the last bit. These are just generic error messages, the real issue is before that.


----------



## Edwin Mhondiwa (Oct 28, 2015)

Sure, hope i have attached something useful.


----------



## SirDice (Oct 28, 2015)

I didn't know the port but I had a quick test on one of my own systems and it builds just fine. The only thing I can think of is some settings in /etc/make.conf. Does that file exist? And if so, what's its content?


----------



## Anton Ivanov (Oct 29, 2015)

I have the same error on 10.1-STABLE and 11.0-CURRENT.
Have no make.conf on current.
On 10.1 make.conf:

```
MYSQL52_LIBVER=16
FORCE_PKG_REGISTER=yes
COPTFLAGS= -O -pipe
```


----------



## SirDice (Oct 29, 2015)

Never FORCE_PKG_REGISTER unless you know what you are doing! It should not be used, certainly not for everything. I also recommend removing COPTFLAGS as it will cause more trouble than you might think, all ports already use the most optimal compiler options, there's no need to force them. Doing so may actually cause problems. Really not sure what MYSQL52_LIBVER is supposed to do, remove that one too.


----------



## Edwin Mhondiwa (Oct 29, 2015)

`cat /etc/make.conf`

```
WITH_PKGNG=yes
```


----------



## Edwin Mhondiwa (Oct 29, 2015)

You can't install bareos-server after jansson.


----------



## SirDice (Oct 30, 2015)

Edwin Mhondiwa said:


> `cat /etc/make.conf`
> 
> ```
> WITH_PKGNG=yes
> ```


Can be removed to. It was used on 8.x and 9.x during the transition, it never had any use on 10.x.


----------



## Anton Ivanov (Nov 7, 2015)

Have no make.conf any more, but still doesn't work.


----------



## Edwin Mhondiwa (Nov 27, 2015)

I really wanted to run bareos on FreeBSD but could not get help on this forum. Had to migrate to Debian 8.2 and bareos is up and running.


----------



## geodni (Dec 3, 2015)

Hello,
I first tried installing Bareos Server using `pkg`but since it installs postgresql-client instead of mysql-client (sorry I am not "pgsql fluent"), I decided to install it using "portmaster" to be able to choose mysql-client but I encounterred another problem :

```
==>Entering directory /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/plugins/stored
/usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/libtool --silent --tag=CXX --mode=compile /usr/bin/c++  -O2 -pipe -fstack-protector -fno-strict-aliasing -I/usr/include/readline -I/usr/local/include -I. -I../.. -I../../include -I../../stored -I/usr/local/include/python2.7 -c python-sd.c
c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
make[3]: don't know how to make ../../lib/libbareos.la. Stop

make[3]: stopped in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/plugins/stored


  ====== Error in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/plugins/stored ======


*** Error code 1

Stop.
make[2]: stopped in /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/bareos-server
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/bareos-server
```

Can someone could give me any advice ?
Best for me would be to be able to install bareos Server and client with mysql Client, but it seems a little bit complicated, especially for me..

Regards,
Denis


----------



## geodni (Dec 8, 2015)

Hi,
I have another question, it seems NDMP support is completely disabled, is it a problem of support for it into FreeBSD or a copyright problem ?

I wrote to port maintainer about the compilation problem.

EDIT: I jumped into /usr/ports/sysutils/bareos-server/work/bareos-bb1529f88585da31a0053f06727c74f2a7cb0dc1/src/lib then ran `make` and then came back to /usr/ports/sysutils/bareos-server/ then ran `make` again : All installed completely.
Now I have a bareos running with NDMP support after enabling it in the port Makefile !

Denis


----------



## Anton Ivanov (Mar 7, 2016)

geodni said:


> Hello,
> I first tried installing Bareos Server using `pkg`but since it installs postgresql-client instead of mysql-client (sorry I am not "pgsql fluent"), I decided to install it using "portmaster" to be able to choose mysql-client but I encounterred another problem :
> 
> ```
> ...



run make config and disable PYTHON plugin.
It works for me.


----------

