# Dovecot: Undefined symbol "fdatasync"



## yelin (Oct 23, 2017)

Hello there,

I'm trying to setting up Dovecot (2.2.33.2) in a jail.
When i restart it (or when postfix try to relay mail to dovecot), I get the following error :

```
"/usr/local/libexec/dovecot/deliver". Command output: /usr/local/lib/dovecot/libdovecot-storage.so.0: Undefined symbol "fdatasync"
```

I found this but I compiled dovecot from poudriere on a 11.1-RELEASE host, my dovecot jail is also in 11.1-RELEASE.

Any ideas ? 
Thanks


----------



## SirDice (Oct 23, 2017)

Show us the output of `freebsd-version -uk` for both the host and the jail.


----------



## yelin (Oct 23, 2017)

On the host: 

```
11.1-RELEASE-p1
11.1-RELEASE-p2
```

On the jail :

```
11.1-RELEASE-p2
```


----------



## SirDice (Oct 23, 2017)

Did you build it from ports or did you use the package?


----------



## yelin (Oct 23, 2017)

I built Dovecot from Poudriere.


----------



## SirDice (Oct 23, 2017)

What version of the jail did you use on poudriere? I'm guessing there's a discrepancy where your poudriere jail is using a different version than the systems themselves.

It's also possible poudriere didn't properly pick up on a 11.0-RELEASE -> 11.1-RELEASE upgrade of its jails. Have you tried doing a _full_ rebuild (add -c to bulk)?


----------



## yelin (Oct 23, 2017)

Well, it seems my poudriere jail is in 11.1-RELEASE : 

```
poudriere jail -u -j 11x64
[00:00:00] ====>> Upgrading using ftp
/etc/resolv.conf -> /usr/local/poudriere/jails/11x64/etc/resolv.conf
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 11.1-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 11.1-RELEASE-p2.
11x64-default: removed
11x64-default-n: removed
11.1-RELEASE-p2
[00:00:03] ====>> Recording filesystem state for clean... done
```

I just started a new full build using `-c` option.


----------



## SirDice (Oct 23, 2017)

yelin said:


> I just started a new full build using  -c option.


That's typically what I do if I get weird dependency errors. Most of the time poudriere correctly rebuilds what's needed but sometimes it seems to fail to see what's been changed. Doing a full rebuild every now and then usually solves it.


----------



## yelin (Oct 23, 2017)

Well, the problem persists after a full rebuild.
I forced the jail to reinstall the packages with `pkg upgrade -f`, is it correct ?


----------



## pinchuk (Dec 9, 2017)

Hi Yelin, 

I face exactly the same problem, also in a jail trying to install dovecot. I wonder if you find in the meantime a solution.

Thanks


----------



## SirDice (Dec 11, 2017)

pinchuk said:


> I face exactly the same problem, also in a jail trying to install dovecot. I wonder if you find in the meantime a solution.


The solution is to update the _jail_.


----------



## hedwards (Dec 12, 2017)

SirDice said:


> The solution is to update the _jail_.


Didn't work for me. I think right now the port utilities are just broken and it may take some time for these bugs to get fixed.

I had this same error with fdatasync and Firefox and the only thing that's worked is manually building the port from the system ports tree and installing that in place of the version that I got from poudiere. I had the same problem with png insisting upon using an older version of zlib.

Ultimately uninstalling the poudiere built version of sqlite3 and installing the version built with just make seems to have fixed the problem, but I'm at a loss as to why, even after nuking and building a new build environment poudiere still built a version that doesn't work.


----------



## SirDice (Dec 12, 2017)

It works just fine with Poudriere. If you get messed up dependencies do a full run (bulk -c) to rebuild _everything_ from scratch. And make sure your Poudriere jails are 11.1 (and updated to the latest patch level).


----------



## hedwards (Dec 12, 2017)

SirDice said:


> It works just fine with Poudriere. If you get messed up dependencies do a full run (bulk -c) to rebuild _everything_ from scratch. And make sure your Poudriere jails are 11.1 (and updated to the latest patch level).


I'll give that a shot, but I started with a completely new jail and it failed anyways, so I'm at a loss as to why doing this would give me a different result.

EDIT: Definitely didn't change anything. sqlite3 still had to be reinstalled manually after the fact to get the error to go away. Not sure why, but it's definitely not as simple as just refreshing the jail.


----------

