Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP-UX support #58

Open
Tontonitch opened this issue Apr 2, 2014 · 16 comments
Open

HP-UX support #58

Tontonitch opened this issue Apr 2, 2014 · 16 comments

Comments

@Tontonitch
Copy link

Hi,
This project looks very nice!
It would be great to see it working on HP-UX platforms.
I tried to compile it (even if the platform is not supported), but it stop at
checking if host OS is supported... no
configure: error: *** unsupported OS hpux11.31
Every other checks are ok.
Best regards,
Yannick

@vincentbernat
Copy link
Member

❦ 2 avril 2014 09:50 CEST, Yannick Charton notifications@github.com :

It would be great to see it working on HP-UX platforms.
I tried to compile it (even if the platform is not supported), but it
stop at
checking if host OS is supported... no
configure: error: *** unsupported OS hpux11.31
Every other checks are ok.

Maybe that's not very hard to add support for HPUX, maybe not. You can
modify m4/os.m4, then run ./autogen.sh (if it fails in HPUX, just do it
on a recent Linux, then sync the directory). If I can get a shell
access, it would help. Or maybe this is something that could run in a

virtual machine?

Make sure your code "does nothing" gracefully.
- The Elements of Programming Style (Kernighan & Plauger)

@Tontonitch
Copy link
Author

Hi Vincent,
With the change (the change has been done on another node (CentOS)), the ./autogen.sh and then the ./configure produced a small warning (./configure[3365]: AM_PROG_AR: not found.)
But doesn't seem an important/blocking problem.
Then, the configure script ran ok, ended with the following summary:

------------------ Summary ------------------
 lldpd version 0.7.7
  OS.............: Hpux
  Prefix.........: /usr/local
  C Compiler.....: gcc -std=gnu99 -g -O2 -fdiagnostics-show-option -pipe -Wall -W -Wextra -Wformat -Wformat-security -Wfatal-errors -Wcast-align -Winline -D_FORTIFY_SOURCE=2 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
  Linker.........: /usr/ccs/bin/ld
  Libevent.......: embedded
  Readline.......: no
 Optional features:
  SNMP support...: no
  CDP............: yes
  FDP............: yes
  EDP............: yes
  SONMP..........: yes
  LLDPMED........: yes
  DOT1...........: yes
  DOT3...........: yes
  XML output.....: no
  JSON output....: no
  Oldies support.: no
  seccomp........: no
---------------------------------------------

Unfortunately, the make part failed, mainly with "priv.c:254:2: error: #error Unsupported OS":

root@hpora2-b# make
No suffix list.
        make  all-recursive
No suffix list.
Making all in src/compat
  CC     empty.lo
  CC     realloc.lo
  CC     setproctitle.lo
  CC     strlcpy.lo
  CC     strnlen.lo
  CC     strndup.lo
  CC     fgetln.lo
fgetln.c: In function 'fgetln':
fgetln.c:40: warning: implicit declaration of function 'getline'
  CCLD   libcompat.la
Making all in src
  CC     log.lo
log.c: In function 'vlog':
log.c:132: warning: implicit declaration of function 'vasprintf'
log.c:142: warning: implicit declaration of function 'asprintf'
log.c:156: warning: implicit declaration of function 'vsyslog'
  CC     marshal.lo
  CC     ctl.lo
  CC     lldpd-structs.lo
  CCLD   libcommon-daemon-lib.la
  CCLD   libcommon-daemon-client.la
Making all in src/daemon
        make  all-am
  CC     liblldpd_la-frame.lo
  CC     liblldpd_la-lldp.lo
  CC     liblldpd_la-cdp.lo
cdp.c: In function 'cdp_decode':
cdp.c:492: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-sonmp.lo
sonmp.c: In function 'sonmp_decode':
sonmp.c:342: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-edp.lo
edp.c: In function 'edp_decode':
edp.c:356: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-client.lo
  CC     liblldpd_la-priv.lo
priv.c: In function 'asroot_gethostbyname':
priv.c:199: warning: implicit declaration of function 'res_init'
priv.c:254:2: error: #error Unsupported OS
priv.c: In function 'priv_init':
priv.c:525: error: 'AF_LOCAL' undeclared (first use in this function)
compilation terminated due to -Wfatal-errors.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
root@hpora2-b#

I've done some changes in src/daemon/priv.c, intruducing HOST_OS_HPUX:

#elif defined HOST_OS_OPENBSD || defined HOST_OS_NETBSD || defined HOST_OS_SOLARIS || defined HOST_OS_HPUX
        struct sockaddr *sap = (struct sockaddr *)&ifr.ifr_addr;
#if ! defined HOST_OS_SOLARIS && ! defined HOST_OS_HPUX
        sap->sa_len = sizeof(struct sockaddr);
#endif
        sap->sa_family = AF_UNSPEC;
        must_read(sap->sa_data, ETHER_ADDR_LEN);
#else
#error Unsupported OS

But the compilation failed again:

root@hpora2-b# make
No suffix list.
        make  all-recursive
No suffix list.
Making all in src/compat
  CC     empty.lo
  CC     realloc.lo
  CC     setproctitle.lo
  CC     strlcpy.lo
  CC     strnlen.lo
  CC     strndup.lo
  CC     fgetln.lo
fgetln.c: In function 'fgetln':
fgetln.c:40: warning: implicit declaration of function 'getline'
  CCLD   libcompat.la
Making all in src
  CC     log.lo
log.c: In function 'vlog':
log.c:132: warning: implicit declaration of function 'vasprintf'
log.c:142: warning: implicit declaration of function 'asprintf'
log.c:156: warning: implicit declaration of function 'vsyslog'
  CC     marshal.lo
  CC     ctl.lo
  CC     lldpd-structs.lo
  CCLD   libcommon-daemon-lib.la
  CCLD   libcommon-daemon-client.la
Making all in src/daemon
        make  all-am
  CC     liblldpd_la-frame.lo
  CC     liblldpd_la-lldp.lo
  CC     liblldpd_la-cdp.lo
cdp.c: In function 'cdp_decode':
cdp.c:492: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-sonmp.lo
sonmp.c: In function 'sonmp_decode':
sonmp.c:342: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-edp.lo
edp.c: In function 'edp_decode':
edp.c:356: warning: implicit declaration of function 'asprintf'
  CC     liblldpd_la-client.lo
  CC     liblldpd_la-priv.lo
priv.c: In function 'asroot_gethostbyname':
priv.c:199: warning: implicit declaration of function 'res_init'
priv.c: In function 'priv_init':
priv.c:525: error: 'AF_LOCAL' undeclared (first use in this function)
compilation terminated due to -Wfatal-errors.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
root@hpora2-b#

Best regards,
Yannick

@Tontonitch
Copy link
Author

For your info, I've added the following line to m4/os.m4:
lldp_DEFINE_OS(hpux*, Hpux, HPUX)

@vincentbernat
Copy link
Member

❦ 2 avril 2014 11:07 CEST, Yannick Charton notifications@github.com :

I've done some changes in src/daemon/priv.c, intruducing HOST_OS_HPUX:

#elif defined HOST_OS_OPENBSD || defined HOST_OS_NETBSD || defined HOST_OS_SOLARIS || defined HOST_OS_HPUX
struct sockaddr *sap = (struct sockaddr *)&ifr.ifr_addr;
#if ! defined HOST_OS_SOLARIS && ! defined HOST_OS_HPUX
sap->sa_len = sizeof(struct sockaddr);
#endif
sap->sa_family = AF_UNSPEC;
must_read(sap->sa_data, ETHER_ADDR_LEN);
#else
#error Unsupported OS

That's the right way.

priv.c: In function 'asroot_gethostbyname':
priv.c:199: warning: implicit declaration of function 'res_init'
priv.c: In function 'priv_init':
priv.c:525: error: 'AF_LOCAL' undeclared (first use in this function)
compilation terminated due to -Wfatal-errors.

Try grep AF_LOCAL /usr/include -r. Maybe we need to include some other

file. Otherwise, just replace AF_LOCAL by AF_UNIX.

Use data arrays to avoid repetitive control sequences.
- The Elements of Programming Style (Kernighan & Plauger)

@djzort
Copy link
Contributor

djzort commented Apr 2, 2014

