varnish / libvmod-rtstatus

Varnish realtime status page.
Other
37 stars 16 forks source link

Not compiling on FreeBSD #9

Closed michbsd closed 9 years ago

michbsd commented 9 years ago

FreeBSD 10.1 REL Varnish 4.1 installed from ports

❯ ./autogen.sh [6:25:22 PM]

❯ make [6:26:58 PM](CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /root/work/varnish-vmods/libvmod-rtstatus/missing autoheader) rm -f stamp-h1 touch ./config.h.in cd . && /bin/sh ./config.status config.h config.status: creating config.h config.status: config.h is unchanged make all-recursive Making all in src /usr/local/share/varnish/vmodtool.py ../src/vmod_rtstatus.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_rtstatus.lo -MD -MP -MF .deps/vmod_rtstatus.Tpo -c -o vmod_rtstatus.lo vmod_rtstatus.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_rtstatus.lo -MD -MP -MF .deps/vmod_rtstatus.Tpo -c vmod_rtstatus.c -fPIC -DPIC -o .libs/vmod_rtstatus.o libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_rtstatus.lo -MD -MP -MF .deps/vmod_rtstatus.Tpo -c vmod_rtstatus.c -o vmod_rtstatus.o >/dev/null 2>&1 mv -f .deps/vmod_rtstatus.Tpo .deps/vmod_rtstatus.Plo /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_rtstatus_cache.lo -MD -MP -MF .deps/vmod_rtstatus_cache.Tpo -c -o vmod_rtstatus_cache.lo vmod_rtstatus_cache.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_rtstatus_cache.lo -MD -MP -MF .deps/vmod_rtstatus_cache.Tpo -c vmod_rtstatus_cache.c -fPIC -DPIC -o .libs/vmod_rtstatus_cache.o libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_rtstatus_cache.lo -MD -MP -MF .deps/vmod_rtstatus_cache.Tpo -c vmod_rtstatus_cache.c -o vmod_rtstatus_cache.o >/dev/null 2>&1 mv -f .deps/vmod_rtstatus_cache.Tpo .deps/vmod_rtstatus_cache.Plo /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_html.lo -MD -MP -MF .deps/vmod_html.Tpo -c -o vmod_html.lo test -f 'HTML/vmod_html.c' || echo './'HTML/vmod_html.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_html.lo -MD -MP -MF .deps/vmod_html.Tpo -c HTML/vmod_html.c -fPIC -DPIC -o .libs/vmod_html.o libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vmod_html.lo -MD -MP -MF .deps/vmod_html.Tpo -c HTML/vmod_html.c -o vmod_html.o >/dev/null 2>&1 mv -f .deps/vmod_html.Tpo .deps/vmod_html.Plo /bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c -o vcc_if.lo vcc_if.c libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c -fPIC -DPIC -o .libs/vcc_if.o libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/varnish -Wall -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c -o vcc_if.o >/dev/null 2>&1 mv -f .deps/vcc_if.Tpo .deps/vcc_if.Plo /bin/sh ../libtool --tag=CC --mode=link cc -g -O2 -module -export-dynamic -avoid-version -shared -o libvmod_rtstatus.la -rpath /usr/local/lib/varnish/vmods vmod_rtstatus.lo vmod_rtstatus_cache.lo vmod_html.lo vcc_if.lo -lvarnishapi libtool: link: cc -shared -fPIC -DPIC .libs/vmod_rtstatus.o .libs/vmod_rtstatus_cache.o .libs/vmod_html.o .libs/vcc_if.o -lvarnishapi -g -O2 -Wl,-soname -Wl,libvmod_rtstatus.so -o .libs/libvmod_rtstatus.so /usr/bin/ld: cannot find -lvarnishapi cc: error: linker command failed with exit code 1 (use -v to see invocation) *\ Error code 1

Stop. make[2]: stopped in /root/work/varnish-vmods/libvmod-rtstatus/src *\ Error code 1

fgsch commented 9 years ago

This is caused because the FreeBSD port installs varnish under /usr/local and the VMOD expects it under the default compiler (linker) locations, i.e. /usr/lib instead of /usr/local/lib.

Adding LDFLAGS="-L/usr/local/lib" to configure environment might fix it.

michbsd commented 9 years ago

fixed ;-)