View Full Version : unable to install Postfix from ports on OBSD 4.3
Pollywog
07-18-2008, 07:46 PM
I can't get Postfix from snapshots to install on OpenBSD 4.3
I have tried to install Postfix from both snapshots and stable to install on OpenBSD 4.3 but I get this:
c -DFD_SETSIZE=2048 -DDEF_CONFIG_DIR=\"/etc/postfix\" -DDEF_DATA_DIR=\"/var/pos
tfix\" -DUSE_TLS -DUSE_SASL_AUTH -DHAS_PCRE -I/usr/local/include -I/usr/local/in
clude -I/usr/local/include/sasl -DUSE_CYRUS_SASL -I/usr/local/include/mysql -DHA
S_MYSQL -DSNAPSHOT -O2 -pipe -I. -I../../include -DOPENBSD4 -c discard.c
cc -DFD_SETSIZE=2048 -DDEF_CONFIG_DIR=\"/etc/postfix\" -DDEF_DATA_DIR=\"/var/pos
tfix\" -DUSE_TLS -DUSE_SASL_AUTH -DHAS_PCRE -I/usr/local/include -I/usr/local/in
clude -I/usr/local/include/sasl -DUSE_CYRUS_SASL -I/usr/local/include/mysql -DHA
S_MYSQL -DSNAPSHOT -O2 -pipe -I. -I../../include -DOPENBSD4 -o discard discard.
o ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a -lssl -lcrypto
-L/usr/local/lib -lpcre -L/usr/local/lib -lsasl2 -L/usr/local/lib/mysql -lmysql
client
../../lib/libutil.a(concatenate.o)(.text+0x64): In function `concatenate':
: warning: strcpy() is almost always misused, please use strlcpy()
../../lib/libglobal.a(mail_conf_int.o)(.text+0x1ae): In function `set_mail_conf_
int':
: warning: sprintf() is often misused, please use snprintf()
../../lib/libutil.a(concatenate.o)(.text+0x84): In function `concatenate':
: warning: strcat() is almost always misused, please use strlcat()
cp discard ../../libexec
[src/tlsmgr]
cc -DFD_SETSIZE=2048 -DDEF_CONFIG_DIR=\"/etc/postfix\" -DDEF_DATA_DIR=\"/var/pos
tfix\" -DUSE_TLS -DUSE_SASL_AUTH -DHAS_PCRE -I/usr/local/include -I/usr/local/in
clude -I/usr/local/include/sasl -DUSE_CYRUS_SASL -I/usr/local/include/mysql -DHA
S_MYSQL -DSNAPSHOT -O2 -pipe -I. -I../../include -DOPENBSD4 -c tlsmgr.c
cc -DFD_SETSIZE=2048 -DDEF_CONFIG_DIR=\"/etc/postfix\" -DDEF_DATA_DIR=\"/var/pos
tfix\" -DUSE_TLS -DUSE_SASL_AUTH -DHAS_PCRE -I/usr/local/include -I/usr/local/in
clude -I/usr/local/include/sasl -DUSE_CYRUS_SASL -I/usr/local/include/mysql -DHA
S_MYSQL -DSNAPSHOT -O2 -pipe -I. -I../../include -DOPENBSD4 -o tlsmgr tlsmgr.o
../../lib/libmaster.a ../../lib/libtls.a ../../lib/libglobal.a ../../lib/libuti
l.a -lssl -lcrypto -L/usr/local/lib -lpcre -L/usr/local/lib -lsasl2 -L/usr/local
/lib/mysql -lmysqlclient
../../lib/libutil.a(concatenate.o)(.text+0x64): In function `concatenate':
: warning: strcpy() is almost always misused, please use strlcpy()
../../lib/libglobal.a(mail_conf_int.o)(.text+0x1ae): In function `set_mail_conf_
int':
: warning: sprintf() is often misused, please use snprintf()
../../lib/libutil.a(concatenate.o)(.text+0x84): In function `concatenate':
: warning: strcat() is almost always misused, please use strlcat()
cp tlsmgr ../../libexec
===> Faking installation for postfix-2.6.20080216p1-sasl2-mysql
/bin/sh: cd: /usr/ports/mail/postfix/snapshot/w-postfix-2.6.20080216p1/postfix-2
.6-20080216 - No such file or directory
*** Error code 1
Stop in /usr/ports/mail/postfix/snapshot (line 110 of /usr/ports/mail/postfix/sn apshot/../Makefile.inc).
*** Error code 1
Stop in /usr/ports/mail/postfix/snapshot (line 2146 of /usr/ports/infrastructure /mk/bsd.port.mk).
*** Error code 1
Stop in /usr/ports/mail/postfix/snapshot (line 1392 of /usr/ports/infrastructure /mk/bsd.port.mk).
*** Error code 1
Stop in /usr/ports/mail/postfix/snapshot (line 1890 of /usr/ports/infrastructure /mk/bsd.port.mk).
*** Error code 1
Stop in /usr/ports/mail/postfix/snapshot (line 1422 of /usr/ports/infrastructure /mk/bsd.port.mk).
I can install one of the packages for Postfix but I can't get sasl and mysql support if I do that.
jggimi
07-18-2008, 08:12 PM
Welcome, Pollywog.
You have made the first ports/packages mistake almost every new user to OpenBSD makes. You neglected to read FAQ 15.4.1.
Pollywog
07-18-2008, 10:06 PM
Welcome, Pollywog.
You have made the first ports/packages mistake almost every new user to OpenBSD makes. You neglected to read FAQ 15.4.1.
Thanks :)
I will read the FAQ section, which I have probably read but forgotten, so I should check the document more often.
Pollywog
07-18-2008, 10:13 PM
Having read the section in the FAQ to which I was referred, that still does not explain why even the stable Postfix port produced similar errors. I should probably change to another machine on which I already have FreeBSD installed; I am more familiar with that than with OpenBSD.
BTW I had read the section in the FAQ before but didn't realize this applied to my situation. I had not realized I was mixing different releases, since I am using the ports tree for OpenBSD 4.3
Having read the section in the FAQ to which I was referred, that still does not explain why even the stable Postfix port produced similar errors. I should probably change to another machine on which I already have FreeBSD installed; I am more familiar with that than with OpenBSD.
BTW I had read the section in the FAQ before but didn't realize this applied to my situation. I had not realized I was mixing different releases, since I am using the ports tree for OpenBSD 4.3
Did you reinstall the ports three. No you didn't. You are still using the snapshot of ports three which are made for 4.4 beta and trying to compile
a port on 4.3 release.
There is 4.3 release branch ports three for 4.3 release and there is a snapshot of ports three for 4.4 beta. You are not even supposed to use ports if you do not know what are you doing which you obviously do not.
If you want to install Postfix on 4.3 release
su
password
export
# PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.3/packages/i386/
# pkg_add postfix (you might need a different flavor here)
You are not going to get any sympathy from any OpenBSD users for the kind the mistakes you are making.
corey_james
07-19-2008, 07:30 AM
Wanna drop the attitude next time Oko ? I'm going to suspend your account if i see another complaint about the tone of your posts!
Wanna drop the attitude next time Oko ? I'm going to suspend your account if i see another complaint about the tone of your posts!
I am sorry, I do not see what was wrong with the tone of my post? The post was right on money. I did provide him with the useful information and if I didn't tell him to go back and read FAQ again because he is repeating the same mistake somebody else would.
You don't have to worry about my posts any more. It is the last one.
I am self suspending my account forever:)
Pollywog
07-19-2008, 04:14 PM
Did you reinstall the ports three. No you didn't. You are still using the snapshot of ports three which are made for 4.4 beta and trying to compile
a port on 4.3 release.
There is 4.3 release branch ports three for 4.3 release and there is a snapshot of ports three for 4.4 beta. You are not even supposed to use ports if you do not know what are you doing which you obviously do not.
If you want to install Postfix on 4.3 release
su
password
export
# PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.3/packages/i386/
# pkg_add postfix (you might need a different flavor here)
You are not going to get any sympathy from any OpenBSD users for the kind the mistakes you are making.
I did have the package installed (as you described in your post), but I am unable to have both mysql and sasl support from a package and that is the reason I wanted to install from ports. Also, I DID fetch a new ports tree, for OBSD 4.3.
I wasn't expecting sympathy, just asking for a little help, and you helped.
I have a very similar configuration working on my FreeBSD Postfix system and that works, so I think I should convert the OpenBSD system to FreeBSD since I have a little more experience with that.
Thanks, and I wasn't expecting anyone to do the work for me. I just wasn't born knowing how to do this stuff and one learns by reading and making mistakes.
Carpetsmoker
07-19-2008, 04:16 PM
I am sorry, I do not see what was wrong with the tone of my post?
Telling someone to "Read the fucking manual" might be one thing that's is "wrong" with your post.
The unfriendly, disrespectful, and hostile tone might be a few other things ...
Yes, the answer may be in the manual but there are lots of pages in the manual, and it's very normal/human not to read all of them letter by letter and make mistakes, especially if you're under some pressure to get things working and/or you're used to a system which is both similar and very different (FreeBSD ports).
There is nothing wrong with pointing out to someone that he/she should put a bit more effort in finding a solution for himself, rather than asking for a read-made solution at forums, but this can be said respectfully too ...
Aside from this, it would seem that Pollywog actually did read te manual, but is confused by it and/or misunderstood something ... Which is not so strange since it would seem that he expects OpenBSD ports to behave the same as FreeBSD ports ... Which they don't ... I made the same mistake, and I'm pretty sure lots of other people have too...
Pollywog
07-19-2008, 04:17 PM
I am sorry, I do not see what was wrong with the tone of my post? The post was right on money. I did provide him with the useful information and if I didn't tell him to go back and read FAQ again because he is repeating the same mistake somebody else would.
You don't have to worry about my posts any more. It is the last one.
I am self suspending my account forever:)
Oh my... I am really sorry I caused this. I won't bother anyone anymore and I did appreciate that someone replied to my post and tried to help, even if I was scorched slightly in the process.
jggimi
07-19-2008, 04:56 PM
1) I sympathize; it can be confusing.
2) Part of the confusion may be Postfix itself; there are two versions called "stable" and "snapshot" that are both available with 4.3-release; the terms "snapshot" and "stable" have different meanings in OpenBSD than they do when used by Postfix.
3) Looking at the posted build output, above, it looks like the FLAVOR environment variable was not passed to the "make fake" step. If so, perhaps you did a "make build" with FLAVOR set, but then did a "make install" without it. As your excerpt does not include the commands you used; that's just a guess.
roundkat
07-19-2008, 05:25 PM
Oh my... I am really sorry I caused this. I won't bother anyone anymore and I did appreciate that someone replied to my post and tried to help, even if I was scorched slightly in the process.
Hang around.. everyone has bad days and bad posts..
Postfix on the other hand it relatively easy to configure more so than
sendmail..
I don't care what these other guys say about Sendmail.. it isn't built
for humans.. :D Just kidding guys..
rk
Pollywog
07-19-2008, 09:15 PM
1) I sympathize; it can be confusing.
2) Part of the confusion may be Postfix itself; there are two versions called "stable" and "snapshot" that are both available with 4.3-release; the terms "snapshot" and "stable" have different meanings in OpenBSD than they do when used by Postfix.
3) Looking at the posted build output, above, it looks like the FLAVOR environment variable was not passed to the "make fake" step. If so, perhaps you did a "make build" with FLAVOR set, but then did a "make install" without it. As your excerpt does not include the commands you used; that's just a guess.
Yes, I think you guessed correctly. I followed a Howto and did exactly what it told me to do to install Postfix on an OpenBSD system and the Howto is recent. I tried stable postfix then the snapshot and got the same result. I am going to do some Googling on this FLAVOR variable and find out what I am doing wrong. Howto's sometimes leave out the details because most people already know about them.
I forgot to look for "OpenBSD for Dummies" when I was at the bookstore but I will be sure to check next time I am there.
roundkat
07-19-2008, 10:21 PM
Here is a excerpt from Matty's Blog (http://prefetch.net/blog/index.php/2005/09/21/openbsd-ports-flavors/)
The OpenBSD ports tree comes with 1000s of packages in source form, and allows each port to be compiled and installed by executing “make install” in the application port directory (e.g., /usr/ports/net/mtr ) . Since individual ports can be built different ways, OpenBSD provides different “FLAVORS” to control the package build process. To view the FLAVORS offered by a specific port, the make utility can be invoked with the ’show’ option:
$ cd xmms
$ make show=FLAVORS
no_esd no_vorbis no_mikmod no_mp3
To build a package with a specific FLAVOR, the FLAVOR environment variable can be set prior to building the package:
$ export FLAVOR=”no_esd”
$ make install
Here is a very helpful site (http://www.kernel-panic.it/) that does a lot of things with OpenBSD.
regarding syntax, look at this (http://www.kernel-panic.it/openbsd/mail/mail3.html).
# cd /usr/ports/mail/postfix/snapshot
# env FLAVOR="mysql sasl2" make install
rk
ocicat
07-19-2008, 10:23 PM
YHowto's sometimes leave out the details because most people already know about them.
We strongly discourage people from using "howto's" for exactly this & many other reasons:
"Howto's" rarely are complete. Authors either don't anticipate how people may stretch the information provided, or they don't understand it themselves.
Most "howto's" are horribly out of date, & frequently don't reference what versions of OpenBSD were used.
The obvious question in response is "Where can I get such information?". Although "howto's" might offer some direction, it is still the responsibility of all of us to understand what commands are issued at the keyboard.
Pollywog
07-20-2008, 12:44 AM
Here is a excerpt from Matty's Blog (http://prefetch.net/blog/index.php/2005/09/21/openbsd-ports-flavors/)
Here is a very helpful site (http://www.kernel-panic.it/) that does a lot of things with OpenBSD.
regarding syntax, look at this (http://www.kernel-panic.it/openbsd/mail/mail3.html).
# cd /usr/ports/mail/postfix/snapshot
# env FLAVOR="mysql sasl2" make install
rk
Thanks, this is exactly how I did it, so there must be something else I overlooked. I updated the ports tree but I did not update the source tree, thinking it was not necessary to do that unless I wanted to recompile the kernel.
Thanks for the URL's, I will have a look there.
Pollywog
07-20-2008, 12:51 AM
We strongly discourage people from using "howto's" for exactly this & many other reasons:
"Howto's" rarely are complete. Authors either don't anticipate how people may stretch the information provided, or they don't understand it themselves.
Most "howto's" are horribly out of date, & frequently don't reference what versions of OpenBSD were used.
The obvious question in response is "Where can I get such information?". Although "howto's" might offer some direction, it is still the responsibility of all of us to understand what commands are issued at the keyboard.
Yes, I understand that Howto's are not perfect, but the official documentation is not all-inclusive even though it is the best source of information for beginners.
I know there is a book about OpenBSD but it is out of print. I use a book for FreeBSD and it is a great source of information.
jggimi
07-20-2008, 12:56 AM
Don't follow "HowTo" documents. That said, you can learn from them, and use them to provide some direction, or perhaps areas to research. It is safest to assume from the outset that the person who wrote the document:
Was relatively new to OpenBSD when they wrote it.
Was not a professional instructor or technical writer, and therefore they did not "level-set" all of the required background necessary to understand the steps taken.
Thought that any reader's environment would match theirs exactly.
Never fully explained the details of any commands they show, why they suggested their particular command set, or what each command actually does. (I've seen an OpenBSD "Howto" where the author said that they did not understand what a command they recommended actually did, but that it was a necessary step. If you come across one of those, stop reading it. :()
Pollywog
07-20-2008, 01:11 AM
Don't follow "HowTo" documents. That said, you can learn from them, and use them to provide some direction, or perhaps areas to research. It is safest to assume from the outset that the person who wrote the document:
Was relatively new to OpenBSD when they wrote it.
Was not a professional instructor or technical writer, and therefore they did not "level-set" all of the required background necessary to understand the steps taken.
Thought that any reader's environment would match theirs exactly.
Never fully explained the details of any commands they show, why they suggested their particular command set, or what each command actually does. (I've seen an OpenBSD "Howto" where the author said that they did not understand what a command they recommended actually did, but that it was a necessary step. If you come across one of those, stop reading it. :()
I think you are right. Many of the Howto's that I see will have a statement like "This is what I did and it finally works" like they did a trial-and-error install and then based their Howto on that.
I read the section of the FAQ that pertains to FLAVORS and I think I will stick with the packages until I understand OpenBSD better. I have used one or two other ports when packages were not available and didn't have any problems with those.
roundkat
07-20-2008, 01:40 AM
Thanks, this is exactly how I did it, so there must be something else I overlooked. I updated the ports tree but I did not update the source tree, thinking it was not necessary to do that unless I wanted to recompile the kernel.
Thanks for the URL's, I will have a look there.
No worries..
As a rule you should always update the kernel and userland.
Anoncvs look here (http://openbsd.org/anoncvs.html)
Patching look here. (http://openbsd.org/stable.html)
by keeping your kernel and userland in sync you will avoid a lot of weird issues..
rk
ai-danno
07-20-2008, 08:29 PM
IMHO, this entire thread is full of examples of what to do and not to do with regards to both posting on this forum, and working with OBSD documentation to accomplish your objectives.
Pollywog
07-21-2008, 04:31 AM
No worries..
As a rule you should always update the kernel and userland.
Anoncvs look here (http://openbsd.org/anoncvs.html)
Patching look here. (http://openbsd.org/stable.html)
by keeping your kernel and userland in sync you will avoid a lot of weird issues..
rk
I got an idea... if I do a *clean install* of OpenBSD, would I then be able to properly compile Postfix in /usr/ports/mail/postfix/stable ?
After all, things are messed up because I upgraded from OBSD 4.2 to 4.3 without upgrading the sources and kernel.
OpenBSD is so easy and fast to install that a clean install is less troublesome than a clean install in Linux or FreeBSD, IMHO.
jggimi
07-21-2008, 01:13 PM
A clean install of 4.3, obtained from /pub/OpenBSD/4.3/<arch>/ at your nearest mirror would install "4.3-release." You will need the matching ports tree, obtained from the same mirror, in /pub/OpenBSD/4.3/ports.tar.gz.
The fastest way to prepare the build is to install all dependent packages needed to build Postfix, first. Setting your FLAVOR environment variable, then issuing "make print-build-depends" will give you the list of packages to install. Set your PKG_PATH appropriately to the /pub/OpenBSD/4.3/packages/<arch>/ of your nearest mirror.
Pollywog
07-21-2008, 03:24 PM
A clean install of 4.3, obtained from /pub/OpenBSD/4.3/<arch>/ at your nearest mirror would install "4.3-release." You will need the matching ports tree, obtained from the same mirror, in /pub/OpenBSD/4.3/ports.tar.gz.
Yes, I am aware of that except that I did not know the ports tree had to be obtained from the same mirror. I will need to burn a new ISO to be sure I do get the ports tree from the same place.
thanks
jggimi
07-21-2008, 06:11 PM
It doesn't have to come from the same mirror -- that's a matter of convenience -- but it does need to be in synch with the -release you've chosen. e.g.: 4.2 with 4.2, 4.3 with 4.3.
Pollywog
07-22-2008, 04:32 AM
It doesn't have to come from the same mirror -- that's a matter of convenience -- but it does need to be in synch with the -release you've chosen. e.g.: 4.2 with 4.2, 4.3 with 4.3.
Thanks to you all all the others who helped. I did a clean install and successfully installed Postfix from ports with mysql and sasl2 support.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.