Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#18775 closed defect (fixed)

bacula not building under Leopard

Reported by: ndoc2@… Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: bacula missing link Cc:
Port: bacula

Description (last modified by mf2k (Frank Schima))

Tried installing bacula. Even as client_only, there are link errors when linking the file daemon. eg. :

Linking bacula-fd ...
/usr/bin/g++-4.0   -L../lib -L../findlib -o bacula-fd filed.o authenticate.o acl.o backup.o estimate.o filed_conf.o heartbeat.o job.o pythonfd.o restore.o status.o verify.o verify_vol.o \
	   -lz		   -lfind -lbac -lm  -lpthread  \
	    -L/opt/local/lib -lintl -liconv -lc  -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -lssl -lcrypto
Undefined symbols:
  "q_msg(char const*, int, JCR*, int, long, char const*, ...)", referenced from:
      bclose_chksize(JCR*, BFILE*, long long)in restore.o
      verify_signature(JCR*, r_ctx&)    in restore.o
      do_restore(JCR*)     in restore.o
      do_restore(JCR*)     in restore.o

There are many other symbols also missing, store_bool(s_lex_context*, RES_ITEM*, int, int), Jmsg(JCR*, int, long, char const*, ...)

Perhaps there is some dependency missing?

Attachments (5)

SteinmetzPortList.txt (349.8 KB) - added by ndoc2@… 15 years ago.
list of installed ports where link errors occur
Portfile-bacula.diff (818 bytes) - added by ndoc2@… 15 years ago.
patch to remove tray monitor build and configuration file.
debugLog.txt (51.9 KB) - added by ndoc2@… 15 years ago.
debug log of attempt to build
Makefile (11.0 KB) - added by ndoc2@… 15 years ago.
makefile for base source directory of bacula build
Makefile.in (9.1 KB) - added by ndoc2@… 15 years ago.
input to build makefile in root source directory

Download all attachments as: .zip

Change History (20)

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

Description: modified (diff)
Owner: changed from macports-tickets@… to macsforever2000@…
Status: newassigned

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

I can't reproduce this issue. What OS version are you running? What version of Xcode?

Changed 15 years ago by ndoc2@…

Attachment: SteinmetzPortList.txt added

list of installed ports where link errors occur

comment:3 Changed 15 years ago by ndoc2@…

I'm using:

Mac OS 10.5.6 XCode 3.1.1

thanks, Peter

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

I can only suggest that make sure you are completely up to date.

Update Xcode to version 3.1.2. Then:

sudo port selfupdate
sudo port upgrade outdated
sudo port clean bacula
sudo port install bacula

comment:5 Changed 15 years ago by blb@…

Definitely not a dependency issue, q_msg (at least) is part of bacula; it should be compiled into src/lib/message.o which is then added to src/lib/libbac.a, and then should be picked up with the -lbac in the command that failed.

Best would be, when running install on bacula (after the clean) to enable debug, then attach the output from that here.

comment:6 Changed 15 years ago by ndoc2@…

Thanks again. Performed those steps.

Well, after much poking around it appeared to be a funny linking issue. I used the -t option and manually executed the troublesome compile and link command from the build. This showed that I had a dynamic version of the the bac library as /usr/lib/libbac.dylib from a different install. By default the linker finds that first, on the default system path, and that fails to provide the correct symbols.

There is apparently a remaining issue during the install phase. My install complains that there is an error renaming the etc/bacula/tray-monitor.conf file during destroot. If I comment out this rename command in the PortFile, then install seems to be ok.

I notice that the configure.args contains --enable-tray-monitor also. Is this correct on a MacOS X system? It doesn't seem like the build is building the tray monitor when it runs, and perhaps that is why that config file isn't present?

Also, I'm wondering if it might be nice to provide a +bat variant to build the gui administration tool using the qt4 and qwt packages?

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

