After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 622899 - can't build due to gda-mysql.h:44: error: expected specifier-qualifier-list before ‘MYSQL’
can't build due to gda-mysql.h:44: error: expected specifier-qualifier-list b...
Status: RESOLVED OBSOLETE
Product: libgda
Classification: Other
Component: general
4.2.x
Other Linux
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-27 11:01 UTC by Tobias Mueller
Modified: 2016-04-08 06:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tobias Mueller 2010-06-27 11:01:29 UTC
make[2]: Entering directory `/home/muelli/svn/gnome2/libgda-4.1.6/providers/mysql'
  CC     gda-mysql-ddl.lo
  CC     gda-mysql-blob-op.lo
  CC     gda-mysql-handler-boolean.lo
In file included from gda-mysql-blob-op.c:26:
gda-mysql.h:35:19: error: mysql.h: No such file or directory
In file included from gda-mysql-blob-op.c:26:
gda-mysql.h:44: error: expected specifier-qualifier-list before ‘MYSQL’
make[2]: *** [gda-mysql-blob-op.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.1.6/providers/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.1.6/providers'
make: *** [all-recursive] Error 1
*** Error during phase build of libgda: ########## Error running make   *** [62/66]


jhbuild configured with:
  $ ./configure --prefix /opt/gnome2 --libdir /opt/gnome2/lib64 --with-java=no --disable-static --disable-scrollkeeper --disable-gtk-doc --disable-docs


[jhbuild] muelli@bigbox ~/svn/gnome2/libgda-4.1.6 $ grep -C 2 mysql config.log 
configure:20283: WARNING: ODBC backend not used
configure:20428: checking for MySQL files
configure:20434: checking for mysql_config
configure:20452: found /usr/bin/mysql_config
configure:20464: result: /usr/bin/mysql_config
configure:20480: result: found mysql
configure:20540: checking for mSQL files
configure:20569: WARNING: mSQL backend not used
--
config.status:1411: creating providers/reuseable/Makefile
config.status:1411: creating providers/reuseable/postgres/Makefile
config.status:1411: creating providers/reuseable/mysql/Makefile
config.status:1411: creating providers/bdb/Makefile
config.status:1411: creating providers/bdb/libgda-bdb-4.0.pc
config.status:1411: creating providers/mdb/Makefile
config.status:1411: creating providers/mdb/libgda-mdb-4.0.pc
config.status:1411: creating providers/mysql/Makefile
config.status:1411: creating providers/mysql/libgda-mysql-4.0.pc
config.status:1411: creating providers/oracle/Makefile
config.status:1411: creating providers/oracle/libgda-oracle-4.0.pc
--
ac_cv_path_MSGFMT=/opt/gnome2/bin/msgfmt
ac_cv_path_MSGMERGE=/opt/gnome2/bin/msgmerge
ac_cv_path_MYSQL_CONFIG=/usr/bin/mysql_config
ac_cv_path_SED=/bin/sed
ac_cv_path_XGETTEXT=/opt/gnome2/bin/xgettext
--
MSQL_LIBS=''
MSQL_TRUE='#'
MYSQL_CFLAGS='-I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC   -DUNIV_LINUX'
MYSQL_CONFIG='/usr/bin/mysql_config'
MYSQL_FALSE='#'
MYSQL_LIBS='-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto'
MYSQL_TRUE=''
NM='/usr/bin/nm -B'
[jhbuild] muelli@bigbox ~/svn/gnome2/libgda-4.1.6 $ 


$ yum info mysql-devel
tells me that I don't have mysql-devel installed. Hence I think the configure script got it wrong.

If I configure with --with-mysql=no, it compiles fine.
Comment 1 malerba 2010-06-27 13:08:35 UTC
It seems the /usr/bin/mysql_config file is present but the header files are not, which is the reason the configure script detects the MySQL install but can't compile...

From what I understand and read on the MySQL's docs: "mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL", so I assume the distributions always install the header files if they install the mysql_config script. 

I might add some extra checks (in an already very complicated configure script) but first I have to make sure you have the "standard" install, so can you check if your setup is normal (ie all installed from RPMs and not hand done install).
Comment 2 Tobias Mueller 2010-06-27 13:13:32 UTC
Yes. I have nothing installed manually.

yum provides /usr/bin/mysql_config
yields in mysql-5.1.47-2.fc13.x86_64. So no devel packages are installed.

muelli@bigbox ~ $ ls -l /usr/include/mysql
ls: cannot access /usr/include/mysql: No such file or directory
muelli@bigbox ~ $ /usr/bin/mysql_config
Usage: /usr/lib64/mysql/mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC   -DUNIV_LINUX]
        --include        [-I/usr/include/mysql]
        --libs           [-rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto]
        --libs_r         [-rdynamic -L/usr/lib64/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lssl -lcrypto]
        --plugindir      [/usr/lib64/mysql/plugin]
        --socket         [/var/lib/mysql/mysql.sock]
        --port           [0]
        --version        [5.1.47]
        --libmysqld-libs [-rdynamic -L/usr/lib64/mysql -lmysqld -ldl -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -lssl -lcrypto]
muelli@bigbox ~ $ ls -l /usr/include/mysql
ls: cannot access /usr/include/mysql: No such file or directory
muelli@bigbox ~ $ 


So yes, the configure script apparently needs more checks.
Comment 3 malerba 2011-09-25 20:22:04 UTC
Can you now check with the commit http://git.gnome.org/browse/libgda/commit/?id=a2263c5a462db94fca2cdedd50f2ba031f20fc39?
Vivien
Comment 4 Akhil Laddha 2011-11-10 05:08:22 UTC
Tobias, were you able to reproduce problem with recent libgda ?
Comment 5 Tobias Mueller 2011-12-20 15:41:05 UTC
It's still an issue with libgda-4.2.4.

Making all in skel-implementation
make[2]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation'
Making all in capi
make[3]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation/capi'
gcc -o gen_def -DIMPOSED_HEADER=\""../../../libgda/sql-parser/token_types.h"\" ./gen_def.c
../../../libgda/sql-parser/lemon -q -d -T../../../libgda/sql-parser/lempar.c ./parser.y
gcc -g -o mkkeywordhash  ../../../libgda/sqlite/mkkeywordhash.c
../../../libgda/sql-parser/lemon -q -d -T../../../libgda/sql-parser/lempar.c ./parser.y
3 parsing conflicts.
make[3]: [parser.h] Error 1 (ignored)
LC_ALL=C /opt/gnome2/bin/intltool-merge -x -u -c ../../../po/.intltool-merge-cache ../../../po capi_specs_dsn.xml.in capi_specs_dsn.xml
LC_ALL=C /opt/gnome2/bin/intltool-merge -x -u -c ../../../po/.intltool-merge-cache ../../../po capi_specs_create_table.xml.in capi_specs_create_table.xml
Found cached translation database
3 parsing conflicts.
Merging translations into capi_specs_dsn.xml.
Found cached translation database
make[3]: [parser.c] Error 1 (ignored)
./gen_def > capi_token_types.h
CREATED capi_specs_dsn.xml
./mkkeywordhash ../../../providers/skel-implementation/capi/keywords.list > keywords_hash.c
  CC     gda-capi-blob-op.lo
  CC     gda-capi-ddl.lo
Merging translations into capi_specs_create_table.xml.
gda-capi-blob-op.c: In function ‘gda_capi_blob_op_write’:
gda-capi-blob-op.c:183:13: warning: variable ‘bin’ set but not used [-Wunused-but-set-variable]
  CC     gda-capi-parser.lo
  CC     gda-capi-provider.lo
CREATED capi_specs_create_table.xml
  CC     gda-capi-pstmt.lo
  CC     gda-capi-meta.lo
  CC     gda-capi-recordset.lo
  CC     libmain.lo
gda-capi-recordset.c: In function ‘gda_capi_recordset_new’:
gda-capi-recordset.c:193:15: warning: variable ‘column’ set but not used [-Wunused-but-set-variable]
gda-capi-recordset.c: In function ‘gda_capi_recordset_fetch_nb_rows’:
gda-capi-recordset.c:229:20: warning: variable ‘imodel’ set but not used [-Wunused-but-set-variable]
gda-capi-recordset.c: In function ‘gda_capi_recordset_fetch_random’:
gda-capi-recordset.c:260:20: warning: variable ‘imodel’ set but not used [-Wunused-but-set-variable]
  CC     parser.lo
parser.c: In function ‘yy_destructor’:
parser.c:1206:22: warning: unused variable ‘pdata’ [-Wunused-variable]
  CCLD   libgda-capi.la
make[3]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation/capi'
Making all in models
make[3]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation/models'
  CC     gda-models-provider.lo
  CC     libmain.lo
LC_ALL=C /opt/gnome2/bin/intltool-merge -x -u -c ../../../po/.intltool-merge-cache ../../../po models_specs_dsn.xml.in models_specs_dsn.xml
Found cached translation database
Merging translations into models_specs_dsn.xml.
CREATED models_specs_dsn.xml
  CCLD   libgda-models.la
make[3]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation/models'
make[3]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation'
make[2]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/skel-implementation'
Making all in bdb
make[2]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/bdb'
  CC     gda-bdb-provider.lo
  CC     libmain.lo
  CC     gda-bdb-test.o
LC_ALL=C /opt/gnome2/bin/intltool-merge -x -u -c ../../po/.intltool-merge-cache ../../po bdb_specs_dsn.xml.in bdb_specs_dsn.xml
Found cached translation database
  CCLD   gda-bdb-test
  CCLD   libgda-bdb.la
Merging translations into bdb_specs_dsn.xml.
CREATED bdb_specs_dsn.xml
/usr/bin/ld: skipping incompatible /usr/lib/libdb-5.1.so when searching for -ldb-5.1
make[2]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/bdb'
Making all in mysql
make[2]: Entering directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/mysql'
  CC     gda-mysql-ddl.lo
  CC     gda-mysql-blob-op.lo
  CC     gda-mysql-handler-boolean.lo
  CC     gda-mysql-provider.lo
gda-mysql-ddl.c: In function ‘gda_mysql_render_CREATE_TABLE’:
gda-mysql-ddl.c:295:5: warning: ‘nbfields’ may be used uninitialized in this function [-Wuninitialized]
  CC     gda-mysql-recordset.lo
In file included from gda-mysql-blob-op.c:26:0:
gda-mysql.h:35:19: fatal error: mysql.h: No such file or directory
compilation terminated.
In file included from gda-mysql-provider.c:38:0:
gda-mysql.h:35:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make[2]: *** [gda-mysql-blob-op.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [gda-mysql-provider.lo] Error 1
In file included from gda-mysql-recordset.c:30:0:
gda-mysql.h:35:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make[2]: *** [gda-mysql-recordset.lo] Error 1
make[2]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/muelli/svn/gnome2/libgda-4.2.4/providers'
make: *** [all-recursive] Error 1
*** Error during phase build of libgda: ########## Error running make   *** [7/7]
Comment 6 Murray Cumming 2016-04-08 06:36:36 UTC
I assume that this is fixed by now. Please reopen if not.