Search This Blog

Thursday, December 22, 2011

Solving GCC Kernel error: ***mixed implicit and normal rules

I'm using an old kernel because is the last stable to use with the VServer patch.

evo src # ll
total 154344
lrwxrwxrwx  1 root root       15 Dec 22 20:07 linux -> linux-2.6.22.19
drwxrwxr-x 20 root root      840 Dec 22 20:07 linux-2.6.22.19
-rw-r--r--  1 root root 45108030 Nov 18  2009 linux-2.6.22.19.tar.bz2
-rw-r--r--  1 root root  1868800 Mar 17  2008 patch-2.6.22.19-vs2.2.0.7-grsec2.1.11-20080317.diff
evo linux # make
Makefile:1443: *** mixed implicit and normal rules.  Stop.
evo linux # make oldconfig
Makefile:1443: *** mixed implicit and normal rules.  Stop.
evo linux # vi Makefile 
.....
/ %/: prepare scripts FORCE
       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
       $(build)=$(build-dir)
.....

Solution: here we have an implicit rule and an explicit rule in the same line, so we are going to split that rules.

# Modules #/ %/: prepare scripts FORCE # $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ # $(build)=$(build-dir) /: prepare scripts FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %/: prepare scripts FORCE $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir)

Wednesday, December 21, 2011

HowTo Clean and Re-build Squid cache

First, check your squid.conf file and locate the location of your cache directory, you should have a line starting with "cache_dir"

  1. Shutdown your squid server: squid -k shutdown
  2. Remove the cache directory: rm -r /squid/cache/*
  3. Re-Create the squid cache directory: squid -z
  4. Start the squid cache server
Thanks for reading.

Monday, December 12, 2011

IcePHP-3.2.1 Gentoo ebuild

The Internet Communications Engine, or Ice, is an object-oriented middleware that provides object-oriented Remote Procedure Call, grid computing and Publish/subscribe functionality developed by ZeroC and dual-licensed under the GNU GPL and a proprietary license. It supports C++, Java, . NET languages (such as C# or Visual Basic), Objective-C, Python, PHP, and Ruby on most major operating systems such as Linux, Solaris, Windows, and Mac OS X. A light variant of ICE runtime, called Ice-e, may run inside mobile phones. As its name indicates, the middleware may be used for internet applications without the need to use the HTTP protocol and is capable of traversing firewalls, unlike most other middleware.

Official Site: ICE
Wikipedia info: Wikipedia ICE info.


DEPRECATED HOW TO, CLICK HERE FOR THE CURRENT INFO.

Preparing the portage tree, more info HERE:

evo ~ # mkdir -p /usr/local/portage/profiles/ evo ~ # echo "Headup Overlay" > /usr/local/portage/profiles/repo_name evo ~ # mkdir -p /usr/local/portage/dev-php5/IcePHP/ evo ~ # echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf evo ~ # cd /usr/local/portage/dev-php5/IcePHP/ evo IcePHP # wget http://headup.sytes.net/zbox/HeadupOverlay/dev-php5/IcePHP/IcePHP-3.2.1.ebuild evo IcePHP # ebuild IcePHP-3.2.1 manifest >>> Downloading 'http://www.zeroc.com/download/Ice/3.2/IcePHP-3.2.1.tar.gz' --2011-12-12 12:26:21-- http://www.zeroc.com/download/Ice/3.2/IcePHP-3.2.1.tar.gz Resolving www.zeroc.com (www.zeroc.com)... 184.73.227.248 Connecting to www.zeroc.com (www.zeroc.com)|184.73.227.248|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://download.zeroc.com/Ice/3.2/IcePHP-3.2.1.tar.gz [following] --2011-12-12 12:26:21-- http://download.zeroc.com/Ice/3.2/IcePHP-3.2.1.tar.gz Resolving download.zeroc.com (download.zeroc.com)... 216.137.43.110, 216.137.43.163, 216.137.43.119, ... Connecting to download.zeroc.com (download.zeroc.com)|216.137.43.110|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 78072 (76K) [application/x-tar] Saving to: `/usr/portage/distfiles/IcePHP-3.2.1.tar.gz' 100%[=================================================================>] 78,072 103K/s in 0.7s 2011-12-12 12:26:23 (103 KB/s) - `/usr/portage/distfiles/IcePHP-3.2.1.tar.gz' saved [78072/78072] >>> Creating Manifest for /usr/local/portage/dev-php5/IcePHP

Check the files

evo IcePHP # ll total 8 -rw-r--r-- 1 root root 994 Dec 2 15:04 IcePHP-3.2.1.ebuild -rw-r--r-- 1 root root 394 Dec 12 12:26 Manifest

 

Searching in our portage tree and portdir overlay:


evo IcePHP # emerge IcePHP -s Searching... [ Results for search key : IcePHP ] [ Applications found : 1 ] * dev-php5/IcePHP [ Masked ] Latest version available: 3.2.1 Latest version installed: [ Not Installed ] Size of files: 76 kB Homepage: http://www.zeroc.com Description: PHP bindings for the ICE middleware License: GPL-2

Preparing and making our system consistent (good practice):

evo IcePHP # echo dev-php5/IcePHP ~x86 >> /etc/portage/package.keywords evo IcePHP # emerge IcePHP -pv Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-php5/IcePHP-3.2.1 from Headup-Overlay >>> Installing (1 of 1) dev-php5/IcePHP-3.2.1 >>> Jobs: 1 of 1 complete Load avg: 0.82, 1.89, 2.63 * Messages for package dev-php5/IcePHP-3.2.1: * Package: dev-php5/IcePHP-3.2.1 * Repository: Headup-Overlay * USE: elibc_glibc kernel_linux userland_GNU x86 * FEATURES: preserve-libs sandbox userpriv usersandbox * Package: dev-php5/IcePHP-3.2.1 * Repository: Headup-Overlay * USE: elibc_glibc kernel_linux userland_GNU x86 * FEATURES: preserve-libs sandbox userpriv usersandbox * * You must check the extensions configuration under the php.ini * file, and don't forget to restart your apache web server!! * * Removing /usr/share/info >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * IMPORTANT: config file '/etc/dispatch-conf.conf' needs updating. * See the CONFIGURATION FILES section of the emerge * man page to learn how to update config files. * IMPORTANT: 6 news items need reading for repository 'gentoo'. * Use eselect news to read news items.

Configure the ICE extension in the PHP extension language.

evo IcePHP # cat /etc/php/apache2-php5/php.ini ... extension_dir = /etc/php/apache2-php5/ext extension = IcePHP.so ice.profiles = /etc/php/apache2-php5/profiles.ini ...

Configure the project profile.

evo IcePHP # cat /etc/php/apache2-php5/profiles.ini [IceProject] ice.config=/home/to/project/configure/client.configure ice.slice=-I/usr/share/Ice/slice /usr/share/Ice/slice/Glacier2/Router.ice /home/to/project/Slice/project.ice

And restart the apache web server

evo IcePHP # /etc/init.d/apache2 restart * Stopping apache2 ... [ ok ] * Starting apache2 ... [ ok ]