(you've hit critical mass when people go for HP-UX support)

@Tontonitch
Copy link
Author

I've replaced AF_LOCAL by AF_UNIX in priv.c, the compilation went a step ahead, but some other compilation issues. The err.h header file cannot be found apparently. Is it normally part of the sources?

the root@hpora2-b# make
No suffix list.
        make  all-recursive
No suffix list.
Making all in src/compat
No suffix list.
  CCLD   libcompat.la
Making all in src
No suffix list.
  CCLD   libcommon-daemon-lib.la
  CCLD   libcommon-daemon-client.la
Making all in src/daemon
        make  all-am
No suffix list.
  CC     liblldpd_la-privsep_io.lo
../../../src/daemon/privsep_io.c:48:17: error: err.h: No such file or directory
../../../src/daemon/privsep_io.c: In function 'send_fd':
../../../src/daemon/privsep_io.c:62: error: field 'hdr' has incomplete type
compilation terminated due to -Wfatal-errors.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
root@hpora2-b#

@Tontonitch
Copy link
Author

For your information, availability of the err.h file:
On Centos6.5:

[root@srv lldpd-0.7.7]# find /usr/include -name "err.h"
/usr/include/openssl/err.h
/usr/include/err.h
[root@srv lldpd-0.7.7]# find /usr/include -name "errno.h"
/usr/include/asm/errno.h
/usr/include/sys/errno.h
/usr/include/asm-generic/errno.h
/usr/include/bits/errno.h
/usr/include/errno.h
/usr/include/linux/errno.h
[root@srv lldpd-0.7.7]#

On HPUX11.31

root@hpsrv# find /usr/include -name "err.h"
root@hpsrv# find /usr/include -name "errno.h"
/usr/include/aCC/errno.h
/usr/include/aCC_std/errno.h
/usr/include/errno.h
/usr/include/sys/errno.h
root@hpsrv#

So, no err.h on hpux.

Best regards,
Yannick

@vincentbernat
Copy link
Member

You can remove the #include <err.h>, it is a legacy header that is not needed any more.

@Tontonitch
Copy link
Author

Thank for the info. err.h removed.

So the compilation still stops here:

Making all in src/daemon
        make  all-am
No suffix list.
  CC     liblldpd_la-privsep_io.lo
../../../src/daemon/privsep_io.c: In function 'send_fd':
../../../src/daemon/privsep_io.c:61: error: field 'hdr' has incomplete type
compilation terminated due to -Wfatal-errors.
*** Error exit code 1

I tried some code changes, but my c skills are too light... So I couldn't fix the problem.
If I can test some changes, please ask.
Best regards,
Yannick

@vincentbernat
Copy link
Member

I had the same problem with Solaris. Could you grep in /usr/include for cmsghdr to check that this feature is supported on HP-UX (but I think it is). Do you have cmsg(3) as a manual page? Maybe they would say how to get them. Otherwise, could you add at the top of the file:

#define _XOPEN_SOURCE 1
#define _XOPEN_SOURCE_EXTENDED 1

@Tontonitch
Copy link
Author

Indeed, I would say it is supported:

root@hpora2-b# grep cmsghdr /usr/include/*
root@hpora2-b# grep cmsghdr /usr/include/sys/*
/usr/include/sys/socket.h: * Given a byte length, align it to word boundary, aligned for cmsghdr.
/usr/include/sys/socket.h: * of message elements headed by cmsghdr structures.
/usr/include/sys/socket.h:struct cmsghdr {
/usr/include/sys/socket.h:/* given pointer to struct cmsghdr, return pointer to data */
/usr/include/sys/socket.h:                      _CMSG_ALIGN(sizeof(struct cmsghdr))))
/usr/include/sys/socket.h:/* given pointer to struct msghdr, return pointer to first cmsghdr */
/usr/include/sys/socket.h:      ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ?     \
/usr/include/sys/socket.h:        (struct cmsghdr *)(mhdr)->msg_control :               \
/usr/include/sys/socket.h:/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
/usr/include/sys/socket.h:      (((caddr_t)(cmsg) + ((struct cmsghdr *)(cmsg))->cmsg_len        \
/usr/include/sys/socket.h:                        + (int)sizeof(struct cmsghdr) >               \
/usr/include/sys/socket.h:              (struct cmsghdr *)0 :                                   \
/usr/include/sys/socket.h:              (struct cmsghdr *)((caddr_t)(cmsg) +                    \
/usr/include/sys/socket.h:              _CMSG_ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len))))
/usr/include/sys/socket.h:#define CMSG_SPACE(length)    (_CMSG_ALIGN(sizeof(struct cmsghdr)) + \
/usr/include/sys/socket.h:#define CMSG_LEN(length)      (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (length))
root@hpora2-b#

No manual entry:

root@hpora2-b# man cmsg
No manual entry for cmsg.
root@hpora2-b#

I added the 2 variable definitions, the compilation went further, but returned finally the following errors:

[...]
  CCLD   liblldpd.la
copying selected object files to avoid basename conflicts...
  CC     main.o
  CCLD   lldpd