The tray monitor builds fine for me. I admit that I've never gotten it running because we don't really use it here at work and so I'm not sure what settings to use in the conf file for it. I haven't spent more than a few minutes on it though.

Yes, I agree it would be nice to have a bat variant. But I don't have time to work on it. At work, we run it from linux where our bacula server is located. If you are so inclined, please supply a patch and I'll add it to the port.

So it looks like your build issues are due to another install of bacula? Can we close this ticket?

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

Resolution: worksforme
Status: assignedclosed

comment:9 Changed 15 years ago by ndoc2@…

Thanks again for the input. Sorry, been oot the last few days. I believe there is still a problem on a clean install (with no other bacula installations) for the tray monitor.

The simple solution to this seems to be to disable the build tray monitor option (since it is not known to be working) and remove the line trying to copy the configuration file, which doesn't exist on my machine during a clean install. (Is it possible that building the tray monitor depends on some other package not presently in the dependencies and when one runs the bacula build script without it, something goes wrong, so there is no original tray-monitor.conf to rename?)

I attach here a patch for the PortFile which corrects this on my machine and will build the bconsole and file daemon when the +client_only variant is used.

On another note, to avoid conflicts such as encountered with the fink build, it seems like a link option should be -Z (to turn off searching of normal library paths) and addition of appropriate paths and -l options for all required libraried, but I don't know the macports convention regarding this)

Changed 15 years ago by ndoc2@…

Attachment: Portfile-bacula.diff added

patch to remove tray monitor build and configuration file.

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

I'm not inclined to commit the patch because it compiles fine for me. I think the problem lies elsewhere.

Do you have fink installed too?

Also, can you please try the install again after temporarily renaming your /usr/local directory /usr/local.moved?

comment:11 Changed 15 years ago by ndoc2@…

OK, thanks, trying to rebuild here.

No fink installed and no /sw directory.

After moving /usr/local to /usr/local.moved, did a clean --all of bacula. I notice that this leaves /opt/local/etc/bacula, so remove that as well.

Then tried a sudo port install -d bacula +client_only and obtained the new debugLog.txt just uploaded.

This ends with:

Error: Target org.macports.destroot returned: error renaming "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_bacula/work/destroot/opt/local/etc/bacula/tray-monitor.conf": no such file or directory Error: Status 1 encountered during processing.

When I check in the directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_bacula/work/destroot/opt/local/etc/bacula', there is no tray-monitor.conf file there.

I note a few items:

line 674 shows it being configured to build the tray monitor

there is no make of tray-monitor is good being reported

Nonetheless /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_bacula/work/bacula-2.4.4/src/tray-monitor exists, and contains reasonable values for the machine being configured.

This would seem to imply that make install is not being done on tray-monitor. And the debugLog.txt doesn't show it being built either.

If one looks in the /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_bacula/work/bacula-2.4.4/Makefile (just uploaded)

line 104 doesn't mention tray-monitor

which is where the directories to be built seem to be defined

looking at the corresponding Makefile.in (just uploaded)

line 21 seems to define this in terms of a @TRAY_MONITOR_DIR@ macro, and it appears that all the entries on this line are simply ending up blank in the constructed Makefile, so then no tray-monitor build.

Changed 15 years ago by ndoc2@…

Attachment: debugLog.txt added

debug log of attempt to build

Changed 15 years ago by ndoc2@…

Attachment: Makefile added

makefile for base source directory of bacula build

Changed 15 years ago by ndoc2@…

Attachment: Makefile.in added

input to build makefile in root source directory

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

Further poking around seems to indicate that Gnome is required for the tray-monitor. And I have Gnome disabled in the configure file. I'm inclined to turn off building the tray monitor for now and play around with enabling gnome to see if works in the future. I disabled the tray monitor in r48122.

Thanks for looking into this!

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

Resolution: worksforme
Status: closedreopened

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

Resolution: fixed
Status: reopenedclosed

comment:15 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.