DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default I'm sorry ... (apache2, php5, pstgresql, openbsd 4.8)

I want to install apache2. It was easy through the port ... But, I try to install php5 the same way. Lot of reading latter, I've construct my exact php5's flavor

Quote:
env FLAVOR="--with-pear --with-pgsql --enable-zip --with-pdo-pgsql --with-mcrypt --enable-mbstring --with-gmp --with-gd --with-bz2 --with-apxs2=/usr/local/sbin/apxs2" sudo make && sudo make install
All is good, except that it won't compile after some error. The first one is :

Quote:
install -c -o root -g bin -m 444 /usr/ports/pobj/php-5.2.13/php-5.2.13/modules/bz2.so /usr/ports/pobj/php-5.2.13/fake-amd64/var/apache2/lib/php/modules/bz2.so
install: /usr/ports/pobj/php-5.2.13/php-5.2.13/modules/bz2.so: No such file or directory
*** Error code 71"
why he haven't bz2.so if my flavor contain "--with-bz2" ? I'm lost after some day to search a solution on the web.

Last edited by J65nko; 5th February 2011 at 11:19 PM. Reason: Added quote tags and whitespace to improve readability
Reply With Quote
  #2   (View Single Post)  
Old 5th February 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

See:
ports(7) FLAVORS

The FLAVOR variable is not designed to contain configure options...it's designed to flag (possibly multiple) options in make to turn on and turn off groups of configure options. I'm surprised your method even works, to be honest.

What does "make show=FLAVORS" give you? I'm seeing a bunch of options to turn OFF features, but none to turn on features, suggesting that the default flavor is probably what you want (unless you decide to turn off a ton of features you don't need).

Last edited by rocket357; 5th February 2011 at 11:41 PM.
Reply With Quote
  #3   (View Single Post)  
Old 5th February 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Don't build ports, you didn't even read up on the subject before trying.

Just use packages, they're built so people don't make silly mistakes like this.
Reply With Quote
  #4   (View Single Post)  
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default

So, do you can give me a packages with apache2+php5 (with gmp,bz2, pear, pgsql, zip, pdo-pgsql, mcrypt, mbstring, gd, openssl ...)(for apache2, and not 1.3).
I've followed this : http://www.procyonlabs.com/guides/openbsd/apache_php_ssl_db/index.php but if you can give me another way, I'll try it ...
BSDfan666 : why port exist if I can't use it ? If it's "silly" mistake, tell me why openbsd faq speak about that "silly" way !
Reply With Quote
  #5   (View Single Post)  
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default ... no comment ...

I've say that I've made : "env FLAVOR="--with-pear --with-pgsql --enable-zip --with-pdo-pgsql --with-mcrypt --enable-mbstring --with-gmp --with-gd --with-bz2 --with-apxs2=/usr/local/sbin/apxs2 no_x11" sudo make install" but I've followed strictly the http://www.procyonlabs.com/guides/openbsd/apache_php_ssl_db/index.php's "tuto" (all te text in FLAVOR is, in reality, in CONFIGURE_ARGS into the Makefile.inc, in the extensions/Makefile and in core/Makefile)
Reply With Quote
  #6   (View Single Post)  
Old 7th February 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Quote:
Originally Posted by http://www.procyonlabs.com/guides/openbsd/apache_php_ssl_db/index.php
env FLAVORS="no_x11 no_snmp" make install

This is just an example. Type make show=FLAVORS to view all possibilities.
Those don't look like configure options to me...

You aren't understanding how the port builds...it builds php5 core, and it builds all of the extensions as separate packages that you can install one-by-one as needed. Using "no_<extention_name>"in FLAVOR just tells it to not build that extension, so it's harmless to build them all.

In other words, DO NOT use "--with-blah-blah" in FLAVORS. Those are options that you would pass to *configure*, whereas FLAVORS is a ports variable.

Quote:
Originally Posted by Nothing2Do View Post
BSDfan666 : why port exist if I can't use it ? If it's "silly" mistake, tell me why openbsd faq speak about that "silly" way !
Quote:
Originally Posted by http://www.openbsd.org/faq/faq15.html#Ports
IMPORTANT NOTE: The ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages. Do NOT ask beginner questions on the mailing lists like "How can I get the ports tree working?". If you have questions about the ports tree, it is assumed that you have read the manual pages and this FAQ, and that you are able to work with it.
Edit: Packages of php5 ***and all extensions*** are available. You can get the same effect (much faster) with "pkg_add php5-core php5-bz2 php5-gmp etc..."

Last edited by rocket357; 7th February 2011 at 01:31 PM.
Reply With Quote
  #7   (View Single Post)  
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default

I've make mistakes... it's in CONFIGURE_ARGS (in the 3 makefile located in /usr/ports/www/php5, Makefile.inc, core/Makefile and extensions/Makefile).
And "pkg_add" will install all I need but for apache 1.3.
Reply With Quote
  #8   (View Single Post)  
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default

I've say that I've made : "env FLAVOR="--with-pear --with-pgsql --enable-zip --with-pdo-pgsql --with-mcrypt --enable-mbstring --with-gmp --with-gd --with-bz2 --with-apxs2=/usr/local/sbin/apxs2 no_x11" sudo make install" but I've followed strictly the http://www.procyonlabs.com/guides/openbsd/apache_php_ssl_db/index.php's "tuto" (all te text in FLAVOR is, in reality, in CONFIGURE_ARGS into the Makefile.inc, in the extensions/Makefile and in core/Makefile)
Reply With Quote
  #9   (View Single Post)  
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default

they aren't avalaible for apache2 ...
Reply With Quote
Old 7th February 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Quote:
Originally Posted by Nothing2Do View Post
I've say that I've made : "env FLAVOR="--with-pear --with-pgsql --enable-zip --with-pdo-pgsql --with-mcrypt --enable-mbstring --with-gmp --with-gd --with-bz2 --with-apxs2=/usr/local/sbin/apxs2 no_x11" sudo make install" but I've followed strictly the http://www.procyonlabs.com/guides/op...ndex.php's "tuto" (all te text in FLAVOR is, in reality, in CONFIGURE_ARGS into the Makefile.inc, in the extensions/Makefile and in core/Makefile)
If I understand you correctly, you're saying that you edited CONFIGURE_ARGS and did NOT use FLAVOR?

Or did you do both? Or just FLAVOR?

I ask, because no where on that link does it say to put --enable-<blah,blah> in FLAVOR...and doing so has no effect on the end result because it is not intended to be used that way. Test it:


Code:
root@SkyNet:/usr/ports/www/php5# make clean
===> www/php5/core
===>  Cleaning for php5-core-5.2.13
===> www/php5/extensions
===>  Cleaning for php5-extensions-5.2.13
===> www/php5/extensions,no_x11
===>  Cleaning for php5-extensions-5.2.13
root@SkyNet:/usr/ports/www/php5# make 2>&1 | /usr/ports/infrastructure/build/portslogger . 
<snip output>
root@SkyNet:/usr/ports/www/php5# mv php5-core-5.2.13.log php5-core-5.2.13_NOFLAVOR.log
root@SkyNet:/usr/ports/www/php5# make clean
===> www/php5/core
===>  Cleaning for php5-core-5.2.13
===> www/php5/extensions
===>  Cleaning for php5-extensions-5.2.13
===> www/php5/extensions,no_x11
===>  Cleaning for php5-extensions-5.2.13
root@SkyNet:/usr/ports/www/php5# env FLAVOR="--with-bz2" make 2>&1 | /usr/ports/infrastructure/build/portslogger . 
<snip output>
root@SkyNet:/usr/ports/www/php5# mv php5-core-5.2.13.log php5-core-5.2.13_WITHFLAVOR.log
root@SkyNet:/usr/ports/www/php5# grep -i bz php5-core-5.2.13_*                                                                                              
php5-core-5.2.13_NOFLAVOR.log:checking for BZip2 support... no
php5-core-5.2.13_WITHFLAVOR.log:checking for BZip2 support... no
Now let's edit the CONFIGURE_ARGS in core/Makefile and add --with-bz2:

Code:
root@SkyNet:/usr/ports/www/php5# vi core/Makefile
root@SkyNet:/usr/ports/www/php5# make clean
===> www/php5/core
===>  Cleaning for php5-core-5.2.13
===> www/php5/extensions
===>  Cleaning for php5-extensions-5.2.13
===> www/php5/extensions,no_x11
===>  Cleaning for php5-extensions-5.2.13
root@SkyNet:/usr/ports/www/php5# make 2>&1 | /usr/ports/infrastructure/build/portslogger . 
<snip output>
root@SkyNet:/usr/ports/www/php5# grep -i bz php5-core-5.2.13*                              
php5-core-5.2.13.log:checking for BZip2 support... yes
php5-core-5.2.13.log:checking for BZip2 in default path... found in /usr/local
php5-core-5.2.13.log:checking for BZ2_bzerror in -lbz2... yes
php5-core-5.2.13_NOFLAVOR.log:checking for BZip2 support... no
php5-core-5.2.13_WITHFLAVOR.log:checking for BZip2 support... no
Reply With Quote
Old 7th February 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by Nothing2Do View Post
... why port exist if I can't use it ? If it's "silly" mistake, tell me why openbsd faq speak about that "silly" way !
I'll answer this, starting with FAQ 15, highlight in red mine:
Quote:
IMPORTANT NOTE: The ports tree is meant for advanced users. Everyone is encouraged to use the pre-compiled binary packages.
Since the ports tree produces the exact same binary as what is packaged, the value of producing packages from the ports tree is limited to those instances where:
  1. A specific FLAVOR is not available as a package
  2. A package cannot be distributed due to license restrictions
  3. A -current user requires a synchronized package.
Yes, there are other values to having the tree available. But none other for package production.

Now, back to the FAQ, which points us to ports(7) for flavor discussion. That man page says:
Quote:
FLAVORS
The OpenBSD ports tree comes with a mechanism called FLAVORS. Thanks to
this mechanism, users can select specific options provided by a given
port.

If a port is "flavored", there should be a terse description of available
flavors in the pkg/DESCR file.
Flavors are pre-set configurations produced by the ports maintainer. If they exist at all for any port, they are limited to what is provisioned by the port's Makefile.

Of course, anyone can build whatever they want. In this case, you have the sources to php and apache2, so you can add or remove any options to any build as you like. But ...

Don't expect your custom software to work. And if it fails to work, don't expect other users to try to support it. The ports have particular flavors....when they have them at all...for a reason.
Reply With Quote
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default

I understand, I've only modified CONFIGURE_ARGS in Makefile. my FLAVOR don't do anything at all, I'm sad ...
But I've make : "make 2>&1 | /usr/ports/infrastructure/build/portslogger ." to see. And I've only 3 line on my screen ("===> www/php5/core"+"===> www/php5/extensions"+"===> www/php5/extensions,no_x11"). and log isn't stored in "php5-core-5.2.13*" but in "default.log" (and only 5 line in this file, the last output + date output at beginning and end).
Thanks for your appreciated help !

Last edited by Nothing2Do; 7th February 2011 at 08:14 PM.
Reply With Quote
Old 7th February 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Perhaps you haven't seen this, perhaps you have. It's a thread from the ports@ mailing list, circa 2009. AFAICT, this was never finished, but it may be of some assistance:

http://marc.info/?l=openbsd-ports&m=126154333804505&w=2
Reply With Quote
Old 7th February 2011
Nothing2Do Nothing2Do is offline
New User
 
Join Date: Feb 2011
Posts: 8
Default no, i haven't seen this before ...

I don't know that php5 has an apache2 flavor ! I'll try with it,.. But, now, in makefile, there's no apache2 flavor ...
Anyway, I've tried this (env="apache2" sudo make), near the end they are some warning but "sudo make install" end with error message saying that they don't find bz2.so (like without this flavor). Note that I've modified my port tree (the php5's part)

Last edited by Nothing2Do; 7th February 2011 at 09:26 PM.
Reply With Quote
Old 7th February 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It doesn't have this capability. In that thread was the genesis of a solution....an incomplete development, only.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache and php5 sputnik OpenBSD General 10 26th April 2010 08:20 AM
php5-pear gpatrick OpenBSD Packages and Ports 1 17th March 2010 12:00 AM
apache2.2+PHP5 edvinus OpenBSD Packages and Ports 1 29th June 2009 08:13 PM
Problem with upgrading php5-pcre and php5-mysql KernelPanic FreeBSD Ports and Packages 6 16th June 2008 10:00 PM
Apache2 and Iconv disi NetBSD Installation and Upgrading 1 13th May 2008 09:07 PM


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick