Can't start varnish, missing cc dependency or something
-
I hope this is the right place to post my problem.
I have installed pfSense 2.1 (64 bit) on a standard stand alone pc box. Here is my version info:
2.1-RELEASE (amd64) built on Wed Sep 11 18:17:48 EDT 2013 FreeBSD 8.3-RELEASE-p11
Everything seems to be working fine, so I'm trying to setup reverse accelerator to handle multiple host, using varnish package. I have my configuration done and when I try to start varnish (manually from command to see the output I get this) :
$ /usr/local/etc/rc.d/varnish.sh start kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 -> 16384 kern.maxfiles: 131072 -> 131072 kern.maxfilesperproc: 104856 -> 104856 kern.threads.max_threads_per_proc: 4096 -> 4096 mkdir -p /var/varnish rm /var/varnish/storage.bin 2>/dev/null killall varnishd 2>/dev/null sleep 1 sysctl kern.ipc.nmbclusters=65536 sysctl kern.ipc.somaxconn=16384 sysctl kern.maxfiles=131072 sysctl kern.maxfilesperproc=104856 sysctl kern.threads.max_threads_per_proc=4096 /usr/bin/env \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ /usr/local/bin/php -q -d auto_prepend_file=config.inc <<endoff<br>ENDOFF /usr/local/sbin/varnishd \ -a :80 \ -f /var/etc/default.vcl \ -s malloc,512MB \ -w 200,4000,50 \ -T 127.0.0.1:85 nm: not found storage_malloc: max size 512 MB. Message from C-compiler: exec: cc: not found Running C-compiler failed, exit 2 VCL compilation failed</endoff<br>
Can anyone give me some hints on why this is happening and what to do about it?
I googled "varnish pfSense exec: cc: not found" and have a link with what seems to be the same problem in Portuguese forum:
http://forum.pfsense.org/index.php?topic=67564.0 -
can you check if you have cc on your filesystem?
gcc is a dependence for varnish but on install script its on a another pbi.
-
I'm not sure how to check this, here is my try from SSH:
[2.1-RELEASE][admin@pfsense.yu-spin.local]/(23): find / -name cc [2.1-RELEASE][admin@pfsense.yu-spin.local]/(24): find / -name gcc /usr/local/libexec/gcc42/gcc /usr/local/lib/gcc42/gcc /usr/pbi/gcc-amd64/lib/gcc42/gcc /usr/pbi/gcc-amd64/libexec/gcc42/gcc [2.1-RELEASE][admin@pfsense.yu-spin.local]/(25):
gcc is a dependence for varnish but on install script its on a another pbi.
Regarding this, should I try to reinstall the package?
-
I tried to reinstall the package, same resoult. Tried to uninstall and install vanish3 package, same result. :(
Seems like GCC is downloaded during the package installation… but cc symlink is probably never created.
Here is a snapshot of status output during the vanish3 package installation:
Beginning package installation for Varnish3 .
Downloading package configuration file… done.
Saving updated package information... done.
Downloading Varnish3 and its dependencies...
Checking for package installation...
Downloading http://files.pfsense.org/packages/amd64/8/All/gcc-4.2.5.20090325_5-amd64.pbi ... (extracting)Downloading http://files.pfsense.org/packages/amd64/8/All/varnish-3.0.3_2-amd64.pbi ... (extracting)
Thank you for your help.
-
Tried to make a symlink to /usr/bin/cc, from the gcc executable I found, but to no avail, now something else is missing: as
ln -s /usr/pbi/gcc-amd64/bin/gcc42 /usr/bin/cc
Result output from vanish3 startup:
$ /usr/local/etc/rc.d/varnish.sh start kern.ipc.nmbclusters: 65536 sysctl: kern.ipc.nmbclusters: Invalid argument kern.ipc.somaxconn: 16384 -> 16384 kern.maxfiles: 131072 -> 131072 kern.maxfilesperproc: 104856 -> 104856 kern.threads.max_threads_per_proc: 4096 -> 4096 mkdir -p /var/varnish rm /var/varnish/storage.bin 2>/dev/null killall varnishd 2>/dev/null sleep 1 sysctl kern.ipc.nmbclusters=65536 sysctl kern.ipc.somaxconn=16384 sysctl kern.maxfiles=131072 sysctl kern.maxfilesperproc=104856 sysctl kern.threads.max_threads_per_proc=4096 /usr/bin/env \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ /usr/local/bin/php -q -d auto_prepend_file=config.inc <<endoff<br>ENDOFF /usr/local/sbin/varnishd \ -a :80 \ -f /var/etc/default.vcl \ -s malloc,512MB \ -w 200,4000,50 \ -T 127.0.0.1:85 nm: not found Message from C-compiler: cc: error trying to exec 'as': execvp: No such file or directory ./vcl.VSU2hoj5.c:1737: fatal error: error writing to -: Broken pipe compilation terminated. Running C-compiler failed, exit 1 VCL compilation failed</endoff<br>
-
I tried to manually install package from http://files.pfsense.org/packages/amd64/8/All/gcc-4.2.5.20090325_5-amd64.pbi with pbi_add, but it dod not fix the missing cc problem :(
Is there maybe another version of this package that might work?
I tested another installation on pfSense on VM that is a 32bit and seems that it is suffering from the same problem. The vanish gives the missing cc error, and the cc symlink is not created on the system. Is it possible that I only have this error? Nobody uses vanish with latest relase of pfSense on x86 or x64?
Thanks,
Z. -
I'll change compile options and ask another package compilation.
-
Thank you marcelloc, please let me know when it is ready so I can test again.
Best Regards,
Z. -
I'm also getting this bug.
Also can you add..
- a way to edit 'vcl_hash'
- a 'null' option to 'Forward client IP' (I want to set this through HAProxy which sits in front of Varnish)
- a way to add acl's
Thanks! If I have some time this week I'll see if I can hack these changes in myself.
-
Compile args were changed on package info. Let's wait next package compile run to see if it works.
-
Hiya, I am having the same issue. Does anyone know when the next package compile will run pls?
Cheers,
Raj
-
Still waiting. ..
-
I have the same problem. Nothing from the webgui changed anything. (Services -> Varnish -> Enable Varnish etc.)
So I logged in and also had to```
ln -s /usr/pbi/gcc-i386/bin/gcc42 /usr/bin/ccand so when I try to start it manually I get this:
[2.1-RELEASE][admin@skynet.starbase.org]/root(57): varnishd -f /etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080
nm: not found
storage_malloc: max size 1024 MB.
Message from C-compiler:
cc: error trying to exec 'as': execvp: No such file or directory
Running C-compiler failed, exit 1
VCL compilation failedHelp would be much appreciated. :) / Rocketdog using **2.1-RELEASE (i386)**
-
The new pbi was compiled by jimp but it still return error.
I'm looking for a way to include cc on this pbi.
-
We fixed this by manually installing the missing packages.
cc is part of gcc
as is part of binutilsFetch and transfer the following to /tmp (with i.e. WinSCP on Windows. *nix users should know what to do :) ):
http://files.pfsense.org/packages/amd64/8/All/gcc-4.2.5.20090325_5-amd64.pbi
http://files.pfsense.org/packages/amd64/8/All/binutils-2.21.1.tbzThen do the following via ssh:
pbi_add -f –no-checksig /tmp/gcc-4.2.5.20090325_5-amd64.pbi
pkg_add /tmp/binutils-2.21.1.tbz
ln -s /usr/pbi/gcc-amd64/bin/gcc42 /usr/local/bin/ccOptionally install the latest Varnish3 package.
fetch and transfer http://files.pfsense.org/packages/amd64/8/All/varnish-3.0.4-amd64.pbissh:
pbi_add -f --no-checksig /tmp/varnish-3.0.4-amd64.pbi -
Thanks for the feedback,
I've pushed a fix for the package and seems that only missing thing was a ln -s from gcc to cc.