Installation

在 SUSE 10.3 下無法編譯 Varnish 2.1

  • November 18, 2013

我剛剛從 git-repository 複製了最新的 varnish 2.1。網站上列出的所有依賴項都已安裝。我執行以下命令:

./autogen.sh -> works fine
./configure -> works fine too

make -> fails 

出現以下錯誤:

make[2]: Entering directory `/tmp/Varnish-Cache-2.1/bin/varnishd'
if gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include   -
DVARNISH_STATE_DIR='"/usr/local/var/varnish"' -g -O2 -MT varnishd-instance.o -MD -MP -
MF ".deps/varnishd-instance.Tpo" -c -o varnishd-instance.o `test -f 'instance.c' ||  
echo './'`instance.c; \
then mv -f ".deps/varnishd-instance.Tpo" ".deps/varnishd-instance.Po"; else rm -f     
".deps/varnishd-instance.Tpo"; exit 1; fi

instance.c:1: error: expected identifier or ‘(’ before ‘.’ token
instance.c:1:35: warning: no newline at end of file
make[2]: *** [varnishd-instance.o] Error 1
make[2]: Leaving directory `/tmp/Varnish-Cache-2.1/bin/varnishd'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/Varnish-Cache-2.1/bin'
make: *** [install-recursive] Error 1

我在相當老的 SUSE 10.3 上建構它;不要問為什麼。有任何想法嗎?

目前我不明白我做了什麼,但在替換內容後它可以工作

bin/varnishd/instance.c

(它只包含 lib/libvarnishapi/instance.c 的路徑,沒有任何包含)

根據內容

lib/libvarnishapi/instance.c

之後,make成功完成

引用自:https://serverfault.com/questions/555285