[Samba] Samba 3.0.3pre2 & MySQL compilation problem

Nejc Skoberne nejc at skoberne.net
Sun Apr 18 01:15:34 GMT 2004


Hi.

I have this problem when trying to compile Samba with MySQL passdb
backend:

Linking bin/smbcquotas
Linking bin/smbmount
Linking bin/wbinfo
Compiling dynconfig.c with -fPIC
Linking nsswitch/libnss_wins.so
Linking libsmbclient non-shared library bin/libsmbclient.a
Linking libsmbclient shared library bin/libsmbclient.so
Compiling passdb/pdb_mysql.c with -fPIC
passdb/pdb_mysql.c:21:25: mysql/mysql.h: No such file or directory
passdb/pdb_mysql.c:35: parse error before "MYSQL"
passdb/pdb_mysql.c:35: warning: no semicolon at end of struct or union
passdb/pdb_mysql.c:36: warning: data definition has no type or storage class
passdb/pdb_mysql.c:38: parse error before '}' token
passdb/pdb_mysql.c:38: warning: data definition has no type or storage class
passdb/pdb_mysql.c:61: parse error before '*' token
passdb/pdb_mysql.c: In function `row_to_sam_account':
passdb/pdb_mysql.c:63: `MYSQL_ROW' undeclared (first use in this function)
passdb/pdb_mysql.c:63: (Each undeclared identifier is reported only once
passdb/pdb_mysql.c:63: for each function it appears in.)
passdb/pdb_mysql.c:63: parse error before "row"
passdb/pdb_mysql.c:68: `r' undeclared (first use in this function)
passdb/pdb_mysql.c:69: `row' undeclared (first use in this function)
passdb/pdb_mysql.c:73: `u' undeclared (first use in this function)
passdb/pdb_mysql.c: In function `mysqlsam_setsampwent':
passdb/pdb_mysql.c:130: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:135: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:137: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:142: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:146: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:146: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:148: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:150: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:156: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_endsampwent':
passdb/pdb_mysql.c:175: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:176: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:178: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_getsampwent':
passdb/pdb_mysql.c:191: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:193: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:198: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_select_by_field':
passdb/pdb_mysql.c:207: `MYSQL_RES' undeclared (first use in this function)
passdb/pdb_mysql.c:207: `res' undeclared (first use in this function)
passdb/pdb_mysql.c:212: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:222: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:233: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:239: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:246: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:250: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:253: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_getsampwnam':
passdb/pdb_mysql.c:272: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_getsampwsid':
passdb/pdb_mysql.c:294: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_delete_sam_account':
passdb/pdb_mysql.c:315: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:323: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:342: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:347: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:351: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:358: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_replace_sam_account':
passdb/pdb_mysql.c:379: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:384: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:387: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:390: dereferencing pointer to incomplete type
passdb/pdb_mysql.c: In function `mysqlsam_init':
passdb/pdb_mysql.c:444: sizeof applied to an incomplete type
passdb/pdb_mysql.c:446: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:447: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:454: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:465: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:466: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:471: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:476: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:477: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:478: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:479: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:480: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:481: dereferencing pointer to incomplete type
passdb/pdb_mysql.c:485: dereferencing pointer to incomplete type
make: *** [passdb/pdb_mysql.po] Error 1

So, it says there is no mysql/mysql.h file... I configured the source
with:

./configure       --with-fhs \
                  --prefix=/usr \
                  --localstatedir=/var \
                  --bindir=/usr/bin \
                  --sbindir=/usr/sbin \
                  --with-lockdir=/var/cache/samba \
                  --sysconfdir=/etc \
                  --with-configdir=/etc/samba \
                  --with-privatedir=/etc/samba/private \
                  --with-codepagedir=/etc/codepages \
                  --with-smbmount \
                  --with-quotas \
                  --with-syslog \
                  --with-utmp \
                  --with-sambabook=/usr/share/swat/using_samba \
                  --with-ssl \
                  --with-sslinc=/usr/include/openssl \
                  --with-ssllib=/usr \
                  --with-libsmbclient \
                  --with-expsam=mysql \
                  --with-mysql-prefix=/usr/mysql \
                  --with-mysql-exec-prefix=/usr/mysql/bin

And everything looks OK. I have MySQL in /usr/mysql (MySQL.com's
binary distro). I also tried to use mysql-prefix=/usr,
/usr/mysql/include, I even made a directory /usr/mysql/mysql and
copied all include and library files in there (because the error says
that it looks for mysql/mysql.h file).

Do you have any ideas?

Slackware 9.0, Linux 2.4.21, MySQL 4.0.13.

Thanks.

-- 
Nejc Skoberne
E-mail: nejc.skoberne at guest.arnes.si

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


More information about the samba mailing list