[Oisf-devel] problem with build / configure.ac on OpenBSD 5.9 -current

Markus Lude markus.lude at gmx.de
Sun Apr 17 15:33:50 UTC 2016


today I tried to build a package for suricata 3.0.1 on OpenBSD 5.9

build stopped with:

Making all in test
Making all in docs
Making all in src
make  all-am
cc -DHAVE_CONFIG_H -I. -I/usr/obj/ports/suricata-3.0.1/suricata-3.0.1/src -I..    -I/usr/obj/ports/suricata-3.0.1/suricata-3.0.1/../libhtp/  -I/usr/local/include -I/usr/local/include/libnet-1.1 -I/usr/local/include/libnet-1.1 -I/usr/local/include/nspr  -Wextra -Werror-implicit-function-declaration -fno-tree-pre     -Wall -Wno-unused-parameter  -std=gnu99 -DLOCAL_STATE_DIR=\"/var\"  -ggdb -O0 -O2 -pipe -D__OpenBSD__ -MT alert-debuglog.o -MD -MP -MF .deps/alert-debuglog.Tpo -c -o alert-debuglog.o /usr/obj/ports/suricata-3.0.1/suricata-3.0.1/src/alert-debuglog.c
In file included from /usr/obj/ports/suricata-3.0.1/suricata-3.0.1/src/alert-debuglog.c:24:
/usr/obj/ports/suricata-3.0.1/suricata-3.0.1/src/suricata-common.h:336:21: error: htp/htp.h: No such file or directory


   336  #include <htp/htp.h>
   337  #include "threads.h"

the following search path for includes above seems wrong:

it should be
instead, which exists.

Finally I stumbled upon this from configure.ac:

  1232      if test "x$enable_non_bundled_htp" = "xno"; then
  1233          # test if we have a bundled htp
  1234          if test -d "$srcdir/libhtp"; then
  1235              AC_CONFIG_SUBDIRS([libhtp])
  1236              HTP_DIR="libhtp"
  1237              AC_SUBST(HTP_DIR)
  1238              HTP_LDADD="../libhtp/htp/libhtp.la"
  1239              AC_SUBST(HTP_LDADD)
  1240              # make sure libhtp is added to the includes
  1241              CPPFLAGS="-I${srcdir}/../libhtp/ ${CPPFLAGS}"

why is the test for this block for $srcdir/libhtp and the include
search path added to CPPFLAGS is ${srcdir}/../libhtp/ ?

With the following diff the build doesn't stop there:

--- configure.ac.orig   Mon Apr  4 12:16:09 2016
+++ configure.ac        Sun Apr 17 16:53:52 2016
@@ -1238,7 +1238,7 @@
             # make sure libhtp is added to the includes
-            CPPFLAGS="-I${srcdir}/../libhtp/ ${CPPFLAGS}"
+            CPPFLAGS="-I${srcdir}/libhtp/ ${CPPFLAGS}"
             AC_CHECK_HEADER(iconv.h,,[AC_ERROR(iconv.h not found ...)])
             AC_CHECK_LIB(iconv, libiconv_close)

Side note:

if I try to build it without using ports framework strangely it seems to
work too:

Making all in test
Making all in docs
Making all in src
make  all-am
  CC       alert-debuglog.o
  CC       alert-fastlog.o
  CC       alert-prelude.o

unfortunately the real command is not shown then.
Looking in config.log srcdir there is set to ".".

Then the above ${srcdir}/../libhtp/ point to the correct directory, too.
Here with a relative path.

So the problem exists with absolut paths in srcdir

I used autoconf 2.61 and automake 1.14 for both ways.


More information about the Oisf-devel mailing list