Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-10-2006, 01:33 PM   #1
Registered: Aug 2005
Location: Missouri, USA
Distribution: Gentoo
Posts: 161

Rep: Reputation: 30
PHP Recompile Question (Gentoo, USE flag)

Ok, I finally had PHP and MySQL running correctly on my home server. I had to recompile PHP a couple of times. It installed correctly but each time I tried emerging another program, I was advised to use a particular USE flag with PHP so it had to recompile. Then it didn't want to run correctly with apache so I had to use another flag and recompile, Then it didn't want to run correctly with another program (forgot which) so I had to recompile with a couple of USE flags. Finally it worked the way I wanted it to.

Now I have used mysql via command line for a while (by choice, so I could get use to syntax and stuff). But now that I'm doing a bunch of trial and error with databases, tables, and php I wanted to throw in phpmyadmin for easier viewing of MySQL. So I attempt to emerge phpmyadmin and what do I see:

 * Using dev-lang/php-5.0.5-r5
 * Checking for required PHP feature(s):
 *   Discovered missing USE flag session
 * dev-lang/php-5.0.5-r5 needs to be re-installed with all of the following
 * USE flags enabled:
 *   pcre mysql session

Ugh....Looks like I'm going to have to recompile PHP for the upteenth time. This server is an old PIII and a PHP doesn't compile real quickly, and since PHP has been recompiled sooooo many times, it frustrates the hell out of me (Sorry mods, just accurately conveying emotion/venting).

My main issue with this is that I can't find the notes I jotted down when I originally had php compiled so that it worked correctly for me. I know for a fact that pcre and mysql were two of the USE flags I used when I got PHP to work correctly, so session is the one I need. But I KNOW there were more that I had to use. Am I going to have to take a chance on this recompile and risk trial and error again until I have used all the USE flags or is there a way to see what USE flags I used for my currently merged PHP?
Old 03-10-2006, 02:09 PM   #2
LQ Newbie
Registered: Mar 2006
Distribution: Gentoo
Posts: 1

Rep: Reputation: 0
Originally Posted by justanothersteve there a way to see what USE flags I used for my currently merged PHP?
I'm new to Gentoo as well but as far as I know you can do

emerge -pv dev-lang/php
This will show you what use flags it is currently emerged with; any flag with a star after it denotes a change that would occur after re-emerging the package.

Hope this helps.
Old 03-10-2006, 03:56 PM   #3
Registered: Aug 2005
Location: Missouri, USA
Distribution: Gentoo
Posts: 161

Original Poster
Rep: Reputation: 30
Thanks bob, that was exactly what I was looking for.
Old 06-04-2008, 03:16 PM   #4
LQ Newbie
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Question PHP emerge using compile flags?

Well I have emerged PHP and all works fine except I need a function that is only available with a compile flag set: --with-t1lib[=DIR]. I was wondering if there is a way to use emerge to do this or will I need to compile it from scratch. If so, am I asking for a lot of trouble in doing so? Will I need to unmerge etc.

Old 06-04-2008, 03:53 PM   #5
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,313

Rep: Reputation: Disabled
Welcome to LQ, fatant!

There are two ways to do it.

0. Edit PHP ebuild (in /usr/portage/dev-lang/php), you have to manifest it afterward, see man ebuild.
1. Build it yourself, don't forget to add it to package.provided or emerge will overwrite your custom PHP next time you upgrade. See man portage.

P. S. Please do not resurrect old threads, start your own.


emerge, gentoo, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to recompile PHP? griffey Linux - Software 4 02-18-2009 07:52 PM
mkisofs - flag question satimis Linux - Software 2 10-08-2005 09:38 AM
Flag question of Tar command satimis Linux - General 8 06-28-2005 10:59 AM
Cdrecord - flag question satimis Linux - General 1 05-27-2005 04:49 AM
compiling 32bit gentoo, on AMD64, what CHOST= flag? qwijibow Linux - General 1 12-24-2004 07:21 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration