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@guest.arnes.si -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Collen Blijenberg <MLHJ>
2004-Apr-19 08:28 UTC
[Samba] Samba 3.0.3pre2 & MySQL compilation problem
Well, you nailed the problem down.. it can't read the mysql.h file... so make sure it's at the right place, along with th other files... also, what version of mysql do you use, coz' in the early pre release versions of samba, the mysql passwd backend, was only working with a 3.X.X version on mysql (dunno if jelmer changed that..??) got it all running at 3.23 version.. ! good luck.. ----------------------------------------------------- Collen Blijenberg (Montessori Lyceum Herman Jordan) Sunday, April 18, 2004, 12:53:01 AM, you wrote: NS> Hi. NS> I have this problem when trying to compile Samba with MySQL passdb NS> backend: NS> Linking bin/smbcquotas NS> Linking bin/smbmount NS> Linking bin/wbinfo NS> Compiling dynconfig.c with -fPIC NS> Linking nsswitch/libnss_wins.so NS> Linking libsmbclient non-shared library bin/libsmbclient.a NS> Linking libsmbclient shared library bin/libsmbclient.so NS> Compiling passdb/pdb_mysql.c with -fPIC NS> passdb/pdb_mysql.c:21:25: mysql/mysql.h: No such file or directory NS> passdb/pdb_mysql.c:35: parse error before "MYSQL" NS> passdb/pdb_mysql.c:35: warning: no semicolon at end of struct or union NS> passdb/pdb_mysql.c:36: warning: data definition has no type or storage class NS> passdb/pdb_mysql.c:38: parse error before '}' token NS> passdb/pdb_mysql.c:38: warning: data definition has no type or storage class NS> passdb/pdb_mysql.c:61: parse error before '*' token NS> passdb/pdb_mysql.c: In function `row_to_sam_account': NS> passdb/pdb_mysql.c:63: `MYSQL_ROW' undeclared (first use in this function) NS> passdb/pdb_mysql.c:63: (Each undeclared identifier is reported only once NS> passdb/pdb_mysql.c:63: for each function it appears in.) NS> passdb/pdb_mysql.c:63: parse error before "row" NS> passdb/pdb_mysql.c:68: `r' undeclared (first use in this function) NS> passdb/pdb_mysql.c:69: `row' undeclared (first use in this function) NS> passdb/pdb_mysql.c:73: `u' undeclared (first use in this function) NS> passdb/pdb_mysql.c: In function `mysqlsam_setsampwent': NS> passdb/pdb_mysql.c:130: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:135: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:137: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:142: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:146: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:146: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:148: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:150: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:156: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_endsampwent': NS> passdb/pdb_mysql.c:175: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:176: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:178: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_getsampwent': NS> passdb/pdb_mysql.c:191: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:193: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:198: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_select_by_field': NS> passdb/pdb_mysql.c:207: `MYSQL_RES' undeclared (first use in this function) NS> passdb/pdb_mysql.c:207: `res' undeclared (first use in this function) NS> passdb/pdb_mysql.c:212: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:222: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:233: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:239: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:246: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:250: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:253: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_getsampwnam': NS> passdb/pdb_mysql.c:272: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_getsampwsid': NS> passdb/pdb_mysql.c:294: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_delete_sam_account': NS> passdb/pdb_mysql.c:315: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:323: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:342: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:347: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:351: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:358: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_replace_sam_account': NS> passdb/pdb_mysql.c:379: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:384: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:387: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:390: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c: In function `mysqlsam_init': NS> passdb/pdb_mysql.c:444: sizeof applied to an incomplete type NS> passdb/pdb_mysql.c:446: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:447: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:454: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:462: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:465: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:466: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:471: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:476: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:477: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:478: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:479: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:480: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:481: dereferencing pointer to incomplete type NS> passdb/pdb_mysql.c:485: dereferencing pointer to incomplete type NS> make: *** [passdb/pdb_mysql.po] Error 1 NS> So, it says there is no mysql/mysql.h file... I configured the source NS> with: NS> ./configure --with-fhs \ NS> --prefix=/usr \ NS> --localstatedir=/var \ NS> --bindir=/usr/bin \ NS> --sbindir=/usr/sbin \ NS> --with-lockdir=/var/cache/samba \ NS> --sysconfdir=/etc \ NS> --with-configdir=/etc/samba \ NS> --with-privatedir=/etc/samba/private \ NS> --with-codepagedir=/etc/codepages \ NS> --with-smbmount \ NS> --with-quotas \ NS> --with-syslog \ NS> --with-utmp \ NS> --with-sambabook=/usr/share/swat/using_samba \ NS> --with-ssl \ NS> --with-sslinc=/usr/include/openssl \ NS> --with-ssllib=/usr \ NS> --with-libsmbclient \ NS> --with-expsam=mysql \ NS> --with-mysql-prefix=/usr/mysql \ NS> --with-mysql-exec-prefix=/usr/mysql/bin NS> And everything looks OK. I have MySQL in /usr/mysql (MySQL.com's NS> binary distro). I also tried to use mysql-prefix=/usr, NS> /usr/mysql/include, I even made a directory /usr/mysql/mysql and NS> copied all include and library files in there (because the error says NS> that it looks for mysql/mysql.h file). NS> Do you have any ideas? NS> Slackware 9.0, Linux 2.4.21, MySQL 4.0.13. NS> Thanks. NS> -- NS> Nejc Skoberne NS> E-mail: nejc.skoberne@guest.arnes.si