Operating System - HP-UX
1752805 Members
5840 Online
108789 Solutions
New Discussion

inotify module for HPUX 11.31

 
SOLVED
Go to solution
chindi
Respected Contributor

inotify module for HPUX 11.31

Hi ,

 

Do we have software depot of inotify for 11.31 ? We are trying to configure Ossec tool which has real time file monitoring ability .

If not am trying to compile one  , but am getting following error ;

I have compiled by using the following ;

 

On HP-UX, the default C compiler is not ANSI C compatible. If GNU   CC is not installed, it is recommended to use the following options in   order to use an ANSI C compiler:       ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"

 

root #/home/inotify-tools-3.14 >make install
No suffix list.
Making install in libinotifytools
No suffix list.
Making install in src
Making install in inotifytools
No suffix list.
No suffix list.
No suffix list.
No suffix list.
source='inotifytools.c' object='inotifytools.lo' libtool=yes \
DEPDIR=.deps depmode=hp2 /bin/sh ../../depcomp \
/bin/sh ../../libtool --tag=CC --mode=compile cc -Ae -D_XOPEN_SOURCE=500 -DHAVE_CONFIG_H -I. -I../.. -I../../libinotifytools/src/inotifytools -std=c99 -g -c -o inotifytools.lo inotifytools.c
libtool: compile: cc -Ae -D_XOPEN_SOURCE=500 -DHAVE_CONFIG_H -I. -I../.. -I../../libinotifytools/src/inotifytools -std=c99 -g -c +Maked inotifytools.c -DPIC -o .libs/inotifytools.o
cc: error 1914: bad form for `-t' option
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

18 REPLIES 18
Patrick Wallek
Honored Contributor

Re: inotify module for HPUX 11.31

Since that is not working I would now try installing GCC.

 

You can get it from: http://mirrors.develooper.com/hpux/downloads.html

 

There are GCC depots for almost all HP-UX versions starting with 10.20.

Steven Schweda
Honored Contributor

Re: inotify module for HPUX 11.31

> [...] -std=c99 [...]

> cc: error 1914: bad form for `-t' option

   I've not looked at this code (or its builders), so I know nothing,
but "-std=c99" looks to me more like a valid GCC option than a valid HP
C option.  It's possible that the developers of this stuff (or only
"libtool"?) really require GCC (or, at least, more that just giving
"configure" a different "CC" value to work with).

   "GNU" and "portable" are spelled differently for a reason.

chindi
Respected Contributor

Re: inotify module for HPUX 11.31

root #/home/tejachau/inotify-tools-3.14 >./configure CC=/usr/local/bin/gcc
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... /usr/local/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/bin/gcc accepts -g... yes
checking for /usr/local/bin/gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/local/bin/gcc... gcc3
checking build system type... ia64-hp-hpux11.31
checking host system type... ia64-hp-hpux11.31
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/local/bin/gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1536000
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -p output from /usr/local/bin/gcc object... ok
checking how to run the C preprocessor... /usr/local/bin/gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/local/bin/gcc supports -fno-rtti -fno-exceptions... no
checking for /usr/local/bin/gcc option to produce PIC... -fPIC -DPIC
checking if /usr/local/bin/gcc PIC flag -fPIC -DPIC works... yes
checking if /usr/local/bin/gcc static flag -static works... no
checking if /usr/local/bin/gcc supports -c -o file.o... yes
checking if /usr/local/bin/gcc supports -c -o file.o... (cached) yes
checking whether the /usr/local/bin/gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... hpux11.31 dld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for doxygen... NO_DOXYGEN
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
checking mcheck.h usability... no
checking mcheck.h presence... no
checking for mcheck.h... no
checking whether sys/inotify.h actually works... nope, using own inotify headers
checking for an ANSI C-conforming const... yes
checking for inline... inline
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating libinotifytools/Makefile
config.status: creating libinotifytools/src/Makefile
config.status: creating libinotifytools/src/inotifytools/Makefile
config.status: creating config.h
config.status: creating libinotifytools/src/inotifytools/inotify.h
config.status: executing depfiles commands
config.status: executing libtool commands

 