ld: Unsatisfied symbol "dmi_model" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "interfaces_routing_enabled" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "vasprintf" in file ./.libs/liblldpd.a[log.o]
ld: Unsatisfied symbol "vsyslog" in file ./.libs/liblldpd.a[log.o]
ld: Unsatisfied symbol "dmi_asset" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "asprintf" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "interfaces_update" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "asroot_iface_init_os" in file ./.libs/liblldpd.a[liblldpd_la-priv.o]
ld: Unsatisfied symbol "asroot_iface_description_os" in file ./.libs/liblldpd.a[liblldpd_la-priv.o]
ld: Unsatisfied symbol "dmi_manuf" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "daemon" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "dmi_fw" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "dmi_hw" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
ld: Unsatisfied symbol "dmi_sn" in file ./.libs/liblldpd.a[liblldpd_la-lldpd.o]
14 errors.
collect2: ld returned 1 exit status
*** Error exit code 1

Best regards,
Yannick
PS: I will be unavailable until next monday

@vincentbernat
Copy link
Member

OK, now comes the hard part. :)

You need to modify src/daemon/Makefile.am. Look at the block HOST_OS_NETBSD. I think this is the one that has a better chance to work for you. Duplicate it for HPUX and let's what works. You need to run ./autogen.sh again.

For other problems:

  • missing asprintf() and vasprintf(), there is a fix for that in the git HEAD
  • missing vsyslog(), well I don't know how to build this from syslog(), let me think about it
  • missing daemon(), I will reimplement it

@vincentbernat
Copy link
Member

Never mind for vsyslog(), this is easy to build it from vasprintf().

@vincentbernat
Copy link
Member

The "other" problems should be fixed in git HEAD.

@Tontonitch
Copy link
Author

Hi Vincent,
I took the last git master HEAD, commit 984bbcb.
Adapted the sources with your previous directives, when needed, to add HP-UX.
Hereunder is the results of configure and make all. Hope that may help to do further with the new release and hp-ux support.

