varnish / libvmod-digest

Digest and HMAC vmod
Other
50 stars 27 forks source link

Build is failing on FreeBSD #10

Closed michbsd closed 8 years ago

michbsd commented 8 years ago

HI,

4.1 branch build is failing on FreeBSD 10.1-REL

cd . && /bin/sh /root/work/varnish-vmods/libvmod-digest/missing automake-1.15 --foreign /bin/sh ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands /usr/local/share/varnish/vmodtool.py ../src/vmod_digest.vcc /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_digest.lo -MD -MP -MF .deps/vmod_digest.Tpo -c -o vmod_digest.lo vmod_digest.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_digest.lo -MD -MP -MF .deps/vmod_digest.Tpo -c vmod_digest.c -fPIC -DPIC -o .libs/vmod_digest.o vmod_digest.c:42:10: fatal error: 'mhash.h' file not found

include

     ^

1 error generated. *\ Error code 1

Stop. make[2]: stopped in /root/work/varnish-vmods/libvmod-digest/src

However mhash.h is present: ❯ la /usr/local/include/mhash.h [4:41:14 PM] -rw-r--r-- 1 root wheel 223B Nov 5 16:30 /usr/local/include/mhash.h

And I added includedir /usr/local/include to the configure command

Any ideas?

fgsch commented 8 years ago

Can you supply the config.log for when you passed /usr/local/include in the command line?

michbsd commented 8 years ago

Indeed. Please find attached. https://dl.dropboxusercontent.com/u/42812/config-log.txt

fgsch commented 8 years ago

Try invoking configure as:

env LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure

And do not set includedir.

michbsd commented 8 years ago

That seems to fix that build error.. Now I get another:

cd . && /bin/sh /root/work/varnish-vmods/libvmod-digest/missing automake-1.15 --foreign /bin/sh ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands /usr/local/share/varnish/vmodtool.py ../src/vmod_digest.vcc /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -I/usr/local/include -g -O2 -MT vmod_digest.lo -MD -MP -MF .deps/vmod_digest.Tpo -c -o vmod_digest.lo vmod_digest.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -I/usr/local/include -g -O2 -MT vmod_digest.lo -MD -MP -MF .deps/vmod_digest.Tpo -c vmod_digest.c -fPIC -DPIC -o .libs/vmod_digest.o In file included from vmod_digest.c:51: ../config.h:50:9: error: 'PACKAGE' macro redefined [-Werror]

define PACKAGE "libvmod-digest"

    ^

/usr/local/include/mutils/mhash_config.h:186:9: note: previous definition is here

define PACKAGE "mhash"

    ^

In file included from vmod_digest.c:51: ../config.h:53:9: error: 'PACKAGE_BUGREPORT' macro redefined [-Werror]

define PACKAGE_BUGREPORT ""

    ^

/usr/local/include/mutils/mhash_config.h:189:9: note: previous definition is here

define PACKAGE_BUGREPORT "mhash-devel@sourceforge.net"

    ^

In file included from vmod_digest.c:51: ../config.h:56:9: error: 'PACKAGE_NAME' macro redefined [-Werror]

define PACKAGE_NAME "libvmod-digest"

    ^

/usr/local/include/mutils/mhash_config.h:192:9: note: previous definition is here

define PACKAGE_NAME "MHASH"

    ^

In file included from vmod_digest.c:51: ../config.h:59:9: error: 'PACKAGE_STRING' macro redefined [-Werror]

define PACKAGE_STRING "libvmod-digest trunk"

    ^

/usr/local/include/mutils/mhash_config.h:195:9: note: previous definition is here

define PACKAGE_STRING "MHASH 0.9.9"

    ^

In file included from vmod_digest.c:51: ../config.h:62:9: error: 'PACKAGE_TARNAME' macro redefined [-Werror]

define PACKAGE_TARNAME "libvmod-digest"

    ^

/usr/local/include/mutils/mhash_config.h:198:9: note: previous definition is here

define PACKAGE_TARNAME "mhash"

    ^

In file included from vmod_digest.c:51: ../config.h:68:9: error: 'PACKAGE_VERSION' macro redefined [-Werror]

define PACKAGE_VERSION "trunk"

    ^

/usr/local/include/mutils/mhash_config.h:201:9: note: previous definition is here

define PACKAGE_VERSION "0.9.9"

    ^

In file included from vmod_digest.c:51: ../config.h:96:9: error: 'VERSION' macro redefined [-Werror]

define VERSION "trunk"

    ^

/usr/local/include/mutils/mhash_config.h:213:9: note: previous definition is here

define VERSION "0.9.9"

    ^

7 errors generated.

rezan commented 8 years ago

mhash shouldn't be including those variables as a library. mhash as distributed on Debian and RHEL have those variables removed. I found this patch in a src RPM:

diff -up mhash-0.9.9.9/configure.in.fix-autotool-stomping mhash-0.9.9.9/configure.in
--- mhash-0.9.9.9/configure.in.fix-autotool-stomping    2007-04-04 22:22:28.000000000 -0400
+++ mhash-0.9.9.9/configure.in  2009-07-02 17:02:39.099044520 -0400
@@ -6,6 +6,7 @@ AC_CONFIG_SRCDIR([lib/mhash.c])
 AM_INIT_AUTOMAKE

 AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version")
+AC_CONFIG_HEADER([include/mutils/config.h])
 AC_CONFIG_HEADER([include/mutils/mhash_config.h])

diff -up /dev/null mhash-0.9.9.9/include/mutils/config.h.in
--- /dev/null   2009-07-01 18:40:45.228272777 -0400
+++ mhash-0.9.9.9/include/mutils/config.h.in    2009-07-02 17:02:39.100044508 -0400
@@ -0,0 +1,22 @@
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Version number of package */
+#undef VERSION
+
+
diff -up mhash-0.9.9.9/include/mutils/mhash_config.h.in.fix-autotool-stomping mhash-0.9.9.9/include/mutils/mhash_config.h.in
--- mhash-0.9.9.9/include/mutils/mhash_config.h.in.fix-autotool-stomping    2008-12-07 18:33:50.000000000 -0500
+++ mhash-0.9.9.9/include/mutils/mhash_config.h.in  2009-07-02 17:04:30.453049610 -0400
@@ -181,24 +181,6 @@
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 #undef NO_MINUS_C_MINUS_O

-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
 /* Define to 1 if the C compiler supports function prototypes. */
 #undef PROTOTYPES

@@ -208,9 +190,6 @@
 /* dmalloc */
 #undef USE_DMALLOC

-/* Version number of package */
-#undef VERSION
-
 /* Define if using the dmalloc debugging malloc package */
 #undef WITH_DMALLOC
fgsch commented 8 years ago

Duplicate of #9

fgsch commented 8 years ago

I will commit a fix shortly

fgsch commented 8 years ago

Sorry for the delay. It should be fixed now. If you still ran into any issues please raise a new bug. Thanks!