root #/home/tejachau/inotify-tools-3.14 >make
No suffix list.
make all-recursive
No suffix list.
Making all in libinotifytools
No suffix list.
Making all in src
Making all in inotifytools
No suffix list.
make all-am
No suffix list.
No suffix list.
No suffix list.
/bin/sh ../../libtool --tag=CC --mode=compile /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libinotifytools/src/inotifytools -std=c99 -g -O2 -MT inotifytools.lo -MD -MP -MF .deps/inotifytools.Tpo -c -o inotifytools.lo inotifytools.c
libtool: compile: /usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libinotifytools/src/inotifytools -std=c99 -g -O2 -MT inotifytools.lo -MD -MP -MF .deps/inotifytools.Tpo -c inotifytools.c -fPIC -DPIC -o .libs/inotifytools.o
In file included from inotifytools.c:31:
/usr/include/regex.h:118: error: static or type qualifiers in abstract declarator
In file included from inotifytools/inotify.h:12,
from inotifytools.c:34:
inotifytools/inotify-nosys.h:27: error: expected ':', ',', ';', '}' or '__attribute__' before '__flexarr'
inotifytools/inotify-nosys.h: In function 'inotify_init':
inotifytools/inotify-nosys.h:153: warning: implicit declaration of function 'syscall'
inotifytools.c: In function 'inotifytools_cleanup':
inotifytools.c:330: warning: implicit declaration of function 'close'
inotifytools.c: In function 'replace_filename':
inotifytools.c:383: warning: implicit declaration of function 'asprintf'
inotifytools.c: In function 'onestr_to_event':
inotifytools.c:563: warning: implicit declaration of function 'strcasecmp'
inotifytools.c: In function 'inotifytools_set_filename_by_wd':
inotifytools.c:812: warning: implicit declaration of function 'strdup'
inotifytools.c:812: warning: assignment makes pointer from integer without a cast
inotifytools.c: In function 'inotifytools_set_filename_by_filename':
inotifytools.c:834: warning: assignment makes pointer from integer without a cast
inotifytools.c: In function 'create_watch':
inotifytools.c:892: warning: assignment makes pointer from integer without a cast
inotifytools.c: In function 'inotifytools_watch_files':
inotifytools.c:1002: warning: assignment makes pointer from integer without a cast
inotifytools.c: In function 'inotifytools_next_events':
inotifytools.c:1164: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_fds'
inotifytools.c:1164: error: 'read_fds' undeclared (first use in this function)
inotifytools.c:1164: error: (Each undeclared identifier is reported only once
inotifytools.c:1164: error: for each function it appears in.)
inotifytools.c:1166: error: storage size of 'read_timeout' isn't known
inotifytools.c:1172: warning: implicit declaration of function 'FD_ZERO'
inotifytools.c:1173: warning: implicit declaration of function 'FD_SET'
inotifytools.c:1174: warning: implicit declaration of function 'select'
inotifytools.c:1188: warning: implicit declaration of function 'ioctl'
inotifytools.c:1188: error: 'FIONREAD' undeclared (first use in this function)
inotifytools.c:1197: warning: implicit declaration of function 'read'
inotifytools.c: In function 'inotifytools_watch_recursively_with_exclude':
inotifytools.c:1288: error: 'DIR' undeclared (first use in this function)
inotifytools.c:1288: error: 'dir' undeclared (first use in this function)
inotifytools.c:1291: warning: implicit declaration of function 'opendir'
inotifytools.c:1294: error: 'ENOTDIR' undeclared (first use in this function)
inotifytools.c:1312: error: storage size of 'my_stat' isn't known
inotifytools.c:1313: warning: implicit declaration of function 'readdir'
inotifytools.c:1313: warning: assignment makes pointer from integer without a cast
inotifytools.c:1316: error: dereferencing pointer to incomplete type
inotifytools.c:1317: error: dereferencing pointer to incomplete type
inotifytools.c:1318: error: dereferencing pointer to incomplete type
inotifytools.c:1319: warning: implicit declaration of function 'lstat64'
inotifytools.c:1322: error: 'EACCES' undeclared (first use in this function)
inotifytools.c:1325: warning: implicit declaration of function 'closedir'
inotifytools.c:1329: warning: implicit declaration of function 'S_ISDIR'
inotifytools.c:1330: warning: implicit declaration of function 'S_ISLNK'
inotifytools.c:1332: error: dereferencing pointer to incomplete type
inotifytools.c:1359: error: 'ENOENT' undeclared (first use in this function)
inotifytools.c:1360: error: 'ELOOP' undeclared (first use in this function)
inotifytools.c:1373: warning: assignment makes pointer from integer without a cast
inotifytools.c: In function 'isdir':
inotifytools.c:1598: error: storage size of 'my_stat' isn't known
inotifytools.c:1601: error: 'ENOENT' undeclared (first use in this function)
inotifytools.c: In function 'inotifytools_snprintf':
inotifytools.c:1826: error: 'struct inotify_event' has no member named 'name'
inotifytools.c:1836: error: 'EINVAL' undeclared (first use in this function)
inotifytools.c:1840: error: 'EMSGSIZE' undeclared (first use in this function)
inotifytools.c: In function 'inotifytools_ignore_events_by_regex':
inotifytools.c:2021: error: 'EINVAL' undeclared (first use in this function)
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

 

Now afetr gcc installed am getting above error in "make"

 

 

Steven Schweda
Honored Contributor

Re: inotify module for HPUX 11.31

> Now afetr gcc installed am getting above error in "make"

   What, exactly, did you install?  How?  Do you have any evidence that
your new GCC actually works?  Can you compile/link/run a simple test
program with it?

chindi
Respected Contributor

Re: inotify module for HPUX 11.31

root #/home/tejachau/inotify-tools-3.14/libinotifytools/src >/usr/local/bin/gcc --version
gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

 

Where can i upload the source tar ?

We have cleard some syntax issues but stuck at one point .

 

 

chindi
Respected Contributor

Re: inotify module for HPUX 11.31

Hi Dennis ,

 

Any clue would be great , stuck here :(

PFA inotify source tar file.

Steven Schweda
Honored Contributor

Re: inotify module for HPUX 11.31

>    What, exactly, did you install?  How?  Do you have any evidence that
> your new GCC actually works?  Can you compile/link/run a simple test
> program with it?

> root #/home/tejachau/inotify-tools-3.14/libinotifytools/src >/usr/local/bin/gcc --version
> gcc (GCC) 4.2.3

   It's nice that "gcc --version" works, but I still don't know if you
can compile/link/run a simple test program using your new GCC.  With so
many of those "warning: implicit declaration of function <blah>"
complaints, there seems to be something very basic wrong with the
compiler, the code, or the builders.

> Where can i upload the source tar ?

   What, exactly, do you want to "upload" (download?)?

> We have cleard some syntax issues but stuck at one point .

   With my weak psychic powers, I don't know what you changed, or what
happened before you made any changes.  (I also don't know where you got
your source kit.)

> Any clue would be great , stuck here :(


   You first.  I still don't know if you can compile/link/run a simple
test program using your new GCC.

> inotify-tools-3.14.txt #351 KB

   Is that a .tar.gz compressed archive?  Before or after you started
playing with the sources?

Dennis Handly
Acclaimed Contributor

Re: inotify module for HP-UX 11.31

chindi
Respected Contributor

Re: inotify module for HP-UX 11.31

Hi Dennis ,

 

Yes my mistake should have renamed it to inotify-tools-3.14.tar.gz.txt

GCC is working please check below ;

 

root #/home/tejachau/inotify-tools-3.14 >cat test.c
#include <stdio.h>

int main() {
printf("Hello, world!\n");
return 0;
}

 

 

root #/home/tejachau/inotify-tools-3.14 >gcc test.c -o test

root #/home/tejachau/inotify-tools-3.14 >./test
Hello, world!