Opened 15 years ago

Closed 15 years ago

#21674 closed defect (fixed)

bacula 3.0.2 build fails on snow leopard 64bit

Reported by: nickhilliard (Nick Hilliard) Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: bacula

Description

Bacula 3.0.2 fails with lots of build errors on my snow leopard 64bit box:

cupcake:/Users/nick% uname -a
Darwin cupcake.xxxxxxxx.com 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:46:25 PDT 2009; root:xnu-1456.1.25~1/RELEASE_X86_64 x86_64 i386
cupcake:/Users/nick% gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)
cupcake:/Users/nick% 

Here's one example:

Compiling restore.c
restore.c: In function 'void do_restore(JCR*)':
restore.c:372: error: invalid conversion from 'intmax_t*' to 'int64_t*'
restore.c:372: error:   initializing argument 1 of 'int from_base64(int64_t*, char*)'
make[1]: *** [restore.o] Error 1

The same error pops up in:

bacula-3.0.2/src/dird/catreq.c
bacula-3.0.2/src/dird/job.c
bacula-3.0.2/src/filed/restore.c
bacula-3.0.2/src/filed/verify.c
bacula-3.0.2/src/filed/verify_vol.c
bacula-3.0.2/src/findlib/attribs.c
bacula-3.0.2/src/lib/attr.c
bacula-3.0.2/src/lib/base64.c
bacula-3.0.2/src/lib/cram-md5.c
bacula-3.0.2/src/lib/md5.c
bacula-3.0.2/src/stored/bscan.c

I've attached a fix for this, but don't know if it compiles on a 32 bit installation.

Attachments (1)

patch-base64-typecast.diff (2.4 KB) - added by nickhilliard (Nick Hilliard) 15 years ago.

Download all attachments as: .zip

Change History (10)

Changed 15 years ago by nickhilliard (Nick Hilliard)

Attachment: patch-base64-typecast.diff added

comment:1 Changed 15 years ago by nickhilliard (Nick Hilliard)

Obviously "patchfiles" in the Portfile will need to have this file added too:

patchfiles       patch-configure.diff patch-base64-typecast.diff

comment:2 Changed 15 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to macsforever2000@…
Port: bacula added; sysutils/bacula removed
Status: newassigned

comment:3 Changed 15 years ago by mf2k (Frank Schima)

I cannot reproduce this. Are you trying to install universal perhaps?

comment:4 Changed 15 years ago by nickhilliard (Nick Hilliard)

It's building and installing a 64 bit image, if that's what you mean?

cupcake:/opt/local/sbin% file bacula-fd
bacula-fd: Mach-O 64-bit executable x86_64
cupcake:/opt/local/sbin% 

comment:5 Changed 15 years ago by mf2k (Frank Schima)

I mean what exact port command did you use to install bacula?

comment:6 Changed 15 years ago by nickhilliard (Nick Hilliard)

just "port install bacula".

comment:7 Changed 15 years ago by mf2k (Frank Schima)

What is your build_arch setting in /opt/local/etc/macports/macports.conf?

comment:8 Changed 15 years ago by nickhilliard (Nick Hilliard)

It's not set:

# CPU architecture to compile for. Defaults to i386 or ppc on Mac OS X 10.5
# and earlier, depending on the CPU type detected at runtime. On Mac OS X 10.6
# the default is x86_64 if the CPU supports it, i386 otherwise.
#build_arch                     i386
[...]
# Options for Universal Binaries (+universal variant)

# machine architectures
universal_archs         x86_64 i386

comment:9 Changed 15 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

Even though I don't see the problem on a couple of my machines, I committed your patch in r58502 because it builds for me. Thanks! I'll be testing it this week.

Note: See TracTickets for help on using tickets.