Operating System - HP-UX
1752510 Members
4519 Online
108788 Solutions
New Discussion

Re: Bacula: try to compile on HP-UX 11.31

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11.31

>Same error.

 

Compile with -E and save the output.

Search for the missing functions but without the "_r".  They should be in one file, time.h.

Then look at that file and see if the "_r" functions are there and what macro they are guarded with.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

Please how to compile with -E?

If i try ansi CC -E or gcc -E give me

the error "cannot create executables"

 

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11.31

>Please how to compile with -E?

 

You need to extract the complete compilation line out of the make output and then add -E to it.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

Ok thanks,i will try it now

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

I have found a solution for first error

http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/bacula-25/problems-compiling-on-hpux-with-fix-105989/

Now give another error

 

gmake[1]: Leaving directory '/tmp/build-bacula/bacula-7.2.0/src/lib'
==>Entering directory /tmp/build-bacula/bacula-7.2.0/src/findlib
gmake[1]: Entering directory '/tmp/build-bacula/bacula-7.2.0/src/findlib'
Compiling attribs.c
attribs.c: In function 'bool set_mod_own_time(JCR*, BFILE*, ATTR*)':
attribs.c:129: error: 'lchmod' was not declared in this scope
Makefile:150: recipe for target 'attribs.lo' failed
gmake[1]: *** [attribs.lo] Error 1
gmake[1]: Leaving directory '/tmp/build-bacula/bacula-7.2.0/src/findlib'
Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11.31

> attribs.c:129: error: 'lchmod' was not declared in this scope

 

There is a man page for lchown(2) but none for lchmod(2).

There is no prototype for lchmod(2) but there seems to be a libc function for it but without documentation it isn't supported.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

Downgrading to old 5.2 i get this error message

 

>Entering directory /tmp/build-bacula/bacula-5.2.13/src/filed
Linking bacula-fd ...
	/tmp/build-bacula/bacula-5.2.13/libtool --silent --tag=CXX --mode=link /usr/local/bin/g++   -L../lib -L../findlib -o bacula-fd filed.o authenticate.o acl.o backup.o estimate.o  fd_plugins.o accurate.o  filed_conf.o heartbeat.o job.o pythonfd.o  restore.o status.o verify.o verify_vol.o xattr.o \
	     -lbacfind -lbacpy -lbaccfg -lbac -lm  -lpthread  \
	     -lssl -lcrypto   
ld: Unsatisfied symbol "regerror(int, re_pattern_buffer const*, char*, unsigned long)" in file job.o
ld: (Warning) Unsatisfied symbol "regexec(re_pattern_buffer const*, char const*, unsigned long, regmatch_t*, int)" in file /tmp/build-bacula/bacula-5.2.13/src/findlib/.libs/libbacfind.so
ld: Unsatisfied symbol "regcomp(re_pattern_buffer*, char const*, int)" in file job.o
ld: (Warning) Unsatisfied symbol "posix_fadvise(int, long long, long long, int)" in file /tmp/build-bacula/bacula-5.2.13/src/lib/.libs/libbac.so
ld: Unsatisfied symbol "regfree(re_pattern_buffer*)" in file job.o
2 warnings.
3 errors.
collect2: ld returned 1 exit status
*** Codice di uscita errore 1

No way to get bacula on hpux?

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

Solved also this error with this configure

 

./configure --enable-client-only --prefix=/opt/bacula --sysconfdir=/etc/opt/bacula --localstatedir=/var/opt/bacula --with-working-dir=/var/opt/bacula/working --with-scriptdir=/var/opt/bacula/scripts --mandir=/opt/bacula/man --docdir=/opt/bacula/docs CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib'

gmake LDFLAGS="-lregex"

Solution found finally?Nope,another error!

 

Compiling acl.c
Compiling backup.c
backup.c: In function ‘bool setup_compression(bctx_t&)’:
backup.c:1099: error: ‘struct bctx_t’ has no member named ‘max_compress_len’
backup.c:1041: warning: unused variable ‘jcr’
Makefile:156: recipe for target 'backup.o' failed
gmake[1]: *** [backup.o] Error 1
gmake[1]: Leaving directory '/home/giuseppe/bacula/bin/bacula-7.2.0/src/filed'
uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11.31

The error "fixed" with this configure

 

./configure --enable-client-only --prefix=/opt/bacula --sysconfdir=/etc/opt/bacula --localstatedir=/var/opt/bacula --wit
h-working-dir=/var/opt/bacula/working --with-scriptdir=/var/opt/bacula/scripts --mandir=/opt/bacula/man --docdir=/opt/ba
cula/docs CPPFLAGS='-I/usr/local/include -I /usr/local/include/readline -I /usr/local/include/lzo'  LDFLAGS='-L/usr/loca
l/lib -L /usr/local/lib/hpux32'

But still give me the regex error,even with LDFLAGS='-lregex'

 

libtool --silent --tag=CXX --mode=link /usr/local/bin/g++ -lregex  -L../lib -L../cats -o bconsole console.o console_conf.o authenticate.o  \
        -lbaccfg -lbac -lm -lpthread  -lintl -lintl \
      -lssl -lcrypto
ld: (Warning) Unsatisfied symbol "regerror(int, re_pattern_buffer const*, char*, unsigned long)" in file /home/giuseppe/bacula/src/bacula-5.2.13/src/lib/.libs/libbac.so
ld: (Warning) Unsatisfied symbol "regexec(re_pattern_buffer const*, char const*, unsigned long, regmatch_t*, int)" in file /home/giuseppe/bacula/src/bacula-5.2.13/src/lib/.libs/libbac.so
ld: (Warning) Unsatisfied symbol "regcomp(re_pattern_buffer*, char const*, int)" in file /home/giuseppe/bacula/src/bacula-5.2.13/src/lib/.libs/libbac.so
ld: (Warning) Unsatisfied symbol "posix_fadvise(int, long long, long long, int)" in file /home/giuseppe/bacula/src/bacula-5.2.13/src/lib/.libs/libbac.so
ld: (Warning) Unsatisfied symbol "regfree(re_pattern_buffer*)" in file /home/giuseppe/bacula/src/bacula-5.2.13/src/lib/.libs/libbac.so
5 warnings.
==== Make of console is good ====

 

 

uxbeginner22
Trusted Contributor
Solution

Re: Bacula: try to compile on hpux11-31

Solution found,the package regex(gnu regex from http://hpux.connect.org.uk/)  must be removed before install bacula,then you can reinstall it

Using this configure works fine,i try it on bacula-git,i don't know if works fine on bacula-7.2

 

./configure --enable-client-only --prefix=/opt/bacula --sysconfdir=/etc/opt/bacula --localstatedir=/var/opt/bacula --with-working-dir=/var/opt/bacula/working --with-scriptdir=/var/opt/bacula/scripts --mandir=/opt/bacula/man --docdir=/opt/bacula/docs --disable-conio CPPFLAGS='-I/usr/local/include -I /usr/local/include/readline -I /usr/local/include/lzo'  LDFLAGS='-L/usr/local/lib'
gmake -j3

You need this patch,i don't know what happen if lchmod is removed,i will try with test backups

 

--- bacula-7.0.5/src/bacula.h   2015-08-13 15:52:24 +0200
+++ bacula-7.0.5/src/bacula.h   2015-10-05 19:21:09 +0200
@@ -72,7 +72,7 @@
 #endif
 #if HAVE_UNISTD_H
 #  ifdef HAVE_HPUX_OS
-#  undef _INCLUDE_POSIX1C_SOURCE
+/*#  undef _INCLUDE_POSIX1C_SOURCE*/
 #  endif
 #include <unistd.h>
 #endif
@@ -95,6 +95,7 @@
 #if defined(_MSC_VER)
 extern "C" {
 #include "getopt.h"
+#include "fcntl.h"
 }
 #endif
 
--- bacula-7.0.5/configure      2015-10-07 17:44:44 +0200
+++ bacula-7.0.5/configure      2015-10-07 17:44:57 +0200
@@ -22604,7 +22604,7 @@
 fi
 done
 
-for ac_func in lstat lchown lchmod futimes fchmod fchown
+for ac_func in lstat lchown futimes fchmod fchown
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"