Operating System - HP-UX
1752474 Members
6390 Online
108788 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on hpux11-31

I found another  solution here

https://groups.google.com/forum/?hl=de#!topic/bareos-devel/z__p6DoZAJQ

But how to force chmod instead of lchmod?

 

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on hpux11-31

New error

 

/usr/lib/hpux32/dld.so: Unsatisfied code symbol '_Z13posix_fadviseixxi' in load module '/opt/bacula/lib/libbacfind-7.4.0.so'.

 

How to solve?Thanks

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>How to solve?

 

So where is posix_fadvise(int, long long, long long, int) suppose to be defined?

It appears this is a Linux function.  Perhaps someone forgot to stub it out on HP-UX AND declare as extern "C".

uxbeginner22
Trusted Contributor

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

I have manpage on hpux

man -k posix|grep -i advi
posix_fadvise(), posix_fadvise64()(2)   - file advisory information
Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>I have manpage on HP-UX

 

Ah, it looks like someone didn't put the new prototypes in the right place.  They aren't C++ified correctly.

You'll have to modify /usr/include/sys/fcntl.h.  (And notify Support about this bug.)

uxbeginner22
Trusted Contributor

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

Ok thanks

uxbeginner22
Trusted Contributor

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

I have removed reference to system call in /usr/include/sys/fcntl.h

But bacula don't compile give errors.

 

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>I have removed reference to system call in /usr/include/sys/fcntl.h

 

You don't remove it, you move it down to the right place, so it's in the extern "C" block.

uxbeginner22
Trusted Contributor

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

I cannot found the "external C block" on fnctl.h,can you post an example please?

Thanks

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>I cannot find the "external C block" on fnctl.h

 

If you use C++, you should know what an extern "C" block is.

This block doesn't belong here (or the prototype doesn't):

#if (defined(_INCLUDE_XOPEN_SOURCE_600) || defined(_INCLUDE_HPUX_SOURCE))

extern int posix_fadvise __((int, off_t, off_t, int));

#if (defined(_INCLUDE_HPUX_SOURCE))
extern int posix_fadvise64 __((int, off_t, off_t, int));
#endif

/*
* posix_fadvise() hints for POSIX IEEE Std 1003.1
*/

#define POSIX_FADV_NORMAL 1 /* Application has no advice */
#define POSIX_FADV_SEQUENTIAL 2 /* Sequentially accessed data */
#define POSIX_FADV_RANDOM 3 /* Data accessed is randomly */
#define POSIX_FADV_WILLNEED 4 /* Data will be accessed in future */
#define POSIX_FADV_DONTNEED 5 /* Data will not be accessed again */
#define POSIX_FADV_NOREUSE 6 /* Data will be accessed once only */

#endif /* defined(_INCLUDE_XOPEN_SOURCE_600) || defined(_INCLUDE_HPUX_SOURCE) */

 

It belongs where the comment says:

/* Function prototypes */

# ifndef _KERNEL
# ifdef __cplusplus
extern "C" {                         <<<< extern "C" block start
# endif /* __cplusplus */

<< move to here

 

There is another thing wrong but that's shouldn't be important.