root@hpora2-b# mkdir build
root@hpora2-b#
root@hpora2-b# cd build/
root@hpora2-b#
root@hpora2-b# ../configure
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 to enable maintainer-specific portions of Makefiles... no
../configure[3368]: AM_PROG_AR:  not found.
checking build system type... ia64-hp-hpux11.31
checking host system type... ia64-hp-hpux11.31
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
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 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]|EL                                                                             F-[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 gcc object... ok
checking how to run the C preprocessor... 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 gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... y                                                                             es
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 gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... hpux11.31 dld.so
checking how to hardcode library paths into programs... immediate
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for egrep... (cached) /usr/bin/grep -E
checking for gawk... (cached) awk
checking for doxygen... no
configure: WARNING: doxygen not found - will not generate any doxygen documentation
checking for perl... /usr/bin/perl
checking CFLAGS for gcc -fdiagnostics-show-option... -fdiagnostics-show-option
checking CFLAGS for gcc -pipe... -pipe
checking CFLAGS for gcc -Wall... -Wall
checking CFLAGS for gcc -W... -W
checking CFLAGS for gcc -Wextra... -Wextra
checking CFLAGS for gcc -Wformat... -Wformat
checking CFLAGS for gcc -Wformat-security... -Wformat-security
checking CFLAGS for gcc -Wfatal-errors... -Wfatal-errors
checking CFLAGS for gcc -Wcast-align... -Wcast-align
checking CFLAGS for gcc -Winline... -Winline
checking CFLAGS for gcc -fstack-protector... no, obsolete
checking CFLAGS for gcc -fno-omit-frame-pointer... -fno-omit-frame-pointer
checking CFLAGS for gcc -D_FORTIFY_SOURCE=2... -D_FORTIFY_SOURCE=2
checking CFLAGS for gcc -Wno-unused-parameter... -Wno-unused-parameter
checking CFLAGS for gcc -Wno-missing-field-initializers... -Wno-missing-field-initializers
checking CFLAGS for gcc -Wno-sign-compare... -Wno-sign-compare
checking whether the linker accepts the -Wl,-z,relro flag... no
checking whether the linker accepts the -Wl,-z,now flag... no
checking if host OS is supported... yes (Hpux)
checking CFLAGS for gcc -D_GNU_SOURCE... -D_GNU_SOURCE
checking CFLAGS for gcc -D__EXTENSIONS__... -D__EXTENSIONS__
checking CFLAGS for gcc -D_XPG4_2... -D_XPG4_2
checking CFLAGS for gcc -D_XOPEN_SOURCE=500... -D_XOPEN_SOURCE=500
checking CFLAGS for gcc -D_XOPEN_SOURCE_EXTENDED... -D_XOPEN_SOURCE_EXTENDED
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking valgrind/valgrind.h usability... no
checking valgrind/valgrind.h presence... no
checking for valgrind/valgrind.h... no
checking for u_int32_t... no
checking for uint32_t... yes
checking whether libc defines __progname... no
checking whether compiler understands __alignof__... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... no
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for library containing setproctitle... no
checking for setproctitle... no
checking for setproctitle_init... no
checking for strlcpy... no
checking for strnlen... no
checking for strndup... no
checking for fgetln... no
checking for asprintf... no
checking for vsyslog... no
checking for daemon... no
checking for setresuid... yes
checking for setresgid... yes
checking for library containing res_init... none required
checking for pkg-config... no
checking for CHECK... checking for LIBEVENT... configure: using shipped libevent
checking for a readline compatible library... no
../configure[21609]: --variable=systemdsystemunitdir:  not found.
../configure[21613]: --variable=systemdsystemunitdir:  not found.
../configure[21615]: --variable=systemdsystemunitdir:  not found.
checking whether to enable systemtap/DTrace trace support... no
checking whether to enable Privilege separation... yes
checking whether to enable Cisco Discovery Protocol... yes
checking whether to enable Foundry Discovery Protocol... yes
checking whether to enable Extreme Discovery Protocol... yes
checking whether to enable SynOptics Network Management Protocol... yes
checking whether to enable LLDP-MED extension... yes
checking whether to enable Dot1 extension (VLAN stuff)... yes
checking whether to enable Dot3 extension (PHY stuff)... yes
checking whether to enable compatibility with Linux kernel older than 2.6.18... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/compat/Makefile
config.status: creating src/daemon/Makefile
config.status: creating src/lib/Makefile
config.status: creating src/lib/lldpctl.pc
config.status: creating src/client/Makefile
config.status: creating tests/Makefile
config.status: creating osx/Makefile
config.status: creating osx/distribution.xml
config.status: creating osx/im.bernat.lldpd.plist
config.status: creating osx/scripts/preinstall
config.status: creating osx/scripts/postinstall
config.status: creating src/daemon/lldpd.service
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in libevent (/var/tmp/lldpd-master/build/libevent)
configure: WARNING: no configuration information is in libevent

------------------ Summary ------------------
 lldpd version 2014-04-09
  OS.............: Hpux
  Prefix.........: /usr/local
  C Compiler.....: gcc -std=gnu99 -g -O2 -fdiagnostics-show-option -pipe -Wall -W -Wextra -Wformat -Wformat-security -Wfatal-errors -Wcast-align -Winline -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare -D_GNU_SOURCE -D__EXTENSIONS__ -D_XPG4_2 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED
  Linker.........: /usr/ccs/bin/ld
  Libevent.......: embedded
  Readline.......: no
 Optional features:
  SNMP support...: no
  CDP............: yes
  FDP............: yes
  EDP............: yes
  SONMP..........: yes
  LLDPMED........: yes
  DOT1...........: yes
  DOT3...........: yes
  XML output.....: no
  JSON output....: no
  Oldies support.: no
  seccomp........: no
 Privilege separation:
  Enabled........: yes
  User/group.....: _lldpd/_lldpd
  Chroot.........: /var/run/lldpd
---------------------------------------------

Check the above options and compile with:
 make

root@hpora2-b#
root@hpora2-b# make all
No suffix list.
        make  all-recursive
No suffix list.
Making all in src/compat
  CC     empty.lo
  CC     realloc.lo
  CC     setproctitle.lo
  CC     strlcpy.lo
  CC     strnlen.lo
  CC     strndup.lo
  CC     fgetln.lo
  CC     asprintf.lo
../../../src/compat/asprintf.c: In function 'asprintf':
../../../src/compat/asprintf.c:79: warning: implicit declaration of function '_vasprintf'
  CC     vsyslog.lo
In file included from ../../../src/compat/vsyslog.c:5:
../../../src/compat/compat.h:49: error: expected declaration specifiers or '...' before 'va_list'
compilation terminated due to -Wfatal-errors.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
root@hpora2-b#

BR,
Yannick

@vincentbernat
Copy link
Member

For the first error, it is a late change that I didn't test. The second one should also be solved by including a missing header (stdarg.h). Please try again.

However, keep in mind that's the "easy" part. The remaining part (network stuff) will be far harder except if HP-UX behaves exactly like one of the existing BSD. A (non-root) shell would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants