Operating System - HP-UX
1751932 Members
4907 Online
108783 Solutions
New Discussion

Bacula: try to compile on hpux11-31

 
SOLVED
Go to solution
uxbeginner22
Trusted Contributor

Bacula: try to compile on hpux11-31

When i try to compile latest bacula(5.0.12)

on hpux-11.31 i get

 

==>Entering directory /usr/local/src/bacula/bacula-5.2.13/src/lib
Compiling attr.c
attr.c: In function 'ATTR* new_attr(JCR*)':
attr.c:50: error: 'getuid' was not declared in this scope

 

someone had succes compiling bacula?

Thanks

 

 

P.S. This thread has been moved from HP-UX > General  to HP-UX > languages. - Hp Forum Moderator

31 REPLIES 31
Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31

Has <unistd.h> been included in the source?

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

Yes

 

config.log:| # include <unistd.h>

 

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31

>config.log:| # include <unistd.h>

 

Has it been included in attr.c?

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

No it wasn't,now is working.

Thanks

 

 

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

My mistake..includedir was wrong.
With correct include dir compile fine
Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31

>now is working.  Thanks

 

If the answers were helpful, please click on the Kudos stars.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on hpux11-31

New error

 

Compiling btime.c
btime.c: In function 'char* bstrftime(char*, int, int64_t)':
btime.c:52: error: 'localtime_r' was not declared in this scope
btime.c: In function 'char* bstrftimes(char*, int, int64_t)':
btime.c:64: error: 'localtime_r' was not declared in this scope
btime.c: In function 'char* bstrftime_dn(char*, int, int64_t)':
btime.c:76: error: 'localtime_r' was not declared in this scope
btime.c: In function 'char* bstrftime_ny(char*, int, int64_t)':
btime.c:88: error: 'localtime_r' was not declared in this scope
btime.c: In function 'char* bstrftime_nc(char*, int, int64_t)':
btime.c:102: error: 'localtime_r' was not declared in this scope
btime.c: In function 'char* bstrutime(char*, int, int64_t)':
btime.c:121: error: 'localtime_r' was not declared in this scope
btime.c: In function 'int tm_woy(time_t)':
btime.c:250: error: 'localtime_r' was not declared in this scope
btime.c: In function 'void get_current_time(date_time*)':
btime.c:275: error: 'gmtime_r' was not declared in this scope
*** Codice di uscita errore 1

On bacula 7.2.0

i use this configure

 

CPPFLAGS='-I/usr/include' ./configure --enable-client-only \
--prefix=/opt/bacula \
--sysconfdir=/etc/opt/bacula \
--localstatedir=/var/opt/bacula \
--mandir=/opt/bacula/man \
--docdir=/opt/bacula/docs

If use configure without CPPFLAGS give same error

Dennis Handly
Acclaimed Contributor

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

>error: 'localtime_r' was not declared in this scope

 

To get the _r versions of these functions you probably have to compile with cc -mt.

For gcc that probably maps to: -D_POSIX_C_SOURCE=199506L

 

http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/HTML/options.htm#opt-mt

uxbeginner22
Trusted Contributor

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

Same error.