Re: Build with MySQL -> libmysqlclient not found

2022-02-28 Thread John Stoffel
> "Dimitri" == Dimitri   writes:

Dimitri> John:
Dimitri> ./configure --help
   
Dimitri> might also be a good idea, I think it might have some options like:
   
Dimitri> --mysql-libs=/path/to/lib
Dimitri> --mysql-includes=/path/to/include
   
Dimitri> or something similiar to use.

Dimitri> Unfortunately not, just the "--with-mysql" Option.

Dimitri> Oscar:
Dimitri> You might need CPPFLAGS as well. (e.g. 
CPPFLAGS="-I/test/core/mariadb/include")
Dimitri> Check also "config.log" for errors.

Dimitri> I had already done both, just forgot to mention it.
Dimitri> But i should have looked further.

Dimitri> Near the end of config.log is saw:
Dimitri> 

Dimitri> | /* Override any GCC internal prototype to avoid an error.
Dimitri> |Use char because int might match the return type of a GCC
Dimitri> |builtin and then its argument prototype would still apply.  */
Dimitri> | #ifdef __cplusplus
Dimitri> | extern "C"
Dimitri> | #endif
Dimitri> | char mysql_init ();
Dimitri> | int
Dimitri> | main ()
Dimitri> | {
Dimitri> | return mysql_init ();
Dimitri> |   ;
Dimitri> |   return 0;
Dimitri> | }
Dimitri> configure:23386: result: no
Dimitri> configure:23520: error: Can't build with MySQL support: 
libmysqlclient not found

Dimitri> 
Dimitri> and thought that wouldn't help me.

Dimitri> Now i looked again but further up an saw:
Dimitri> 

Dimitri> configure:23377: gcc -o conftest -std=gnu99 -g -O2 
-fstack-protector-strong -U_FORTIFY_SOURCE
Dimitri> -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep 
-Wall -W
Dimitri> -Wmissing-prototypes -Wmissing-declarations> ...
Dimitri> /usr/bin/ld: cannot find -lz
Dimitri> collect2: error: ld returned 1 exit status

Dimitri> 

Dimitri> Zlib i have (of course ;) ) also compiled from source.
Dimitri> After adding "/test/dep/zlib/include" to CPPFLAGS and 
"/test/dep/zlib/lib" to LDFLAGS the
Dimitri> configuration runs without errors.

Dimitri> However i don't understand why the configuration-script takes
Dimitri> the non-standard path for openssl automatically and correctly
Dimitri> from the PKG_CONFIG_PATH, but the paths to my zlib and
Dimitri> mariadb installations, which i also set in PKG_CONFIG_PATH
Dimitri> not...

I suspect that either the configure setup scripts doesn't support
using pkg-config for mysql/mariadb, or that there's a problem with how
it works.

In any case, it's good to see you got this working for yourself.  It
might also be that the configure.ac needs to be setup so that mariadb
depends on libz being found and complaining/failing if not.

Cheers,
John


AW: Build with MySQL -> libmysqlclient not found

2022-02-27 Thread Dimitri
Oh and by the way thanks to all for help!

Build with MySQL -> libmysqlclient not found

2022-02-27 Thread Dimitri
> John:
>
> ./configure --help
>
> might also be a good idea, I think it might have some options like:
>
> --mysql-libs=/path/to/lib
> --mysql-includes=/path/to/include
>
> or something similiar to use.

Unfortunately not, just the "--with-mysql" Option.

> Oscar:
>
> You might need CPPFLAGS as well. (e.g. 
> CPPFLAGS="-I/test/core/mariadb/include")
> Check also "config.log" for errors.

I had already done both, just forgot to mention it.
But i should have looked further.

Near the end of config.log is saw:


> | /* Override any GCC internal prototype to avoid an error.
> | Use char because int might match the return type of a GCC
> | builtin and then its argument prototype would still apply. */
> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char mysql_init ();
> | int
> | main ()
> | {
> | return mysql_init ();
> | ;
> | return 0;
> | }
> configure:23386: result: noconfigure:23520: error: Can't build with MySQL 
> support: libmysqlclient not found


and thought that wouldn't help me.

Now i looked again but further up an saw:


> configure:23377: gcc -o conftest -std=gnu99 -g -O2 -fstack-protector-strong 
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep 
> -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations> 
> ...
> /usr/bin/ld: cannot find -lzcollect2: error: ld returned 1 exit status



Zlib i have (of course ;) ) also compiled from source.
After adding "/test/dep/zlib/include" to CPPFLAGS and "/test/dep/zlib/lib" to 
LDFLAGS the configuration runs without errors.

However i don't understand why the configuration-script takes the non-standard 
path for openssl automatically and correctly from the PKG_CONFIG_PATH,
but the paths to my zlib and mariadb installations, which i also set in 
PKG_CONFIG_PATH not...

Re: Build with MySQL -> libmysqlclient not found

2022-02-27 Thread John Stoffel
> "Oscar" == Oscar del Rio  writes:

Oscar> On 2022-02-26 10:29 a.m., Dimitri wrote:
Oscar> After that i've tried to configure with following:

Oscar> LDFLAGS="-L/test/core/mariadb/lib" ./configure 
--prefix=/test/core/dovecot --with-ssldir=/
Oscar> test/core/dovecot/tls --with-mysql

Oscar> You might need CPPFLAGS as
Oscar> well. (e.g. CPPFLAGS="-I/test/core/mariadb/include") Check also
Oscar> "config.log" for errors.

As Oscar says, looking at the config.log after your configure run is a
good step.  


./configure --help

might also be a good idea, I think it might have some options like:

 --mysql-libs=/path/to/lib
 --mysql-includes=/path/to/include

or something similiar to use.  And I can understand wanting to compile
from the source and having your own setup to work from, god knows I've
done it for enough years to compile various pieces of software over
the years.

I haven't checked the dovecot source myself for the actual flags, but
this should get you going.

John



Re: Build with MySQL -> libmysqlclient not found

2022-02-27 Thread Oscar del Rio

On 2022-02-26 10:29 a.m., Dimitri wrote:

After that i've tried to configure with following:

/LDFLAGS="-L/test/core/mariadb/lib" ./configure
--prefix=/test/core/dovecot --with-ssldir=/test/core/dovecot/tls
--with-mysql/




You might need CPPFLAGS as well. (e.g. 
CPPFLAGS="-I/test/core/mariadb/include")

Check also "config.log" for errors.


Build with MySQL -> libmysqlclient not found

2022-02-26 Thread Dimitri
> Why aren't you just using the Ubuntu 20.04 packaged version instead?
>
> Also, did you install the headers for libmysqlclient properly as
>
> well?
>
> What does /test/core/mariadb/includes/ or
>
> /test/core/includes/... show?

Hi John,

i just want to manage all the software manually, use own directorie-structur 
and have all the
programs in one place, deepen my understanding how these programs work and 
build these
programs only with the components i need.

The content of "/test/core/mariadb/include/mysql" is:

> errmsg.h
> ma_list.h
> ma_pvio.h
> mariadb/
> mariadb/ma_io.h
> mariadb_com.h
> mariadb_ctype.h
> mariadb_dyncol.h
> mariadb_rpl.h
> mariadb_stmt.h
> mariadb_version.h
> ma_tls.h
> my_config.h
> my_global.h
> mysql/
> mysql/client_plugin.h
> mysql/plugin_auth_common.h
> mysql/plugin_auth.h
> mysql_com.h
> mysqld_error.h
> mysql.h
> mysql_version.h
> my_sys.h
> server/...

Re: Build with MySQL -> libmysqlclient not found

2022-02-26 Thread justina colmena ~biz



On February 26, 2022 9:07:12 AM AKST, John Stoffel  wrote:
>Dimitri> My Dovecot version: 2.3.18
>Dimitri> My Mariadb version: 10.6.5
>Dimitri> My OS: Ubuntu 20.04
>
>Why aren't you just using the Ubuntu 20.04 packaged version instead?

That's the beauty of free and open source software. We want to know how it's 
compiled and exactly what it depends on. And if we can't do it ourselves, then 
a lot of us amateurs feel like it's getting a little bit too closed-source and 
corporate for our purposes, or somehow more complicated than it needs to be. In 
which case we're looking for an alternative or a fork of the project with a 
legal license.

>Also, did you install the headers for libmysqlclient properly as
>well?
>
>What does /test/core/mariadb/includes/ or
>/test/core/includes/... show?

These are probably very good questions or problem-solving suggestions for 
"Dimitri."

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: Build with MySQL -> libmysqlclient not found

2022-02-26 Thread John Stoffel
> "Dimitri" == Dimitri   writes:

Dimitri> Hi folks,
Dimitri> just step into another problem and don't know why?

Dimitri> If i try to configure dovecot with the following:

Dimitri> ./configure --prefix=/test/core/dovecot
Dimitri> --with-ssldir=/test/core/dovecot/tls --with-mysql

Dimitri> i get

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

Dimitri> After that i've tried to configure with following:

You probably need to tell 



Dimitri> LDFLAGS="-L/test/core/mariadb/lib" ./configure 
--prefix=/test/core/dovecot --with-ssldir=/test
Dimitri> /core/dovecot/tls --with-mysql

Dimitri> but with same result.

Dimitri> The Content of "/test/core/mariadb/lib" is:

Dimitri> libmariadbclient.a
Dimitri> libmariadb.so -> libmariadb.so.3
Dimitri> libmariadb.so.3
Dimitri> libmysqlclient.a -> libmariadbclient.a
Dimitri> libmysqlclient_r.a -> libmariadbclient.a
Dimitri> libmysqlclient_r.so -> libmariadb.so.3
Dimitri> libmysqlclient.so -> libmariadb.so.3
Dimitri> libmysqlservices.a
Dimitri> pkgconfig
Dimitri> plugin

Dimitri> Also the Path "/test/core/mariadb/lib/pkgconfig" is in the
Dimitri> PKG_CONFIG_PATH variable and the Library-Path
Dimitri> "/test/core/mariadb/lib" is known by the dynamic linker
Dimitri> (/etc/ld.so.conf.d/ mylibs.conf).

Dimitri> So what am i doing wrong?

Dimitri> My Dovecot version: 2.3.18
Dimitri> My Mariadb version: 10.6.5
Dimitri> My OS: Ubuntu 20.04

Why aren't you just using the Ubuntu 20.04 packaged version instead?
Also, did you install the headers for libmysqlclient properly as
well?

What does /test/core/mariadb/includes/ or
/test/core/includes/... show?

John



Build with MySQL -> libmysqlclient not found

2022-02-26 Thread Dimitri
Hi folks,

just step into another problem and don't know why?

If i try to configure dovecot with the following:

> ./configure --prefix=/test/core/dovecot --with-ssldir=/test/core/dovecot/tls 
> --with-mysql

i get

> ...
> checking for auth_userokay... no
> checking for mysql_config... NO
> checking for mysql_init in -lmysqlclient... noconfigure: error: Can't build 
> with MySQL support: libmysqlclient not found

After that i've tried to configure with following:

> LDFLAGS="-L/test/core/mariadb/lib" ./configure --prefix=/test/core/dovecot 
> --with-ssldir=/test/core/dovecot/tls --with-mysql

but with same result.

The Content of "/test/core/mariadb/lib" is:

libmariadbclient.a
libmariadb.so -> libmariadb.so.3
libmariadb.so.3
libmysqlclient.a -> libmariadbclient.a
libmysqlclient_r.a -> libmariadbclient.a
libmysqlclient_r.so -> libmariadb.so.3
libmysqlclient.so -> libmariadb.so.3
libmysqlservices.a
pkgconfigplugin

Also the Path "/test/core/mariadb/lib/pkgconfig" is in the PKG_CONFIG_PATH 
variable and the
Library-Path "/test/core/mariadb/lib" is known by the dynamic linker 
(/etc/ld.so.conf.d/mylibs.conf).

So what am i doing wrong?

My Dovecot version: 2.3.18
My Mariadb version: 10.6.5
My OS: Ubuntu 20.04