Closed michbsd closed 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.
fixed ;-)
FreeBSD 10.1 REL Varnish 4.1 installed from ports
❯ ./autogen.sh [6:25:22 PM]
autoconf
❯ ./configure [6:26:14 PM] checking build system type... amd64-unknown-freebsd10.1 checking host system type... amd64-unknown-freebsd10.1 checking target system type... amd64-unknown-freebsd10.1 checking for a BSD-compatible install... /usr/bin/install -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... nawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... no checking for cc... cc 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 cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking whether cc understands -c and -o together... yes checking dependency style of cc... gcc3 checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -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 minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define EXTENSIONS... yes checking whether we are using the GNU C compiler... (cached) yes checking whether cc accepts -g... (cached) yes checking for cc option to accept ISO C89... (cached) none needed checking whether cc understands -c and -o together... (cached) yes checking dependency style of cc... (cached) gcc3 checking for cc option to accept ISO C99... none needed checking for cc option to accept ISO Standard C... (cached) none needed checking how to run the C preprocessor... cc -E checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert amd64-unknown-freebsd10.1 file names to amd64-unknown-freebsd10.1 format... func_convert_file_noop checking how to convert amd64-unknown-freebsd10.1 file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from cc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... yes checking for cc option to produce PIC... -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... freebsd10.1 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether make sets $(MAKE)... (cached) yes checking for rst2man... rst2man checking for ANSI C header files... (cached) yes checking sys/stdlib.h usability... no checking sys/stdlib.h presence... no checking for sys/stdlib.h... no checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for libvarnishapi... yes checking vsha256.h usability... yes checking vsha256.h presence... yes checking for vsha256.h... yes checking cache/cache.h usability... yes checking cache/cache.h presence... yes checking for cache/cache.h... yes checking for python3... no checking for python3.1... no checking for python3.2... no checking for python2.7... python2.7 checking for varnishtest... /usr/local/bin/varnishtest checking for varnishd... /usr/local/sbin/varnishd checking that generated files are newer than configure... done configure: creating ./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
❯ 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 1Stop. make[2]: stopped in /root/work/varnish-vmods/libvmod-rtstatus/src *\ Error code 1