...Or, Bacula is getting about as portable as the Great Wall of China.

Trying to build Bacula on Solaris 11.3 x64, attempted using both the Solaris Compiler Suite (now known as Developer Studio) and GCC 7.3.0.

TL;DR - it doesn't build, because of stupidity(TM).

So, I have a chance to upgrade my Bacula infrastructure, and move the tape loader onto honking great big box with 100+Gb of RAM and stuff, so I thinks, "I'll switch to PostgreSQL, and in the same step, update from 7.0.5 to 9.0.6".

Pull the new version down, set up configure, thusly (Yes, I know --disable-libtool is a noop now, that's just another stupidity(TM)): $ PATH=/opt/postgres/bin:/usr/bin:/bin:/opt/solarisstudio12.4/bin:/opt/sfw/bin:/usr/ccs/bin:/opt/local/bin:/usr/openwin/bin:.
$ export PATH
$ ./configure \
        CC=cc CXX=CC \
        CFLAGS="-g -O -m64" \
        LDFLAGS="-m64" \
        --prefix=/opt/bacula \
        --with-archivedir=/opt/bacula/archive \
        --with-working-dir=/home/bacula/working \
        --with-plugindir=/opt/bacula/plugins \
        --with-scriptdir=/opt/bacula/scripts \
        --with-subsys-dir=/opt/bacula/subsys \
        --with-postgresql=/opt/postgres \
        --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-lockmgr \
        --enable-batch-insert \
        --with-dump-email=m...@me.me \
        --with-job-email=m...@me.me \
        --disable-libtool \
        --with-x \
        --x-includes=/usr/include/X11 \
        --with-smtp-host=mail

Not a problem, all looks copacetic.

$ gmake
...
"fd_plugins.h", line 200: Warning: Identifier expected instead of "}".

Sigh, that's just an annoyance, but as I learnt my C back when K&R Edition 1 was the bible, it niggles me, so I fixes it, just removing the unneeded , before the }.

So, onwards.
...
Making libbacsd.la ...
/opt/solarisstudio12.4/bin/CC   -m64 -o libbacsd.la \
acquire.lo ansi_label.lo askdir.lo autochanger.lo block.lo block_util.lo butil.lo dev.lo device.lo ebcdic.lo init_dev.lo label.lo lock.lo match_bsr.lo mount.lo null_dev.lo os.lo parse_bsr.lo read.lo read_records.lo record_read.lo record_util.lo record_write.lo reserve.lo scan.lo sd_plugins.lo spool.lo tape_alert.lo vol_mgr.lo wait.lo fifo_dev.lo file_dev.lo tape_dev.lo vtape_dev.lo \
  -export-dynamic -rpath /opt/bacula/lib -release 9.0.6
CC: Warning: Option -path passed to ld, if ld is invoked, ignored otherwise ld: fatal: option '-export-dynamic' and option '-elease' are incompatible ld: fatal: option '-export-dynamic' is incompatible with building a relocatable object ld: fatal: option '-path' is incompatible with building a relocatable object ld: fatal: option '-R/opt/solarisstudio12.4/lib/amd64' is incompatible with building a relocatable object
gmake[1]: *** [libbacsd.la] Error 2
gmake[1]: Leaving directory `/home/garys/src/bacula/bacula-9.0.6/src/stored'

Now *that's* useful, not. Looks like someone is trying to build a shared object with the wrong extension, using the linker. Oh, and they think the linker is the GNU linker. No, it isn't, and way back in the configure process it worked that out.

Just for fun, I removed the "-rpath /opt/bacula/lib -release 9.0.6" and tried again...
...
Making libbacsd.la ...
/opt/solarisstudio12.4/bin/CC   -m64 -o libbacsd.la \
acquire.lo ansi_label.lo askdir.lo autochanger.lo block.lo block_util.lo butil.lo dev.lo device.lo ebcdic.lo init_dev.lo label.lo lock.lo match_bsr.lo mount.lo null_dev.lo os.lo parse_bsr.lo read.lo read_records.lo record_read.lo record_util.lo record_write.lo reserve.lo scan.lo sd_plugins.lo spool.lo tape_alert.lo vol_mgr.lo wait.lo fifo_dev.lo file_dev.lo tape_dev.lo vtape_dev.lo \
  -export-dynamic
ld: fatal: file acquire.lo: open failed: No such file or directory
ld: fatal: file ansi_label.lo: open failed: No such file or directory
ld: fatal: file askdir.lo: open failed: No such file or directory
ld: fatal: file autochanger.lo: open failed: No such file or directory
ld: fatal: file block.lo: open failed: No such file or directory
ld: fatal: file block_util.lo: open failed: No such file or directory
ld: fatal: file butil.lo: open failed: No such file or directory
ld: fatal: file dev.lo: open failed: No such file or directory
ld: fatal: file device.lo: open failed: No such file or directory
ld: fatal: file ebcdic.lo: open failed: No such file or directory
ld: fatal: file init_dev.lo: open failed: No such file or directory
ld: fatal: file label.lo: open failed: No such file or directory
ld: fatal: file lock.lo: open failed: No such file or directory
ld: fatal: file match_bsr.lo: open failed: No such file or directory
ld: fatal: file mount.lo: open failed: No such file or directory
ld: fatal: file null_dev.lo: open failed: No such file or directory
ld: fatal: file os.lo: open failed: No such file or directory
ld: fatal: file parse_bsr.lo: open failed: No such file or directory
ld: fatal: file read.lo: open failed: No such file or directory
ld: fatal: file read_records.lo: open failed: No such file or directory
ld: fatal: file record_read.lo: open failed: No such file or directory
ld: fatal: file record_util.lo: open failed: No such file or directory
ld: fatal: file record_write.lo: open failed: No such file or directory
ld: fatal: file reserve.lo: open failed: No such file or directory
ld: fatal: file scan.lo: open failed: No such file or directory
ld: fatal: file sd_plugins.lo: open failed: No such file or directory
ld: fatal: file spool.lo: open failed: No such file or directory
ld: fatal: file tape_alert.lo: open failed: No such file or directory
ld: fatal: file vol_mgr.lo: open failed: No such file or directory
ld: fatal: file wait.lo: open failed: No such file or directory
ld: fatal: file fifo_dev.lo: open failed: No such file or directory
ld: fatal: file file_dev.lo: open failed: No such file or directory
ld: fatal: file tape_dev.lo: open failed: No such file or directory
ld: fatal: file vtape_dev.lo: open failed: No such file or directory
gmake[1]: *** [libbacsd.la] Error 2
gmake[1]: Leaving directory `/home/garys/src/bacula/bacula-9.0.6/src/stored'

Ha, expletive deleted, ha.

The Makefile did *not* generate any .lo files. Why? Because the .c.lo dependecy doesn't have "-o $@" in it. Sad.

Fix the .c.lo dependency, and try again.
...
Making libbacsd.la ...
/opt/solarisstudio12.4/bin/CC   -m64 -o libbacsd.la \
acquire.lo ansi_label.lo askdir.lo autochanger.lo block.lo block_util.lo butil.lo dev.lo device.lo ebcdic.lo init_dev.lo label.lo lock.lo match_bsr.lo mount.lo null_dev.lo os.lo parse_bsr.lo read.lo read_records.lo record_read.lo record_util.lo record_write.lo reserve.lo scan.lo sd_plugins.lo spool.lo tape_alert.lo vol_mgr.lo wait.lo fifo_dev.lo file_dev.
lo tape_dev.lo vtape_dev.lo \
  -export-dynamic
Undefined                       first referenced
 symbol                             in file
me                                  butil.lo
void dlist::remove(void*)            acquire.lo
main /opt/solarisstudio12.4/lib/compilers/amd64/crt1x.o
...
device_release_mutex                wait.lo
ld: fatal: symbol referencing errors
gmake[1]: *** [libbacsd.la] Error 2
gmake[1]: Leaving directory `/home/garys/src/bacula/bacula-9.0.6/src/stored'

That was a waste of CPU cycles, wasn't it?

But, let's compound things, and try it using GCC!

No prizes for guessing that it fails in the same way.

So, just for kicks I thought I would try on an OpenSUSE system that I keep just to point that "portable" doesn't mean "It builds on both Ubuntu and Fedora." Surely it *must* build on that???

/usr/bin/g++   -m64 -o libbacsd.la \
acquire.lo ansi_label.lo askdir.lo autochanger.lo block.lo block_util.lo butil.lo dev.lo device.lo ebcdic.lo init_dev.lo label.lo lock.lo match_bsr.lo mount.lo null_dev.lo os.lo parse_bsr.lo read.lo read_records.lo record_read.lo record_util.lo record_write.lo reserve.lo scan.lo sd_plugins.lo spool.lo tape_alert.lo vol_mgr.lo wait.lo fifo_dev.lo file_dev.lo tape_dev.lo vtape_dev.lo \
  -export-dynamic -rpath /opt/bacula/lib64 -release 9.0.6
g++: error: /opt/bacula/lib64: No such file or directory
g++: error: 9.0.6: No such file or directory
g++: error: unrecognized command line option ���-rpath���
g++: error: unrecognized command line option ���-release���
Makefile:237: recipe for target 'libbacsd.la' failed
make[1]: *** [libbacsd.la] Error 1

No.  It doesn't.

So I tried 9.0.5 on the OpenSUSE box, it doesn't build because it's missing sys/acl.h.

Try 9.0.5 on Solaris, same stupid attempt to create a shared object, with the wrong extension, same stupid missing "-o $@" in the .c.lo dependency.

Try 9.0.4, (why not, it's beginning to look like I will stay with 7.0.5, at least that builds on my machines), nope.

I'm giving up.

No, that's a lie, I really gave up when 9.0.6 and 9.0.5 failed to build on OpenSUSE, if Bacula doesn't build on a common Linux system how can I expect it to build on UNIX systems?

I have raised Mantis bugs: 2371, 2372, 2373, and 2374 covering these items.

Meanwhile, I shall go and have a Bex, a good strong cup of tea, and a lie down :-)

        Cheers,
                Gary    B-)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to