Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread Josh Fisher



On 2/12/21 12:53 PM, Martin Simmons wrote:

On Thu, 11 Feb 2021 13:28:31 -0800, jmaness  said:

On Thu, Feb 11, 2021 at 12:54 PM Josh Fisher  wrote:


On 2/11/21 12:40 PM, jman...@engineering.ucsb.edu wrote:

Hello!

  About two years ago our Bacula client package stopped working in
Catalina. We've figured out that the binaries were compiled for PPC and
i386 Macs and I suspect the issue is that we need a client for x86_64 or
ia64.

  The official documentation points us to Fink which doesn't seem to
have a current version of the package. I believe their most recent version
is from 2013.

  We've tried compiling the source code but there seems to be a syntax
error in one of the functions. While our programmer was able to alter the
source code we aren't comfortable deploying with our in house changes.
Further our programmer thinks a refactor would be needed for the changes to
apply to all instances of the function.


Did you use the --enable-client-only flag when running configure?


Thank you for the reply. Here are our compile options and make error. We
are compiling for client only.

% CFLAGS="-g -O2" \
   ./configure \
 --sbindir=$HOME/bacula/bin \
 --sysconfdir=$HOME/bacula/bin \
 --with-pid-dir=$HOME/bacula/bin/working \
 --with-subsys-dir=$HOME/bacula/bin/working \
 --enable-smartalloc \
 --with-mysql \
 --with-working-dir=$HOME/bacula/bin/working \
 --enable-client-only

Compiling bsnprintf.c
bsnprintf.c:622:16: error: static declaration of 'round' follows non-static
   declaration
static int64_t round(LDOUBLE value)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:476:15:
note:
   previous declaration is here
extern double round(double);
   ^
1 error generated.
make[1]: *** [bsnprintf.lo] Error 1

This should be fixable by the trivial change already in later versions of
Bacula:

https://www.bacula.org/git/cgit.cgi/bacula/commit/bacula/src/lib/bsnprintf.c?id=356330bd843be2ee51f948b3fb7179d2167518b8



Yes. That is the fix. Thanks for pointing that out.




I don't understand the comment about "refactor" or "all instances" unless
there are other errors as well.



By refactor, he means that when the function declaration is changed from 
round() to bround() to avoid the conflict, it has to be changed 
everywhere else in the code where it is called. In bsnprintf.c, round() 
is declared static, so this amounts to changing all calls to round() 
that are made inside the bsnprintf.c source file from round() to bround().





__Martin


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread jmaness
On Fri, Feb 12, 2021 at 12:07 PM Robert Adesam  wrote:

> Hej!
>
> j> "j" == jmaness   writes:
>
> j> Thank you very much for this suggestion. We'll look into that. Our
> j> main concern is that our director is set to version 9.0.6 as that's
> j> what Enterprise Linux seems to have pegged the version to. Homebrew
> j> wants to compile version 11 so we're going to look to see if we can
> j> set the version for the formula.
>
> As Martin Simmons points out this is fixed in a later version
> (9.4.3?). See thread:
>
>   https://sourceforge.net/p/bacula/mailman/message/36600311/
>
> But if you really need version 9.0.x I think you also can try
> switching compiler -- I could reproduce the error from "fresh" bacula
> 9.0.8 sources using Xcode 12.4 on Mac OS X 10.15.7:
>

To address this and many of the great suggestions, which we're very
appreciative of, we're now trying to use Homebrew to build its formula for
Bacula using 9.0.x and we hope to then use the build-pkg package to create
a package we can use. We're having success with this and have gotten Bacula
client 11 successfully built in Homebrew. We're now working to see if we
can compile an older version to avoid having to immediately upgrade our
directory to maintain compatibility. I don't expect we will have more
information on this until sometime next week. These suggestions we've
received from everyone have gotten us so much further along than we had on
our own. Thank you everyone who has so far given us advice on this!


>
>  $ /usr/bin/gcc --version
>  Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
>  Apple clang version 12.0.0 (clang-1200.0.32.29)
>  Target: x86_64-apple-darwin19.6.0
>  Thread model: posix
>  InstalledDir:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>
> Then I switch to gcc from MacPorts and it compiled fine using the same
> configure, cflags, etc etc:
>
>  $ /opt/local/bin/gcc --version
>  gcc (MacPorts gcc10 10.2.0_5) 10.2.0
>  Copyright (C) 2020 Free Software Foundation, Inc.
>  This is free software; see the source for copying conditions.  There is NO
>  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
>
> Maybe the Xcode compiler is a little too picky...?
>

>From what we've seen so far this definitely seems to be the situation!
Thank you again. I hope I can follow up soon to say we've had success!


