Bacula-users

Re: [Bacula-users] Trouble compiling bacula 5.0.3 under Solaris 10

2011-01-19 20:19:36
Subject: Re: [Bacula-users] Trouble compiling bacula 5.0.3 under Solaris 10
From: Kenneth Garges <garges AT ucsc DOT edu>
To: Gary R. Schmidt <grs AT mcleod-schmidt.id DOT au>
Date: Wed, 19 Jan 2011 17:16:47 -0800
Thanks for your tips. Unfortunately still no joy. 

Switched to the latest Sun Studio compiler instead of gcc. 

I made my config script close to yours changing only a couple paths. 
#! /bin/sh
# Script from Gary Schmidt for compiling bacula under Solaris 10
# Entered Wednesday, January 19, 2011 Kenneth Garges 
# Was
#PATH=/opt/webstack/bin:/opt/webstack/mysql/bin:/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin:$HOME/src/bacula/depkgs-qt/qt-x11-opensource-src-4.3.4/bin
# Modified for us
PATH=/opt/mysql/mysql/bin:/bin:/usr/bin:/opt/SUNWexpo/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin
export PATH
./configure --build=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 \
 CC=cc CXX=CC \
 CFLAGS="-g -O" \
 LDFLAGS="-L/opt/mysql/lib/mysql -R/opt/mysql/lib/mysql -L/usr/sfw/lib 
-R/usr/sfw/lib" \ 
 --disable-build-dir --enable-build-sd \
 --prefix=/opt/app/bacula \
 --datarootdir=/opt/app/bacula/share \
 --mandir=/opt/app/bacula/man \
 --with-archivedir=/opt/app/bacula/archive \
 --with-working-dir=/var/bacula/working \
 --with-plugindir=/opt/app/bacula/plugins \
 --with-scriptdir=/opt/app/bacula/scripts \
 --with-subsys-dir=/opt/var/bacula/subsys \
 --with-mysql=/opt/mysql/mysql \
 --with-dir-user=bacula \
 --with-dir-group=backup \
 --with-sd-user=bacula \
 --with-sd-group=backup \
 --with-fd-user=root \
 --with-fd-group=backup \
 --enable-smartalloc \
 --enable-batch-insert \
 --enable-smartalloc \
 --with-dump-email=me \
 --with-job-email=me \
 --with-smtp-host=our-mail-server

Configure produced:
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
and aborted. 

So I added the line
--build=sparc64-sun-solaris2.10 --host=sparc64-sun-solaris2.10 
and that got it mostly working. 

It goes all the way through making scripts and cleaning up then:
==>Entering directory /home/garges/bacula-5.0.3/platforms
You have not specified either --enable-client-only or one of the
  supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI.
  This is not permitted. Please reconfigure.
Aborting the configuration ...

This despite the entry --with-mysql=path.

Thinking the error might be spurious I  tried make anyway. Got some parts made 
but then:
==== Make of lib is good ==== <snip>
==== Make of findlib is good ====<snip>
==== Make of filed is good ====<snip>
==== Make of console is good ====
==>Entering directory /home/garges/bacula-5.0.3/src/plugins/fd
<snip>
Compiling bvfs.c
"bvfs.c", line 202: Error: path is not a member of B_DB.
"bvfs.c", line 220: Error: The function "sql_num_rows" must have a prototype.
"bvfs.c", line 229: Error: path is not a member of B_DB.
"bvfs.c", line 230: Error: pnl is not a member of B_DB.
"bvfs.c", line 230: Error: path is not a member of B_DB.
"bvfs.c", line 244: Error: path is not a member of B_DB.
"bvfs.c", line 255: Error: path is not a member of B_DB.
"bvfs.c", line 256: Error: fnl is not a member of B_DB.
"bvfs.c", line 278: Error: The function "sql_num_rows" must have a prototype.
"bvfs.c", line 310: Error: The function "sql_num_rows" must have a prototype.
"bvfs.c", line 314: Error: SQL_ROW is not defined.
"bvfs.c", line 316: Error: The function "sql_fetch_row" must have a prototype.
"bvfs.c", line 317: Error: Pointer type needed instead of int.
"bvfs.c", line 317: Error: Pointer type needed instead of int.
"bvfs.c", line 318: Error: Pointer type needed instead of int.
"bvfs.c", line 318: Error: Pointer type needed instead of int.
"bvfs.c", line 346: Error: The function "sql_affected_rows" must have a 
prototype.
"bvfs.c", line 477: Error: path is not a member of B_DB.
"bvfs.c", line 478: Error: pnl is not a member of B_DB.
"bvfs.c", line 478: Error: path is not a member of B_DB.
"bvfs.c", line 523: Error: path is not a member of B_DB.
"bvfs.c", line 598: Error: SQL_MATCH is not defined.
"bvfs.c", line 653: Error: num_rows is not a member of B_DB.
"bvfs.c", line 674: Error: SQL_MATCH is not defined.
"bvfs.c", line 702: Error: num_rows is not a member of B_DB.
Compilation aborted, too many Error messages.
*** Error code 1
The following command caused the error:
/home/garges/bacula-5.0.3/libtool --silent --tag=CXX --mode=compile /bin/CC   
-c  -DBUILDING_CATS -I. -I..   -g -O bvfs.c
make: Fatal error: Command failed for target `bvfs.lo'
Current working directory /home/garges/bacula-5.0.3/src/cats
  ====== Error in /home/garges/bacula-5.0.3/src/cats ======
*** Error code 1
The following command caused the error:
for I in src scripts src/lib src/findlib src/filed   src/console src/plugins/fd 
src/cats src/dird src/stored src/tools manpages; \
  do (cd $I; echo "==>Entering directory `pwd`"; \
      make DESTDIR= all || (echo ""; echo ""; echo "  ====== Error in `pwd` 
======"; \
                    echo ""; echo ""; exit 1;)); \
done
make: Fatal error: Command failed for target `all'

Tried 3 different versions of mysql, 4.1.21, 5.1.54, and 5.5.8. Same result.

Thanks in advance for any light you can shed on this.





On 18Jan 2011, at 7:18 PM, Gary R. Schmidt wrote:

> On Wed, January 19, 2011 12:30, Kenneth Garges wrote:
>> Yet another with problems compiling bacula 5.0.3 under Solaris. I'm only
>> trying to compile the storage daemon.
>> 
> [SNIP]
> --enable-static-sd
> ^^^^^^^^^^^^^^^^^^
> Don't do this on S10, static linking is deprecated.
> 
> Hmm, "inflateInit" implies it is missing libz or something.
> 
> Here's my S10 conf (note that is is for everything, not just the SD), but
> I use SunStudio rather than (spit) gcc and the WebStack MySQL (Oh, I also
> had to hand jigger the configure script to recognise the shared object
> form of MySQL):
> 
> PATH=/opt/webstack/bin:/opt/webstack/mysql/bin:/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/bin:$HOME/src/bacula/depkgs-qt/qt-x11-opensource-src-4.3.4/bin
> export PATH
> 
> ./configure \
>  CC=cc CXX=CC \
>  CFLAGS="-g -O" \
>  LDFLAGS="-L/opt/webstack/mysql/lib/mysql -R/opt/webstack/mysql/lib/mysql
> -L/usr/sfw/lib -R/usr/sfw/lib" \
>  --prefix=/opt/bacula \
>  --datarootdir=/opt/bacula/share \
>  --mandir=/opt/bacula/man \
>  --with-archivedir=/opt/bacula/archive \
>  --with-working-dir=/opt/bacula/working \
>  --with-plugindir=/opt/bacula/plugins \
>  --with-scriptdir=/opt/bacula/scripts \
>  --with-subsys-dir=/opt/bacula/subsys \
>  --with-mysql=/opt/webstack/mysql \
>  --with-dir-password=X \
>  --with-fd-password=Y \
>  --with-sd-password=Z \
>  --with-dir-user=bacula \
>  --with-dir-group=backup \
>  --with-sd-user=bacula \
>  --with-sd-group=backup \
>  --with-fd-user=root \
>  --with-fd-group=backup \
>  --enable-smartalloc \
>  --enable-batch-insert \
>  --enable-smartalloc \
>  --with-dump-email=me \
>  --with-job-email=me \
>  --with-smtp-host=HOST
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand 
> malware threats, the impact they can have on your business, and how you 
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users