# Error with Postfix Install

## rprescott

Hi Everyone,

I am having an issue with my Mail Server at my work.  

We are trying to install Postfix v2.1.5 with MySQL support.  

Postfix complains that it cannot find libmysqlclient.so.13 file.  

When I run the:

make -f Makefile.init makefiles \

'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql' \

'AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm'

It works and the libmysqlclient file is in the /usr/local/mysql/lib/mysql

Any ideas?

P.S.

We are installing from my source =)

----------

## adaptr

And this is connected to Gentoo how ?

I'd recommend reading the Postfix documentation.

----------

## mbjr

I don't know how, but it is.  :Smile: 

There's something going nuts after one of the mysql updates, which makes some .so files disappear somehow. I experience the same with .so.12, and this is not a postfix bug since I have postfix installed already with mysql support:

 *Quote:*   

> [ebuild   R   ] mail-mta/postfix-2.1.5-r1  +ipv6* +ldap -mailwrapper -mbox +mysql +pam +postgres -sasl +ssl -vda 0 kB

 

but now I have:

 *Quote:*   

> netsrv ~ # /usr/lib/postfix/pickup
> 
> /usr/lib/postfix/pickup: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory

 

rprescott, please try to run revdep-rebuild. This is an application to fix broken packages, and it did the thing for me  :Smile: 

If revdep-rebuild failes, try the followings:

- if emerge failed during build, fix the problems and re-run revdep-rebuild

    or

- use -X or --package-names as first argument (try to rebuild package, not exact

  ebuild - ignores SLOT!)

    or

- set ACCEPT_KEYWORDS="~<your platform>" and/or /etc/portage/package.unmask

  (and remove /root/.revdep-rebuild.5_order to be evaluated again)

    or

- modify the above emerge command and run it manually

    or

- compile or unmerge unsatisfied packages manually, remove temporary files and

  try again (you can edit package/ebuild list first)

----------

## mbjr

Oh, and some more info  :Smile:  When you're trying to upgrade mysql, you get this:

 *Quote:*   

> 
> 
>  * If you're upgrading from MySQL-3.x to 4.0, or 4.0.x to 4.1.x, you
> 
>  * must recompile the other packages on your system that link with
> ...

 

 :Smile:  We SHOULD really read this info  :Smile: 

----------

## nobspangle

 *rprescott wrote:*   

> Hi Everyone,
> 
> I am having an issue with my Mail Server at my work.  
> 
> We are trying to install Postfix v2.1.5 with MySQL support.  
> ...

 Why don't you just do 

```
emerge postfix
```

with mysql in your USE like a normal gentoo user and have gentoo sort it out for you

----------

## mbjr

Not gonna work for him. I'm having this problem again, and now revdep-rebuild dies somewhere.

This is a misterious thing. Postfix looks for libmysqlclient.so.whatever in the lib dirs and will die if they're not there. Same with php, mod_php or any other application which might have a +mysql way to build it  :Sad: 

----------

## davester

Similar problem here, only I was using portage. On further inspection it turns out that after the latest mysql update, the symlinks from /usr/lib/libmysqlclient* to /usr/lib/mysql/mysqlclient* disappeared - hence the ld error.

I did a quick and dirty fix and just symlinked it manually for now.

----------

## meulie

Same here. I just went from 4.0.22 to 4.0.23-r1 and things started breaking...    :Sad: 

Linking some files in /usr/lib/mysql/ to /usr/lib seems to have the system up again, although... Doesn't STABLE mean that I should not have to do these things...?     :Cool: 

----------

## Kwallo

Is this worthy of a bug report?  I couldn't get postfix to build until I linked them all with - 

ln -s /usr/lib/mysql/libmysqlclient* /usr/lib/

----------

## steveb

I have exactly the same problem with 4.0.23-r1. but this bug entry fixed my problem for postfix.

change:

```
        if use mysql ; then

                mycc="${mycc} -DHAS_MYSQL -I/usr/include/mysql"

                mylibs="${mylibs} -lmysqlclient -lm -lz"

        fi
```

to

```
        if use mysql ; then

                mycc="${mycc} -DHAS_MYSQL -I/usr/include/mysql -L/usr/lib/mysql"

                mylibs="${mylibs} -lmysqlclient -lm -lz"

        fi
```

in the postfix ebuild to fix the problem.

for dev-ruby/mysql-ruby to get compiled, i had to change:

```
ruby extconf.rb || die
```

to

```
ruby extconf.rb --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config || die
```

in the mysql-ruby ebuild.

cheers

steve

----------

## Duncan Mac Leod

Maybe the man who did this !!STABLE!! ebuild of mysql-4.0.23-r1 should keep in mind that some guys like me are running PRODUCTION Servers for their living, so it's not very funny to see the servers down while fixing these 'issues'  :Sad:  !

Hey, we've got ~x86 flags for such experiments!

just my 2 cents,

Duncan

----------

## meulie

 *Duncan Mac Leod wrote:*   

> Maybe the man who did this !!STABLE!! ebuild of mysql-4.0.23-r1 should keep in mind that some guys like me are running PRODUCTION Servers for their living, so it's not very funny to see the servers down while fixing these 'issues'  !
> 
> Hey, we've got ~x86 flags for such experiments!
> 
> just my 2 cents,
> ...

 

I couldn't agree more!  I spent a couple of hours today fixing a mission-critical server...     :Rolling Eyes: 

----------

## buzzin

Agreed, lost me 2 hours fixing servers with this problem  :Sad: 

----------

## steveb

i am back to 4.0.22. getting all the stuff working with 4.0.23-r1 possible for me. nagios and dspam refused to compile. anyway... i lost serval hours on this problem!

----------

## alain-

 *Kwallo wrote:*   

> ln -s /usr/lib/mysql/libmysqlclient* /usr/lib/

 This did not fix my problem, still getting the error emerging php5:

```
crypto -lm -lcrypt -lxml2 -lz -lm -lcrypt  -o sapi/cli/php

grep: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la: No such file or directory

/bin/sed: can't read /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la: No such file or directory

libtool: link: `/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la' is not a valid libtool archive

make: *** [libphp5.la] Error 1

make: *** Waiting for unfinished jobs....

libtool: link: cannot find the library `/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la'

make: *** [sapi/cli/php] Error 1

!!! ERROR: dev-php/php-5.0.3 failed.

!!! Function php5-sapi_src_compile, Line 434, Exitcode 2

!!! make failed
```

Any more hints how to get my php running again? I am _really_ glad that this is my development-server and not productive...

Alain.

----------

## Duncan Mac Leod

 *Kwallo wrote:*   

> ln -s /usr/lib/mysql/libmysqlclient* /usr/lib/

 

...worked for me (but I am using php4  :Smile:  !) - I did also rebuild my courier-imap and postfix system.

You 've saved my life  :Wink:  & my Server - THANK YOU!

----------

## pablo_supertux

 *Quote:*   

> 
> 
> ```
> 
>  /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la
> ...

 

this is not a mysql problem, did you made a update from gcc 3.3.4 to 3.3.5?

----------

## pablo_supertux

 *steveb wrote:*   

> i am back to 4.0.22. getting all the stuff working with 4.0.23-r1 possible for me. nagios and dspam refused to compile. anyway... i lost serval hours on this problem!

 

*ARG* i've downgraded to 4.0.22 too, now everything runs ...

----------

## alain-

 *pablo_supertux wrote:*   

>  *Quote:*   
> 
> ```
> 
>  /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la
> ...

 

That was the issue. This fixed it:

```
/sbin/fix_libtool_files.sh 3.3.4
```

 Thanks to SteveB for hinting  :Wink: 

----------

## tgnb

ugh  :Sad:  how did this get marked stable

----------

## sl70

Well, doing 

```
ln -s /usr/lib/mysql/libmysqlclient* /usr/lib

```

fixed the compilation problem with postfix, but it doesn't work for other programs, such as wmweather+ (though I admit postfix is way more important). I can't even see anywhere in the wmweather+ ebuild where I could add -L/usr/lib/mysql. Guess I just have to wait until the mysql ebuild is fixed. *sigh*

----------

## Duncan Mac Leod

 *sl70 wrote:*   

> Well, doing 
> 
> ```
> ln -s /usr/lib/mysql/libmysqlclient* /usr/lib
> 
> ...

 

You are right! I have rebuilt nearly everything for my eMail System, BUT cyrus-sasl refuses to build the mysql support  :Sad:  *ARGH*

----------

## ciaranm

 *meulie wrote:*   

> I couldn't agree more!  I spent a couple of hours today fixing a mission-critical server...    

 

Can't be a very important mission if you're rolling unnecessary updates onto it without testing on another box first.

----------

## absinthe

 *meulie wrote:*   

> 
> 
> I couldn't agree more!  I spent a couple of hours today fixing a mission-critical server...    

 

If it was so mission-critical you should have tested the update on another machine before deploying it.  

Broken updates are not endemic to Gentoo, you will find them on any OS.  Companies that keep their systems up do not blindly update production machines.

The bug reports are appreciated but whining when you shoot yourself in the foot is not.

----------

## suid77

 *Quote:*   

> Can't be a very important mission if you're rolling unnecessary updates onto it without testing on another box first.

 

Thats not the point.  Sure, you shouldn't update if you don't need to, but we should also be able to trust the integrity of ebuilds marked as stable.  It seems like a big enough problem that it shouldn't have slipped through the cracks.

If we can't rely on stable packages being stable, you suggest that we do a forum search on every update the portage presents us with??   There just seems to be a lot [too much] of this sort of thing going on lately.

----------

## ciaranm

 *suid77 wrote:*   

>  *Quote:*   Can't be a very important mission if you're rolling unnecessary updates onto it without testing on another box first. 
> 
> Thats not the point.  Sure, you shouldn't update if you don't need to, but we should also be able to trust the integrity of ebuilds marked as stable.  It seems like a big enough problem that it shouldn't have slipped through the cracks.
> 
> If we can't rely on stable packages being stable, you suggest that we do a forum search on every update the portage presents us with??   There just seems to be a lot [too much] of this sort of thing going on lately.

 

No, I suggest you a) do a bugzilla search, and b) post a reply to every bug report you see on the forums asking the poster to file a proper bug.

----------

## suid77

 *Quote:*   

> No, I suggest you a) do a bugzilla search, and b) post a reply to every bug report you see on the forums asking the poster to file a proper bug.

 

I guess I [and many others] were giving Gentoo too much credit.  Maybe there should be a new set of packages given the designation "stable" since you're saying these can't [and shouldn't be] be trusted as such.

I understand minor problems every now and again, even majors problems from time to time, but people rely on these systems for desktops and servers alike.  From what you're saying the 'stable' designation is misleading.

----------

## ciaranm

 *suid77 wrote:*   

>  *Quote:*   No, I suggest you a) do a bugzilla search, and b) post a reply to every bug report you see on the forums asking the poster to file a proper bug. 
> 
> I guess I [and many others] were giving Gentoo too much credit.  Maybe there should be a new set of packages given the designation "stable" since you're saying these can't [and shouldn't be] be trusted as such.
> 
> I understand minor problems every now and again, even majors problems from time to time, but people rely on these systems for desktops and servers alike.  From what you're saying the 'stable' designation is misleading.

 

The stable designation is accurate. It breaks down when we don't get proper bug reports filed. This is the same as with any other distribution. The difference being, most other distributions don't have a setup like our forums where users can easily report bugs to completely the wrong place. Developer testing is reasonable and will catch many bugs, but unless ~arch users do the right thing and report bugs (but *not* those ~arch users who run broken systems) the occasional thing will slip through.

Hint: bitching on the forums doesn't get you anywhere. All it does is reduce the number of developers who ever look in here at all. Thanks to certain incidents involving threads getting unlocked and users refusing to file proper bugs, there's pretty much no chance that any bugs reported to the forums will ever get seen.

----------

## Duncan Mac Leod

 *suid77 wrote:*   

> There just seems to be a lot [too much] of this sort of thing going on lately.

 

Yepp, it is so...

Remember the probs. with 'stable' gcc-3.3.5...

I don't understand why (important) packages (such as mysql and gcc) do not remain flagged ~x86 til they are tested more in-depth..?

----------

## absinthe

 *suid77 wrote:*   

> If we can't rely on stable packages being stable, you suggest that we do a forum search on every update the portage presents us with??   There just seems to be a lot [too much] of this sort of thing going on lately.

 

Stable != bug-free.  Every OS in existence has a stable version for packages but that does not mean it is free of bugs.  It just means that for the known bugs and/or given test cases, it is stable.

Let's take this from another angle:  

There are roughly 9000 packages in the tree, and approximately 300 developers (rounded up).  That's a ratio of about 30 packages:1 developer, but in reality it doesn't work out that way since all packages impose different demands.

But for the sake of argument, even if we had a ratio of 5:1, that still does not preclude the likelihood of bugs, even in the event that our users are dutifully filing bug reports more than they are currently.  It is software, which means it is inherently flawed in some way.

We are definitely working towards making the stable packages "just work", as any OS vendor does, but we can't fix things we don't know about... and there's no way for us to test software in every possible way.

So, in short, we encourage folks to file bug reports and help improve the state of things ... instead of running to the forums and whining about how our free software killed your so-called mission critical server.  Not only is it wrong-headed, it also reveals how badly some manage their servers to those of whom know better, and test everything before deployment.

Even MCSE's know better than to deploy Microsoft upgrades without testing them first.

----------

## suid77

Alright,  thank you for the calm response ciaranm.  However, I would point out that your "don't bitch on the forums" comment is exactly what I felt I was responding to.

But you're absolutely right.  The bugs need to be filed and the forums should not be the only place where these things start and end.  As a developer you're more in touch with the bug listings, and as and end user I'm more comfortable with the forums.

----------

## Duncan Mac Leod

 *suid77 wrote:*   

> The bugs need to be filed and the forums should not be the only place where these things start and end.

 

Agreed! We need more bug-reports from the Community, so the developers can fix the bugs... - and everyone should use Bugzilla and not the forums!

But it is really curious that no-one has reported this obvious bug of mysql-4.0.23 while it was in ~x86 ! ...how long has it been flagged as ~x86?

...and it's also hard to believe how gcc-3.3.5 did get its stable flag, so that everyone was forced to do a fix_libtool_files.sh 3.3.4

----------

## steveb

 *Duncan Mac Leod wrote:*   

>  *suid77 wrote:*   The bugs need to be filed and the forums should not be the only place where these things start and end. 
> 
> Agreed! We need more bug-reports from the Community, so the developers can fix the bugs... - and everyone should use Bugzilla and not the forums!
> 
> But it is really curious that no-one has reported this obvious bug of mysql-4.0.23 while it was in ~x86 ! ...how long has it been flagged as ~x86?
> ...

 

ohhh... no! don't tell me fix_libtool_files.sh is a big thing?!? executing it once after a gcc update is not a realy big issue!

----------

## stiwi

to install proftpd, change this:

```

    if use mysql; then

        modules="${modules}:mod_sql:mod_sql_mysql"

        myconf="--with-includes=/usr/include/mysql"

```

to this:

```

    if use mysql; then

        modules="${modules}:mod_sql:mod_sql_mysql"

        myconf="--with-includes=/usr/include/mysql --with-libraries=/usr/lib/mysql"

```

in the proftpd ebuild.

----------

## steveb

 *stiwi wrote:*   

> to install proftpd, change this:
> 
> ```
> 
>     if use mysql; then
> ...

 please post that kind of info to https://bugs.gentoo.org

cheers

SteveB

----------

## stiwi

ok, i never did it befor   :Confused: 

----------

## steveb

 *stiwi wrote:*   

> ok, i never did it befor  

 Einmal ist es immer das erste Mal  :Wink: 

cheers

SteveB

----------

## stiwi

ja, aber mach ich morgen. jetzt muss ich noch schnell smtp-auth wieder zum laufen bringen ... nie wieder mysql updates ...  :Sad: 

----------

## steveb

 *stiwi wrote:*   

> ja, aber mach ich morgen. jetzt muss ich noch schnell smtp-auth wieder zum laufen bringen ... nie wieder mysql updates ... 

 Ich habe es Gott sei Dank schon hinter mir!  :Wink: 

Habe dann auch gleich noch zig andere Sachen auf dem neuesten Stand gebracht. Nun funktioniert alles wieder. Sogar DSPAM läuft ohne Tam-Tam (und das in der 3.4er Beta Version. Die Geschwiendigkeit ist unglaublich!).

anyway... back to english.

cheers

SteveB

----------

## meulie

 *absinthe wrote:*   

> 
> 
> The bug reports are appreciated but whining when you shoot yourself in the foot is not.

 

Shooting oneself in the foot suggests it's the user that's making an error. Here we're talking about users who follow all instructions to the letter, but who have a gun(/software package) that blows up in their face...    :Cool: 

----------

## pablo_supertux

 *stiwi wrote:*   

> ok, i never did it befor  

 

Genau dafür ist es sowas gedacht...

please change the language to english because not everybody understands german in a not-german board.

----------

## stiwi

ok, i added the bug. i hape i made it correct  :Smile: 

https://bugs.gentoo.org/show_bug.cgi?id=78800

----------

## steveb

 *stiwi wrote:*   

> ok, i added the bug. i hape i made it correct 
> 
> https://bugs.gentoo.org/show_bug.cgi?id=78800

 perfect  :Wink: 

----------

## tgnb

 *meulie wrote:*   

>  *absinthe wrote:*   
> 
> The bug reports are appreciated but whining when you shoot yourself in the foot is not. 
> 
> Shooting oneself in the foot suggests it's the user that's making an error. Here we're talking about users who follow all instructions to the letter, but who have a gun(/software package) that blows up in their face...   

 

A user who follows everything to the letter does NOT do any upgrades on a mission critical server that haven't been tested in a test environment first. It doesn't matter if its marked stable or whatever. If you follow everything to the letter you know to test any upgrades first and realize that even then, things can STILL go wrong on the production machine so they schedule the upgrade at a time when potential downtime would not cause any problems for the users.

----------

## meulie

OK, let's rename unstable & stable to: unstable & less-unstable-but-still-needs-testing...    :Cool: 

----------

## ciaranm

 *meulie wrote:*   

> OK, let's rename unstable & stable to: unstable & less-unstable-but-still-needs-testing...   

 

They're called 'arch' and '~arch', where arch is one of alpha amd64 arm hppa ia64 m68k mips ppc ppc64 ppc-macos ppc-od s390 sh sparc x86 x86-fbsd x86-obsd x86-od

----------

## tgnb

 *meulie wrote:*   

> OK, let's rename unstable & stable to: unstable & less-unstable-but-still-needs-testing...   

 

You can call it whatever you want, but that doesnt change the fact that its unwise to install a patch or upgrade on a mission critical server without testing it first.

----------

## howax

 *Kwallo wrote:*   

> Is this worthy of a bug report?  I couldn't get postfix to build until I linked them all with - 
> 
> ln -s /usr/lib/mysql/libmysqlclient* /usr/lib/

 

ohh you really saved my ass there, thanks  :Wink: 

----------