>
> Yours, Robert.
>
>
> --
> ROBERT ADESAM, Systems Engineer
> Department of Philosophy, Linguistics and Theory of Science
> UNIVERSITY OF GOTHENBURG
> https://gu.se/en/about/find-staff/robertadesam
>
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread Robert Adesam
Hej!

j> "j" == jmaness   writes:

j> Thank you very much for this suggestion. We'll look into that. Our
j> main concern is that our director is set to version 9.0.6 as that's
j> what Enterprise Linux seems to have pegged the version to. Homebrew
j> wants to compile version 11 so we're going to look to see if we can
j> set the version for the formula.

As Martin Simmons points out this is fixed in a later version
(9.4.3?). See thread:

  https://sourceforge.net/p/bacula/mailman/message/36600311/

But if you really need version 9.0.x I think you also can try
switching compiler -- I could reproduce the error from "fresh" bacula
9.0.8 sources using Xcode 12.4 on Mac OS X 10.15.7:

 $ /usr/bin/gcc --version
 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
 Apple clang version 12.0.0 (clang-1200.0.32.29)
 Target: x86_64-apple-darwin19.6.0
 Thread model: posix
 InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 
Then I switch to gcc from MacPorts and it compiled fine using the same
configure, cflags, etc etc:

 $ /opt/local/bin/gcc --version
 gcc (MacPorts gcc10 10.2.0_5) 10.2.0
 Copyright (C) 2020 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Maybe the Xcode compiler is a little too picky...?

Yours, Robert.


-- 
ROBERT ADESAM, Systems Engineer
Department of Philosophy, Linguistics and Theory of Science
UNIVERSITY OF GOTHENBURG
https://gu.se/en/about/find-staff/robertadesam


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread Martin Simmons
> On Thu, 11 Feb 2021 13:28:31 -0800, jmaness  said:
> 
> On Thu, Feb 11, 2021 at 12:54 PM Josh Fisher  wrote:
> 
> >
> > On 2/11/21 12:40 PM, jman...@engineering.ucsb.edu wrote:
> >
> > Hello!
> >
> >  About two years ago our Bacula client package stopped working in
> > Catalina. We've figured out that the binaries were compiled for PPC and
> > i386 Macs and I suspect the issue is that we need a client for x86_64 or
> > ia64.
> >
> >  The official documentation points us to Fink which doesn't seem to
> > have a current version of the package. I believe their most recent version
> > is from 2013.
> >
> >  We've tried compiling the source code but there seems to be a syntax
> > error in one of the functions. While our programmer was able to alter the
> > source code we aren't comfortable deploying with our in house changes.
> > Further our programmer thinks a refactor would be needed for the changes to
> > apply to all instances of the function.
> >
> >
> > Did you use the --enable-client-only flag when running configure?
> >
> Thank you for the reply. Here are our compile options and make error. We
> are compiling for client only.
> 
> % CFLAGS="-g -O2" \
>   ./configure \
> --sbindir=$HOME/bacula/bin \
> --sysconfdir=$HOME/bacula/bin \
> --with-pid-dir=$HOME/bacula/bin/working \
> --with-subsys-dir=$HOME/bacula/bin/working \
> --enable-smartalloc \
> --with-mysql \
> --with-working-dir=$HOME/bacula/bin/working \
> --enable-client-only
> 
> Compiling bsnprintf.c
> bsnprintf.c:622:16: error: static declaration of 'round' follows non-static
>   declaration
> static int64_t round(LDOUBLE value)
>^
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:476:15:
> note:
>   previous declaration is here
> extern double round(double);
>   ^
> 1 error generated.
> make[1]: *** [bsnprintf.lo] Error 1

This should be fixable by the trivial change already in later versions of
Bacula:

https://www.bacula.org/git/cgit.cgi/bacula/commit/bacula/src/lib/bsnprintf.c?id=356330bd843be2ee51f948b3fb7179d2167518b8

I don't understand the comment about "refactor" or "all instances" unless
there are other errors as well.

__Martin


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread jmaness
On Thu, Feb 11, 2021 at 6:43 PM Phil Stracchino 
wrote:

> On 2/11/21 12:40 PM, jman...@engineering.ucsb.edu wrote:
> > Hello!
> >
> >  About two years ago our Bacula client package stopped working in
> > Catalina. We've figured out that the binaries were compiled for PPC and
> > i386 Macs and I suspect the issue is that we need a client for x86_64 or
> > ia64.
> >
> >  The official documentation points us to Fink which doesn't seem to
> > have a current version of the package. I believe their most recent
> > version is from 2013.
>
>
> Silly question:  have you tried homebrew?
>

Thank you very much for this suggestion. We'll look into that. Our main
concern is that our director is set to version 9.0.6 as that's what
Enterprise Linux seems to have pegged the version to. Homebrew wants to
compile version 11 so we're going to look to see if we can set the version
for the formula.


>
> quantum:phils:~:1 $ brew search bacula
> ==> Formulae
> bacula-fd
>
>
> --
>   Phil Stracchino
>   Babylon Communications
>   ph...@caerllewys.net
>   p...@co.ordinate.org
>   Landline: +1.603.293.8485
>   Mobile:   +1.603.998.6958
>
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread Josh Fisher


On 2/12/21 5:26 AM, Radosław Korzeniewski wrote:

Hello,

czw., 11 lut 2021 o 22:29 > napisał(a):




On Thu, Feb 11, 2021 at 12:54 PM Josh Fisher mailto:jfis...@jaybus.com>> wrote:


On 2/11/21 12:40 PM, jman...@engineering.ucsb.edu
 wrote:

Hello!

     About two years ago our Bacula client package stopped
working in Catalina. We've figured out that the binaries were
compiled for PPC and i386 Macs and I suspect the issue is
that we need a client for x86_64 or ia64.

     The official documentation points us to Fink which
doesn't seem to have a current version of the package. I
believe their most recent version is from 2013.

     We've tried compiling the source code but there seems to
be a syntax error in one of the functions. While our
programmer was able to alter the source code we aren't
comfortable deploying with our in house changes. Further our
programmer thinks a refactor would be needed for the changes
to apply to all instances of the function.



Did you use the --enable-client-only flag when running configure?

Thank you for the reply. Here are our compile options and make
error. We are compiling for client only.

% CFLAGS="-g -O2" \
   ./configure \
 --sbindir=$HOME/bacula/bin \
 --sysconfdir=$HOME/bacula/bin \
 --with-pid-dir=$HOME/bacula/bin/working \
 --with-subsys-dir=$HOME/bacula/bin/working \
 --enable-smartalloc \
 --with-mysql \
 --with-working-dir=$HOME/bacula/bin/working \
 --enable-client-only

Compiling bsnprintf.c
bsnprintf.c:622:16: error: static declaration of 'round' follows non-static
   declaration
static int64_t round(LDOUBLE value)
^

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:476:15: 
note:
   previous declaration is here
extern double round(double);
   ^
1 error generated.
make[1]: *** [bsnprintf.lo] Error 1

Could you please share your configuration used for the above 
compilation, so. Bacula version, OS version and compiler collection used.

I compile Bacula on macOS daily and never get such errors.



bsnprintf.c only includes wchar.h and bacula.h. None of Bacula's header 
files directly include math.h. So my guess is that in this version of 
xcode some other standard header (stdio.h?) is including math.h.


What version of xcode is this?




best regards
--
Radosław Korzeniewski
rados...@korzeniewski.net 


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula For Mac Clients

2021-02-12 Thread Radosław Korzeniewski
Hello,

czw., 11 lut 2021 o 22:29  napisał(a):

>
>
> On Thu, Feb 11, 2021 at 12:54 PM Josh Fisher  wrote:
>
>>
>> On 2/11/21 12:40 PM, jman...@engineering.ucsb.edu wrote:
>>
>> Hello!
>>
>>  About two years ago our Bacula client package stopped working in
>> Catalina. We've figured out that the binaries were compiled for PPC and
>> i386 Macs and I suspect the issue is that we need a client for x86_64 or
>> ia64.
>>
>>  The official documentation points us to Fink which doesn't seem to
>> have a current version of the package. I believe their most recent version
>> is from 2013.
>>
>>  We've tried compiling the source code but there seems to be a syntax
>> error in one of the functions. While our programmer was able to alter the
>> source code we aren't comfortable deploying with our in house changes.
>> Further our programmer thinks a refactor would be needed for the changes to
>> apply to all instances of the function.
>>
>>
>> Did you use the --enable-client-only flag when running configure?
>>
> Thank you for the reply. Here are our compile options and make error. We
> are compiling for client only.
>
> % CFLAGS="-g -O2" \
>   ./configure \
> --sbindir=$HOME/bacula/bin \
> --sysconfdir=$HOME/bacula/bin \
> --with-pid-dir=$HOME/bacula/bin/working \
> --with-subsys-dir=$HOME/bacula/bin/working \
> --enable-smartalloc \
> --with-mysql \
> --with-working-dir=$HOME/bacula/bin/working \
> --enable-client-only
>
> Compiling bsnprintf.c
> bsnprintf.c:622:16: error: static declaration of 'round' follows non-static
>   declaration
> static int64_t round(LDOUBLE value)
>^
> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:476:15:
>  note:
>   previous declaration is here
> extern double round(double);
>   ^
> 1 error generated.
> make[1]: *** [bsnprintf.lo] Error 1
>
>
Could you please share your configuration used for the above compilation,
so. Bacula version, OS version and compiler collection used.
I compile Bacula on macOS daily and never get such errors.

best regards
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users