# compiling dovecot fails with poudriere



## Vladimir Siman (Sep 2, 2018)

Hello all,

may I kindly ask for help ? My mail/dovecot fails to compile due to missing libmysqlclient, but I do not understand why. Do you have an idea how this can be fixed ? Did I forget or overlooked something somewhere ?
The port compiled well in the past...
Options for dovecot as well as the poudriere build log is attached.

Thanks a lot.
Vladimir


----------



## rigoletto@ (Sep 2, 2018)

Many OPTIONS you have set actually does not exist in the PORT. How did you get those, you invented them? 

So, we cannot even try to reproduce.


----------



## SirDice (Sep 3, 2018)

Your options are old, dovecot2 was renamed to dovecot some time last year.

https://svnweb.freebsd.org/ports?view=revision&revision=447519


----------



## Vladimir Siman (Sep 4, 2018)

Oops.  Ok, so I created the up-to-date options for that, but it didn't help. The output is attached.
Btw. I am using mariadb with:

```
DEFAULT_VERSIONS= mysql=10.0m
```
in my /usr/local/etc/poudriere.d/make.conf


----------



## SirDice (Sep 4, 2018)

Did you recently change the default MySQL? Have you tried doing a clean run? I've had issues before when I was trying a lot of different defaults, at some point things get entangled too much and you need to do a clean build run in order to get everything in line again.


----------



## Vladimir Siman (Sep 4, 2018)

I changed that a long time ago and then it worked, until now. 
How to run a completely clean build ?


----------



## SirDice (Sep 4, 2018)

Vladimir Siman said:


> How to run a completely clean build ?


`poudriere bulk -c {...}`


```
-c           Clean all previously built packages and logs.
```
From poudriere-bulk(8).

Normally Poudriere uses an incremental built, packages that have been previously built will get used to build new things. But sometimes this messes up and the only way to solve it is to start with a fresh build.


----------



## Vladimir Siman (Sep 4, 2018)

Thanks ! So in my case:
poudriere bulk -p HEAD -j "freebsd_11-2x64" -c -a

Now I am waiting the result.


----------



## SirDice (Sep 4, 2018)

Instead of building _everything_ I would recommend making a list of packages you actually need and only build those. It's not very useful to build all 34000+ packages (including various flavors of them) if you're only going to use Apache and a few other packages for example.

Just make a list of the things you need and feed that to Poudriere.


----------



## Vladimir Siman (Sep 4, 2018)

My fault, you're right ! Omg.... Typo..  Thanks for that.
`/usr/local/bin/poudriere bulk -j freebsd_11-2x64 -p HEAD -f /usr/local/etc/poudriere.d/port-list -c`


----------



## SirDice (Sep 4, 2018)

Yeah, that's probably going to save you several hours


----------



## Vladimir Siman (Sep 4, 2018)

So, the clean build ended with the same error.

checking for mysql_init in -lmysqlclient... no
configure: error: Can't build with MySQL support: libmysqlclient not found


----------



## SirDice (Sep 4, 2018)

Odd, I have dovecot with MySQL support too and it builds fine for me. The only difference is that I use MariaDB 10.2. 

Some parts of my last build logs:

```
=======================<phase: lib-depends    >============================
===>   dovecot-2.3.2.1_1 depends on shared library: libmariadb.so.3 - not found
===>   Installing existing package /packages/All/mariadb102-client-10.2.17.txz
...
===>   dovecot-2.3.2.1_1 depends on shared library: libmariadb.so.3 - found (/usr/local/lib/mysql/libmariadb.so.3)
===>   Returning to build of dovecot-2.3.2.1_1
...

checking for mysql_config... mysql_config
checking for mysql_init in -lmysqlclient... yes
checking mysql.h usability... yes
checking mysql.h presence... yes
checking for mysql.h... yes
checking for mysql_ssl_set in -lmysqlclient... yes
```


----------



## Vladimir Siman (Sep 4, 2018)

I will try to build it with 10.2.  Just to see if it's due to the version.


----------



## Vladimir Siman (Sep 4, 2018)

It compiles without a problem with mariadb 10.2...
So this seems to be the solution, I will upgrade mariadb and that's it.

Thanks for help !


----------

