Dovecot issues

ReN

Verified User
Joined
Jul 2, 2005
Messages
185
Hey guys , Freebsd 9+, getting this now when trying to install dovecot

Making all in lib-charset
gmake[3]: Entering directory '/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset'
cd ../.. && /bin/sh ./config.status src/lib-charset/Makefile depfiles
config.status: creating src/lib-charset/Makefile
config.status: executing depfiles commands
/bin/sh ../../libtool --tag=CC --mode=link gcc48 -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/local/include -no-undefined -Wl,--as-needed -o test-charset test-charset.o libcharset.la ../lib-test/libtest.la ../lib/liblib.la
libtool: link: gcc48 -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/local/include -Wl,--as-needed -o test-charset test-charset.o ./.libs/libcharset.a -lintl ../lib-test/.libs/libtest.a ../lib/.libs/liblib.a
./.libs/libcharset.a(charset-iconv.o): In function `charset_to_utf8_try':
/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset/charset-iconv.c:78: undefined reference to `libiconv'
./.libs/libcharset.a(charset-iconv.o): In function `charset_to_utf8_begin':
/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset/charset-iconv.c:29: undefined reference to `libiconv_open'
./.libs/libcharset.a(charset-iconv.o): In function `charset_to_utf8_end':
/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset/charset-iconv.c:48: undefined reference to `libiconv_close'
./.libs/libcharset.a(charset-iconv.o): In function `charset_to_utf8_reset':
/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset/charset-iconv.c:55: undefined reference to `libiconv'
collect2: error: ld returned 1 exit status
gmake[3]: *** [Makefile:488: test-charset] Error 1
gmake[3]: Leaving directory '/usr/local/directadmin/custombuild/dovecot-2.2.27/src/lib-charset'
gmake[2]: *** [Makefile:493: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/local/directadmin/custombuild/dovecot-2.2.27/src'
gmake[1]: *** [Makefile:618: all-recursive] Error 1
gmake[1]: Leaving directory '/usr/local/directadmin/custombuild/dovecot-2.2.27'
gmake: *** [Makefile:462: all] Error 2

any ideas or suggestions ??
 
First try the newer 2.2.28.

If it fails with the same error, try installing libiconv:

Code:
cd /usr/ports/converters/libiconv
make install
 
First try the newer 2.2.28.

If it fails with the same error, try installing libiconv:

Code:
cd /usr/ports/converters/libiconv
make install

Yeah tried that when it was 2.2.27 , updated it to .28 exactly the same issue - thank you for the reply though
 
Look in your /usr/local/lib folder and make sure that you have correct symlinks:

Code:
root@srv2:/usr/local/lib # ll | grep libiconv.so
lrwxr-xr-x   1 root  wheel        17 Feb 24 02:20 libiconv.so@ -> libiconv.so.2.5.1
lrwxr-xr-x   1 root  wheel        17 Feb 24 02:20 libiconv.so.2@ -> libiconv.so.2.5.1
-rw-r--r--   1 root  wheel   1095062 Feb 24 02:20 libiconv.so.2.5.1

My quick guess is that you may be missing the libiconv.so symlink there...
 
Look in your /usr/local/lib folder and make sure that you have correct symlinks:

Code:
root@srv2:/usr/local/lib # ll | grep libiconv.so
lrwxr-xr-x   1 root  wheel        17 Feb 24 02:20 libiconv.so@ -> libiconv.so.2.5.1
lrwxr-xr-x   1 root  wheel        17 Feb 24 02:20 libiconv.so.2@ -> libiconv.so.2.5.1
-rw-r--r--   1 root  wheel   1095062 Feb 24 02:20 libiconv.so.2.5.1

My quick guess is that you may be missing the libiconv.so symlink there...

root@server:/usr/local/lib # ll | grep libiconv.so
lrwxr-xr-x 1 root wheel 17 Mar 1 01:32 libiconv.so@ -> libiconv.so.2.5.1
lrwxr-xr-x 1 root wheel 17 Mar 1 01:32 libiconv.so.2@ -> libiconv.so.2.5.1
-rw-r--r-- 1 root wheel 1087751 Mar 1 01:32 libiconv.so.2.5.1
 
I'm fighting with this on FreeBSD 11, and was able to add:
Code:
--without-libiconv-prefix
to the configure.dovecot file... will continue to study this. Seems to be included though:
Code:
root@freebsd11-64:/usr/local/directadmin/custombuild # ldd /usr/sbin/dovecot/usr/sbin/dovecot:
        libdovecot.so.0 => /usr/lib/dovecot/libdovecot.so.0 (0x800833000)
        libc.so.7 => /lib/libc.so.7 (0x800b55000)
        libiconv.so.2 => /usr/lib/libiconv.so.2 (0x800f09000)
John
 
Also fighting this and so far no solution.

The fix posted by John doesnt work as FreeBSD 10 and 11 should not have libiconv in base, so that system may have been previously updated and the file left over.

If and when I find another fix I will post here.
 
Ok I fixed it. The environment variables in the configure script need ammending, I examined the FreeBSD port to work out what needs to be done to get to compile on FreeBSD.

You need to add 2 paths to the LD search path like this.

Code:
LDFLAGS="-L/usr/lib/dovecot -L/usr/local/lib"
export LDFLAGS=${LDFLAGS}

Code:
root@hope custombuild # ls -l /usr/sbin/dovecot
-rwxr-xr-x  1 root  wheel  246425 Apr  2 17:58 /usr/sbin/dovecot
root@hope custombuild # ldd /usr/sbin/dovecot  
/usr/sbin/dovecot:
        libdovecot.so.0 => /usr/lib/dovecot/libdovecot.so.0 (0x800830000)
        libc.so.7 => /lib/libc.so.7 (0x800b4d000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x800efc000)

Both paths need adding, if I did one or the other it failed.
 
Last edited:
Code:
LDFLAGS="-L/usr/lib/dovecot -L/usr/local/lib"
export LDFLAGS=${LDFLAGS}

Code:
root@hope custombuild # ls -l /usr/sbin/dovecot
-rwxr-xr-x  1 root  wheel  246425 Apr  2 17:58 /usr/sbin/dovecot
root@hope custombuild # ldd /usr/sbin/dovecot  
/usr/sbin/dovecot:
        libdovecot.so.0 => /usr/lib/dovecot/libdovecot.so.0 (0x800830000)
        libc.so.7 => /lib/libc.so.7 (0x800b4d000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x800efc000)

Both paths need adding, if I did one or the other it failed.

Same Issue on FreeBSD11,
how/where exactly did you add those paths ?
 
Ok I fixed it. The environment variables in the configure script need ammending, I examined the FreeBSD port to work out what needs to be done to get to compile on FreeBSD.

You need to add 2 paths to the LD search path like this.

Code:
LDFLAGS="-L/usr/lib/dovecot -L/usr/local/lib"
export LDFLAGS=${LDFLAGS}

Code:
root@hope custombuild # ls -l /usr/sbin/dovecot
-rwxr-xr-x  1 root  wheel  246425 Apr  2 17:58 /usr/sbin/dovecot
root@hope custombuild # ldd /usr/sbin/dovecot  
/usr/sbin/dovecot:
        libdovecot.so.0 => /usr/lib/dovecot/libdovecot.so.0 (0x800830000)
        libc.so.7 => /lib/libc.so.7 (0x800b4d000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x800efc000)

Both paths need adding, if I did one or the other it failed.

Get same Problem with FreeBNSD 11,
what exactly need to be modified ?
 
Ok I fixed it. The environment variables in the configure script need ammending, I examined the FreeBSD port to work out what needs to be done to get to compile on FreeBSD.

You need to add 2 paths to the LD search path like this.

Code:
LDFLAGS="-L/usr/lib/dovecot -L/usr/local/lib"
export LDFLAGS=${LDFLAGS}

Code:
root@hope custombuild # ls -l /usr/sbin/dovecot
-rwxr-xr-x  1 root  wheel  246425 Apr  2 17:58 /usr/sbin/dovecot
root@hope custombuild # ldd /usr/sbin/dovecot  
/usr/sbin/dovecot:
        libdovecot.so.0 => /usr/lib/dovecot/libdovecot.so.0 (0x800830000)
        libc.so.7 => /lib/libc.so.7 (0x800b4d000)
        libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x800efc000)

Both paths need adding, if I did one or the other it failed.

Just tried updating with the newest dovecot , got the same issue again, let us know how you fixed it :)
 
just adding this to complete this thread guys....
the following worked for me , i thought i did this originally but must not have.

20130904:
AFFECTS: 10-CURRENT users with any port depending on converters/libiconv
AUTHOR: [email protected]

10-CURRENT after r254273 (committed on August 13, 2013) has an
implementation of iconv enabled by default in libc.

NOTE: after r341775 (committed on January 29, 2014) and other
following commits, a few ports, including devel/glib20, depend
on the devel/libiconv again due to missing functionality in the
base iconv implementation.

Due to this change some major overhauling of the ports tree has
been necessary to move the ports to using that implementation.

People using pkgng binary packages should have little problems,
"pkg upgrade" will update all software to not depend on libiconv
anymore, once updated packages are available. Please make sure to
perform a "pkg autoremove" after that and check that libiconv is
correctly removed by it.

If you are using ports the update requires some manual intervention.
The following procedure should be followed:

# pkg query %ro libiconv >ports_to_update
# pkg delete -f libiconv
# cat ports_to_update | xargs portmaster

or:

# pkg query %ro libiconv >ports_to_update
# pkg delete -f libiconv
# cat ports_to_update | xargs portupgrade -f
 
ok guys , just amending this to keep it updated

Freebsd 11.2 / Dovecot 2.3.4

adding

LDFLAGS="-L/usr/lib/dovecot -L/usr/local/lib"
export LDFLAGS=${LDFLAGS}

to /etc/ld.so.conf then ./build dovecot seems to do the job
 
Back
Top