Trouble compiling cvm with bglibs

"Graham Miller" <[email protected]> Wed, 6 Jul 2005 16:41:27 +1000
Newsgroups gmane.comp.sysutils.bgware
Message-ID <[email protected]>
Hi all,

I have had some trouble compiling cvm-0.71 on a CentOS4 box.

bglibs version bglibs-1.022
cvm version cvm-0.71

1/ It did not compile ./instshow, ./installer, or ./instcheck

2/ When I tried to use "make install", it barked about undefined reference to 'outbuf' and various function names related to that (obuf_putf, obuf_putc, obuf_write, obuf_flush).

3/ It also barked about undefined reference to string library functions (msg_die, str_copys, str_copy, str_catc, str_cats, wrap_str).

I notice that both sets are found in the sub-directories (iobuf, str) of the bglibs install. I checked the Makefile and found the following:

A/ It did not compile the installers by default.

B/ The ./load lines for the 3 installer programs did not have a library option on the command line.

So I adjusted the Makefile (I know it says not to in the file... wants to use 'spac') and it then compiled OK for me.

The attached patch is what worked for me. I would not recommend anyone use it on a production server until Bruce sanctions the fixes or produces another patch/version.

Bruce, would you mind checking this and commenting on its correctness. I guess there is some backend spac stuff that needs changing to make this work, or is this behaviour a feature that I should not have fixed?

regards
Graham


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
cvm-0.71-makeinstallfix.patch (application/octet-stream, 974 B)
--- Makefile.orig       2005-07-06 16:02:28.667883763 +1000
+++ Makefile    2005-07-06 16:13:55.688123658 +1000
@@ -6,7 +6,7 @@

 DEFAULT: all

-all: libraries programs docs
+all: libraries programs installs docs

 clean: TARGETS
        rm -f `cat TARGETS`
@@ -203,19 +203,21 @@
        ./installer
        ./instcheck

+installs: instshow installer instcheck
+
 installer: load insthier.o
-       ./load insthier -lbg-installer
+       ./load insthier -lbg-installer -lbg
        mv insthier installer

 instcheck: load insthier.o
-       ./load insthier -lbg-instcheck
+       ./load insthier -lbg-instcheck -lbg
        mv insthier instcheck

 insthier.o: compile insthier.c conf_bin.c conf_include.c conf_lib.c
        ./compile insthier.c

 instshow: load insthier.o
-       ./load insthier -lbg-instshow
+       ./load insthier -lbg-instshow -lbg
        mv insthier instshow

 libraries: v1client.a qmail.a sql.a udp.a command.a module.a local.a v2client.a sasl.a