Problem Error Code 1: Installing lang/php5-extensions or similar php port

Hello again,

I have had a problem that I posted here:

http://stackoverflow.com/questions/4731691/updating-to-drupal6-on-freebsd-7-error-code-1-during-make-install

In short, I tried upgrading Drupal5 to Drupal-7.0 and I was able to (after much reading and trial and error) install php5 from my ports collection. In the process that I upgraded my PHP version, now my Drupal and Wordpres sites don't work.

I get a blank page from visiting jameshayekserv.com/drupal and I get an
Code:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
error when visting my Wordpress site, jameshayekserv.com/wordpress

When I try to install lang/php5-extensions I get this error:

Code:
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for php5-extensions-1.4
===>  Extracting for php5-extensions-1.4
===>  Patching for php5-extensions-1.4
===>   php5-extensions-1.4 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626/bcmath.so - not found
===>    Verifying install for /usr/local/lib/php/20090626/bcmath.so in /usr/ports/math/php5-bcmath
===>  License check disabled, port has not defined LICENSE
===>  Extracting for php5-bcmath-5.3.5
=> SHA256 Checksum OK for php-5.3.5.tar.bz2.
===>  Patching for php5-bcmath-5.3.5
===>   php5-bcmath-5.3.5 depends on file: /usr/local/bin/phpize - found
===>   php5-bcmath-5.3.5 depends on file: /usr/local/bin/autoconf-2.68 - found
===>  PHPizing for php5-bcmath-5.3.5
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
autoconf: required version 2.68 not found
*** Error code 1

Stop in /usr/ports/math/php5-bcmath.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
jameshayekserv#


I went to my autoconf ports folder and did a "make deinstall" and then "make reinstall" several times and every time I try to install a PHP port I keep getting this error...

Code:
autoconf: required version 2.68 not found

However, I did install it.. I can't get Drupal 7 or Wordpress working. Is there something that I am missing or did incorrectly?
 
Please read /usr/ports/UPDATING:
20101208:
AFFECTS: autotools
AUTHOR: autotools@FreeBSD.org

Another stage in the autotools cleanup that reduces tree churn whilst
updating components, a number of ports have now moved to non-versioned
locations since there is now only the concept of legacy and current
versions.

# portmaster -o devel/autoconf devel/autoconf268
# portmaster -o devel/automake devel/automake111
# portmaster -o devel/libtool devel/libtool22
# portmaster -o devel/libltdl devel/libltdl22

substitute 'portupgrade' for 'portmaster' accordingly if that's your
your upgrade tool of choice.
 
So, the reason I am having these problems is because my ports aren't up to date?

I read through /usr/ports/UPDATING and saw your quote along with a bunch of other ports I currently use.

I tried the command as listed and got back the error below:
Code:
jameshayekserv# portmaster -o devel/autoconf devel/autoconf268

===>>> The second argument can be a port in /var/db/pkg,
       or a port directory from /usr/ports

===>>> No valid installed port, or port directory given
===>>> Try portmaster --help

After reading the portmaster manual page I changed (and I think I did this correctly) devel/autoconf268 to devel/autoconf like so:

Code:
portmaster -o /usr/ports/devel/autoconf /usr/ports/devel/autoconf

I then got back an error:

Code:
*** Error code 1

Stop in /usr/ports/devel/libsigsegv.

===>>> make failed for devel/libsigsegv
===>>> Aborting update

===>>> Update for libsigsegv-2.5 failed
===>>> Aborting update

===>>> Update for m4-1.4.13,1 failed
===>>> Aborting update

===>>>  complete

After reading though the portmaster man page a bit more I though it would be a good idea to run:

Code:
portmaster -a

I then also get an error messege:
Code:
===>>> Returning to update check of installed ports


	===>>> The math/libgmp4 port moved to math/gmp
	===>>> Reason: Switch to newer performance release


===>>> The math/libgmp4 port has been deleted: Has expired: Use math/gmp instead.
===>>> Aborting update

Terminated

I then reran the commands listed in the UPGRADING document and also once again but this time replacing the portmaster command with portupgrade. Still no luck...

I decided to run the portmaster command but this time force it to update all:

Code:
portmaster -a -f

but still got another error:

Code:
===>>> Port directory: /usr/ports/devel/libexecinfo
===>>> Gathering dependency list for devel/libexecinfo from ports
===>>> No dependencies for devel/libexecinfo
===>>> Returning to update check of installed ports


	===>>> The math/libgmp4 port moved to math/gmp
	===>>> Reason: Switch to newer performance release


===>>> The math/libgmp4 port has been deleted: Has expired: Use math/gmp instead.
===>>> Aborting update

Terminated
jameshayekserv#

Not sure what to do now, is it recommended to reinstall the whole ports tree, something like delete and re-install? (But have it not affect Apache or anything else I have running like ssh and ftp and smb, etc, etc.)
 
You can always start all over by running the last block of commands in portmaster(8). Make sure you save your configuration files residing under /usr/local/etc/ (if they contain modifications), and anything under /usr/local/ you need to save (some people have websites in e.g. /usr/local/apache). Make sure to start with a new fresh ports tree.
 
/usr/ports/UPDATING is a list of changes that the port system can't handle by itself, or where the user has to do something extra. Before you install a new port or update an old one, check what is listed in UPDATING since the last time you updated ports. Do all of those steps that apply to ports you have installed, in the order they are listed.

The libgmp4 entry is 20100419. You may need to go back farther than that.
 
If you need to go back further than even that, reinstalling everything is usually less work ;)
 
I read the /usr/ports/UPDATING file and tried the suggested syntax for autoconf with no luck, I am still running into problems installing the port(s). (autoconf was needed for Drupal 6 and I am sure for drupal 7 as well)



DutchDaemon said:
You can always start all over by running the last block of commands in portmaster(8). Make sure you save your configuration files residing under /usr/local/etc/ (if they contain modifications), and anything under /usr/local/ you need to save (some people have websites in e.g. /usr/local/apache). Make sure to start with a new fresh ports tree.

I looked for ways to back up a directory in FreeBSD and I can across this:

Code:
$ dump -0Lauf /path/to/backups/ad0s1d.dump /dev/ad0s1d

from http://forums.freebsd.org/showthread.php?t=185

I ran the above command and saved the file to:

Code:
/usr/home/jameshayek

I also (since I don't know what I am doing) ran:

Code:
jameshayekserv# cp -r -f /usr/local/ /usr/home/jameshayek/usrLocal_BackUp/

to try and copy and entire directory, and this is what was kicked back:

Code:
cp: /usr/local/etc/rndc.key: No such file or directory
cp: /usr/local/share/ghostscript/fonts/MSung-Light: No such file or directory
cp: /usr/local/share/ghostscript/fonts/Ryumin-Light: No such file or directory
cp: /usr/local/share/ghostscript/fonts/GothicBBB-Medium: No such file or directory
cp: /usr/local/share/ghostscript/fonts/STHeiti-Regular: No such file or directory
cp: /usr/local/share/ghostscript/fonts/STSong-Light: No such file or directory
cp: /usr/local/share/ghostscript/8.64/Resource/CIDFont: No such file or directory

I also did the same for the /usr/local/etc directory.

Now I assume I need to run these commands as recommended by DuchDaemon (Thanks btw)

Using portmaster to do a complete reinstallation of all your ports:
1. portmaster --list-origins > ~/installed-port-list
2. Update your ports tree
3. portmaster --clean-distfiles-all
4. portmaster --check-port-dbdir
5. portmaster -Faf
6. pkg_delete '*'
7. rm -rf /usr/local/lib/compat/pkg
8. Manually check /usr/local and /var/db/pkg
to make sure that they are really empty
9. Re-install portmaster
10. portmaster `cat ~/installed-port-list`


I am correct to do this next step after what I just did? Am I on the right track?
 
If you want to copy all of /usr/local/ (which is overkill, but if you have the space for it, why not) you would generally use [cmd=]cp -a /usr/local /some/backup-dir/[/cmd]

This will create /some/backup-dir/local/ with everything in it, including original ownerships and flags. You can then proceed with the steps from portmaster(8).
 
cp -a /usr/local /some/backup-dir/

Didn't work, I had to use:

Code:
cp -iprv /usr/local /usr/home/jameshayek/backup_UsrLocalDir/

Thanks, I have a full backup now.



I then ran:

Code:
portsclean -C
portsclean -D
portsclean -DD


I copied point number one as a command...
(is this even correct? I am not sure how to interpret this)
running:

Code:
portmaster --list-origins > ~/installed-port-list

then updating my ports tree by:

Code:
portmaster -a

and then I get this:

Code:
===>>> Returning to update check of installed ports


	===>>> The math/libgmp4 port moved to math/gmp
	===>>> Reason: Switch to newer performance release


===>>> The math/libgmp4 port has been deleted: Has expired: Use math/gmp instead.
===>>> Aborting update

Terminated
Terminated
jameshayekserv#

Am I doing something wrong? Am I supposed to take "--list-origins" and replace it with "/usr/ports" ? or is "--list-origins" supposed to delete/move my ports tree, and this is not happening?
 
Don't mix portupgrade and portmaster. They're different beasts. The portsclean program is part of portupgrade, as is pkgdb.

Stick to portmaster.

The portmaster program has no 'helpers', it does everything under its own name. Again: follow the steps at the end of portmaster(8) ("Using portmaster to do a complete reinstallation of all your ports"). There is no portmaster -a in there.
 
If you want a real pristine fresh ports tree:

[cmd=]rm /var/db/portsnap/tag && portsnap fetch extract[/cmd]
 
Sorry it took so long, I wasn't slacking, school just got a better hold of me.

rm /var/db/portsnap/tag && portsnap fetch extract

Didn't seem to work. I manually removed all the files in usr/ports/ and reinstalled everything. I was still running into problems... I got so frustrated I backed up my files and reinstalled FreeBSD 8.1 I am setting up everything again now. I am sure I will have more questions as I run into problems.

Thank you all VERY much for your support and knowledge.

And hopefully with the fresh installation I will have no problems with the ports tree. This time I will use cron to keep them up to date at all times. I'm learning somewhat...
 
Back
Top