>>>>> On Thu, 3 Apr 2014 15:27:20 +0100, Martin Simmons said: > > When building 7.0.2 with --disable-libtool on Linux and FreeBSD, linking bls > (and some other tools) fails like this: > > /usr/bin/g++ -L../lib -L../findlib -o bls bls.o block.o block_util.o > butil.o device.o dev.o os.o file_dev.o tape_dev.o label.o match_bsr.o > vtape_dev.o ansi_label.o ebcdic.o lock.o autochanger.o acquire.o mount.o > parse_bsr.o record_read.o record_write.o record_util.o read_records.o > reserve.o scan.o stored_conf.o spool.o sd_plugins.o status.o vol_mgr.o wait.o > \ > -lbacfind -lbaccfg -lbac -lm -lpthread -ldl -ldl > ../lib/libbac.a(message.o): In function `generate_daemon_event(JCR*, char > const*)': > /tmp/bacula-7.0.2/src/lib/message.c:116: multiple definition of > `generate_daemon_event(JCR*, char const*)' > bls.o:/tmp/bacula-7.0.2/src/stored/bls.c:29: first defined here > collect2: ld returned 1 exit status > > The problem is that generate_daemon_event is defined in lib/message.c and > stored/bls.c (plus some other standalone tools). It worked in 5.x because the > other definition was in lib/pythonlib.c, which was not linked into bls etc. > > Does generate_daemon_event have any purpose now that python is no longer used? > If not, perhaps it can be removed completely?
Please consider the attached patch, which removes the dummy definitions from the files that don't need them (and probably never did). __Martin
--- bacula-7.0.2/src/tools/bsmtp.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/bsmtp.c 2014-04-03 15:23:33.951696840 +0100 @@ -60,13 +60,6 @@ #include <lmcons.h> #endif -/* - * Dummy functions - */ -int generate_daemon_event(JCR *jcr, const char *event) -{ - return 1; -} #ifndef MAXSTRING #define MAXSTRING 254 --- bacula-7.0.2/src/tools/dbcheck.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/dbcheck.c 2014-04-03 17:28:30.615220678 +0100 @@ -30,12 +30,6 @@ extern bool parse_dir_config(CONFIG *config, const char *configfile, int exit_code); -/* - * Dummy functions - */ -int generate_daemon_event(JCR *jcr, const char *event) - { return 1; } - typedef struct s_id_ctx { int64_t *Id; /* ids to be modified */ int num_ids; /* ids stored */ --- bacula-7.0.2/src/tools/drivetype.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/drivetype.c 2014-04-03 15:23:58.985933109 +0100 @@ -25,10 +25,6 @@ #include "bacula.h" #include "findlib/find.h" -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) - { return 1; } - static void usage() { fprintf(stderr, _( --- bacula-7.0.2/src/tools/fstype.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/fstype.c 2014-04-03 15:24:10.161593014 +0100 @@ -26,10 +26,6 @@ #include "findlib/find.h" #include "lib/mntent_cache.h" -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) - { return 1; } - static void usage() { fprintf(stderr, _( --- bacula-7.0.2/src/tools/testfind.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/testfind.c 2014-04-03 15:22:54.308905806 +0100 @@ -31,7 +31,6 @@ #endif /* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } int generate_job_event(JCR *jcr, const char *event) { return 1; } void generate_plugin_event(JCR *jcr, bEventType eventType, void *value) { } extern bool parse_dir_config(CONFIG *config, const char *configfile, int exit_code); --- bacula-7.0.2/src/tools/testls.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/tools/testls.c 2014-04-03 15:22:54.309905621 +0100 @@ -26,7 +26,6 @@ #include "findlib/find.h" /* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } int generate_job_event(JCR *jcr, const char *event) { return 1; } void generate_plugin_event(JCR *jcr, bEventType eventType, void *value) { } --- bacula-7.0.2/src/stored/bcopy.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/stored/bcopy.c 2014-04-03 17:14:32.927537232 +0100 @@ -24,8 +24,6 @@ #include "bacula.h" #include "stored.h" -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code); /* Forward referenced functions */ --- bacula-7.0.2/src/stored/bls.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/stored/bls.c 2014-04-03 17:14:25.757754603 +0100 @@ -25,8 +25,6 @@ #include "stored.h" #include "findlib/find.h" -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code); static void do_blocks(char *infname); --- bacula-7.0.2/src/stored/bscan.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/stored/bscan.c 2014-04-03 17:14:15.937051747 +0100 @@ -29,8 +29,6 @@ #include "cats/cats.h" #include "cats/sql_glue.h" -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code); /* Forward referenced functions */ --- bacula-7.0.2/src/stored/btape.c.orig 2014-04-02 18:32:30.000000000 +0100 +++ bacula-7.0.2/src/stored/btape.c 2014-04-03 17:14:01.250495517 +0100 @@ -34,8 +34,6 @@ #include "vtape_dev.h" #endif -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code); /* External subroutines */
------------------------------------------------------------------------------
_______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel