> On 22/02/2023 08:41 EET James Brown <jlbrown at bordo.com.au> wrote:
>
>
> > On 22 Feb 2023, at 5:33 pm, Aki Tuomi <aki.tuomi at
open-xchange.com> wrote:
> > >
> > > Thanks Aki, that was helpful. When I add that I get:
> > >
> > > checking for LIBSODIUM... no
> > > configure: error: Can't build with libsodium: not found
> > >
> > > So I have to tell it where libsodium is.
> > >
> > > Tried:
> > >
> > > CPPFLAGS=-I/opt/homebrew/Cellar/openssl at 3/3.0.8/include
LDFLAGS=-L/opt/homebrew/opt/openssl at 3/lib
LIBSODIUM_LIBS=-L/opt/homebrew/Cellar/libsodium ./configure --with-ssl=openssl
--with-mysql ?with-sodium
> > >
> > > But that gives:
> > >
> > > configure: WARNING: Libtool does not cope well with whitespace in
`pwd`
> > > checking build system type... Invalid configuration
`?-with-sodium': machine `?-with' not recognized
> > >
> > > Location of libsodium:
> > >
> > > % locate libsodium
> > > /opt/homebrew/Cellar/libsodium
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/.brew
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/.brew/libsodium.rb
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/AUTHORS
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/ChangeLog
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/INSTALL_RECEIPT.json
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/LICENSE
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/README.markdown
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium/core.h
> > >
/opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium/crypto_aead_aes256gcm.h
> > > ...
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium/utils.h
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium/version.h
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/include/sodium.h
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/lib
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/lib/libsodium.23.dylib
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/lib/libsodium.a
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/lib/libsodium.dylib
> > > /opt/homebrew/Cellar/libsodium/1.0.18_1/lib/pkgconfig
> > >
/opt/homebrew/Cellar/libsodium/1.0.18_1/lib/pkgconfig/libsodium.pc
> > > /opt/homebrew/lib/libsodium.23.dylib
> > > /opt/homebrew/lib/libsodium.a
> > > /opt/homebrew/lib/libsodium.dylib
> > > /opt/homebrew/lib/pkgconfig/libsodium.pc
> > > /opt/homebrew/opt/libsodium
> > > /opt/homebrew/var/homebrew/linked/libsodium
> > >
> > > What do I need to use to stop the:Can't build with libsodium:
not found
> > >
> > > Sorry these are such stupid questions.
> > >
> > > James.
> >
> > You accidentically used a UTF-8 special dash instead of two normal
dashes.
> >
> > Aki
> >
>
>
> Yes, I think I picked that up. I think I might have typed it into the email
and it changed it (I?ve run the configure command so many times.)
>
> CPPFLAGS=-I/opt/homebrew/Cellar/openssl at 3/3.0.8/include
LDFLAGS=-L/opt/homebrew/opt/openssl at 3/lib
LIBSODIUM_LIBS=-L/opt/homebrew/Cellar/libsodium ./configure --with-ssl=openssl
--with-mysql--with-sodium
>
> Fails with:
>
> checking for mysql_ssl_set in -lmysqlclient... yes
> checking for LIBSODIUM... no
> configure: error: Can't build with libsodium: not found
>
> This is so frustrating, but I?ll be jumping for joy if we can get it to
work.
>
> James.
Dovecot uses pkg-config to find out about libsodium, and it seems you're
missing libsodium.pc in whatever place mac uses to hide them.
Maybe the .pc file is in the homebrew directory somewhere and needs to be
copied, or you can make it yourself. Make sure to change the version and paths.
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include
Name: libsodium
Version: 1.0.18
Description: A modern and easy-to-use crypto library
Libs: -L${libdir} -lsodium
Libs.private: -pthread
Cflags: -I${includedir}
Aki