Bacula-users

Re: [Bacula-users] Please replace this null libbaccats library with a proper one

2014-07-31 22:48:01
Subject: Re: [Bacula-users] Please replace this null libbaccats library with a proper one
From: Dan Langille <dan AT langille DOT org>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 31 Jul 2014 22:45:28 -0400
On Jul 31, 2014, at 8:59 PM, Dan Langille <dan AT langille DOT org> wrote:

> On Jul 31, 2014, at 7:49 PM, Dan Langille <dan AT langille DOT org> wrote:
> 
>> 
>> On Jul 31, 2014, at 7:31 PM, Dan Langille <dan AT langille DOT org> wrote:
>> 
>>> On Jul 31, 2014, at 7:15 PM, Dan Langille <dan AT langille DOT org> wrote:
>>> 
>>>> I’m in the process of updating the FreeBSD port to 7.0.4 and I have had a 
>>>> difficult time.  The current issue seems to be a null libbaccats library.
>>>> 
>>>> I have managed to get bacula-fd and bacula-sd running. bacula-dir is 
>>>> having issues.  Running with -d 999 gave these messages (the output has 
>>>> been trimmed):
>>>> 
>>>> bacula-dir: priv.c:48-0 uname=bacula gname=bacula
>>>> bacula-dir: message.c:1347-0 Enter Jmsg type=3
>>>> bacula-dir: message.c:811-0 Enter dispatch_msg type=3 msg=bacula-dir JobId 
>>>> 0: Fatal error: Please replace this null libbaccats library with a proper 
>>>> one.
>>> 
>>> I think I found the problem.  This is from a working 5.x system:
>>> 
>>> $ ldd /usr/local/lib/libbaccats.so.5
>>> /usr/local/lib/libbaccats.so.5:
>>>     libpq.so.5 => /usr/local/lib/libpq.so.5 (0x801208000)
>>>     libcrypt.so.5 => /lib/libcrypt.so.5 (0x801434000)
>>>     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x801653000)
>>>     libm.so.5 => /lib/libm.so.5 (0x801963000)
>>>     libc.so.7 => /lib/libc.so.7 (0x80081a000)
>>>     libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801b84000)
>>>     libintl.so.9 => /usr/local/lib/libintl.so.9 (0x801d91000)
>>>     libssl.so.6 => /usr/lib/libssl.so.6 (0x801f9b000)
>>>     libcrypto.so.6 => /lib/libcrypto.so.6 (0x8021f1000)
>>>     libthr.so.3 => /lib/libthr.so.3 (0x802599000)
>>>     libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x8027bb000)
>>> 
>>> This is what I have installed:
>>> 
>>> $ ldd /usr/local/lib/libbaccats.so.7
>>> /usr/local/lib/libbaccats.so.7:
>>>     libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x801201000)
>>>     libm.so.5 => /lib/libm.so.5 (0x801511000)
>>>     libc.so.7 => /lib/libc.so.7 (0x80081a000)
>>>     libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801732000)
>>> 
>>> I have not linked properly.  I’m looking in that now.
>> 
>> More information.
>> 
>> From the working system:
>> 
>> $ ls -l /usr/local/lib/libbaccats*
>> -rwxr-xr-x  1 root  wheel    984 Jul  5 22:15 
>> /usr/local/lib/libbaccats-postgresql.la
>> lrwxr-xr-x  1 root  wheel     30 Jul  5 22:15 
>> /usr/local/lib/libbaccats-postgresql.so -> libbaccats-postgresql.so.5.0.2
>> lrwxr-xr-x  1 root  wheel     30 Jul  5 22:15 
>> /usr/local/lib/libbaccats-postgresql.so.5 -> libbaccats-postgresql.so.5.0.2
>> -rwxr-xr-x  1 root  wheel  42270 Jul  5 22:15 
>> /usr/local/lib/libbaccats-postgresql.so.5.0.2
>> -rwxr-xr-x  1 root  wheel    924 Jul  5 22:15 /usr/local/lib/libbaccats.la
>> lrwxr-xr-x  1 root  wheel     19 Jul  5 22:15 /usr/local/lib/libbaccats.so 
>> -> libbaccats.so.5.0.2
>> lrwxr-xr-x  1 root  wheel     24 Jul  5 22:15 /usr/local/lib/libbaccats.so.5 
>> -> libbaccats-postgresql.so
>> -rwxr-xr-x  1 root  wheel   6576 Jul  5 22:15 
>> /usr/local/lib/libbaccats.so.5.0.2
>> 
>> 
>> From the failing system:
>> 
>> # ls -l /usr/local/lib/libbaccats*
>> -rwxr-xr-x  1 root  wheel   1010 Jul 31 23:37 
>> /usr/local/lib/libbaccats-postgresql.la
>> lrwxr-xr-x  1 root  wheel     26 Jul 31 23:37 
>> /usr/local/lib/libbaccats-postgresql.so -> libbaccats-postgresql.so.7
>> -rwxr-xr-x  1 root  wheel  42622 Jul 31 23:37 
>> /usr/local/lib/libbaccats-postgresql.so.7
>> -rwxr-xr-x  1 root  wheel    944 Jul 31 23:37 /usr/local/lib/libbaccats.la
>> lrwxr-xr-x  1 root  wheel     15 Jul 31 23:37 /usr/local/lib/libbaccats.so 
>> -> libbaccats.so.7
>> -rwxr-xr-x  1 root  wheel   6376 Jul 31 23:37 /usr/local/lib/libbaccats.so.7
>> 
>> 
>> Looks like the symlinks are not right.
> 
> I built an other version from the FreeBSD ports tree to compare:
> 
> # ldd /usr/local/sbin/bacula-dir | ula-dir | grep libbaccats
>       libbaccats.so.5 => /usr/local/lib/libbaccats.so.5 (0x800ec9000)
> 
> # ls -l /usr/local/lib/libbaccats.so.5
> lrwxr-xr-x  1 root  wheel  24 Aug  1 00:43 /usr/local/lib/libbaccats.so.5 -> 
> libbaccats-postgresql.so
> 
> I see the problem.  libbaccats.so.7 should be a symlink to 
> libbaccats-postgresql.so
> 
> This allowed the bacula-dir to start:
> 
> mv  libbaccats.so.7  libbaccats.so.7.ORIGINAL
> ln -s libbaccats-postgresql.so libbaccats.so.7
> 
> I’ll figure out what’s going wrong with my install

I think I know. It’s related to src/cats/install-default-backend.in

I added some debugging statement to that file.  It seems to be using the wrong 
version number. Here
is an extract of what I was testing with:

###
echo 1
echo ${install_dir}/libbaccats-${default_backend}${SHLIB_EXT}.${library_version}
echo 2
echo ${install_dir}/libbaccats${SHLIB_EXT}.${library_version}
echo 3
echo libbaccats-${default_backend}${SHLIB_EXT}
echo 4
exit 99

if [ -f 
${install_dir}/libbaccats-${default_backend}${SHLIB_EXT}.${library_version} ]; 
then
   #                                                                            
   # Create a default catalog library pointing to one of the shared libs.
   #                                                         
   rm -f ${install_dir}/libbaccats${SHLIB_EXT}.${library_version}
                                              
   #  
   # Create a relative symlink to the default backend
   # As all backends are in the same directory anyhow this should
   # always work.
   #
   ln -s libbaccats-${default_backend}${SHLIB_EXT} \
         ${install_dir}/libbaccats${SHLIB_EXT}.${library_version}
###

The output was:
1
/var/ports/usr/ports.SVN/sysutils/bacula-server/work/stage/usr/local/lib/libbaccats-postgresql.so.5
2
/var/ports/usr/ports.SVN/sysutils/bacula-server/work/stage/usr/local/lib/libbaccats.so.5
3
libbaccats-postgresql.so
4
*** [libtool-install] Error code 99

It seems library_version is wrong.  It should be 7 (or 7.0.4 perhaps), not 5.

It’s late. I’m finished.


— 
Dan Langille

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users