Try to use the installed Studio CC. Make sure the Studio is in the PATH.
Then try with ./congiure CC=cc Regards Siva On Wednesday 10 November 2010 10:58 PM, Nancy wrote:
I had seen the thread made 4 years ago about compiling sysbench on solaris 10 and tried to follow the steps but it hasn't helped. I have been trying for days and nothing has worked. It was difficult enough trying to install sysbench without mysql. I have downloaded and installed mysql from sunfreeware website but haven't gone any configurations of it for users - I don't know where are the instructions for it. Below is all I have attempted - I have also downloaded and installed sun studio 12 tools - http://hub.opensolaris.org/bin/view/Community+Group+tools/sun_studio_12_tools When I try to compile with 'make' after running './configure', I get this error msg: --------------------------------- gcc -DHAVE_CONFIG_H -I. -I../../../config -I/usr/sfw/include/mysql -xstrconst -mt -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../../../sysbench -D_REENTRANT -g -O2 -MT libsbmysql_a-drv_mysql.o -MD -MP -MF .deps/libsbmysql_a-drv_mysql.Tpo -c -o libsbmysql_a-drv_mysql.o `test -f 'drv_mysql.c' || echo './'`drv_mysql.c gcc: language strconst not recognized gcc: drv_mysql.c: linker input file unused because linking not done mv -f .deps/libsbmysql_a-drv_mysql.Tpo .deps/libsbmysql_a-drv_mysql.Po mv: cannot access .deps/libsbmysql_a-drv_mysql.Tpo make[3]: *** [libsbmysql_a-drv_mysql.o] Error 2 ------------------------------- When I try this again after removing all occurrances of '-xstrconst -mt' from all Makefiles with: perl -pi -e "s/-xstrconst -mt//g" $(find . -name Makefile) after running './configure; make' - I get this instead -------------------------------- gcc -DHAVE_CONFIG_H -I. -I../config -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../sysbench -D_REENTRANT -g -O2 -MT sysbench.o -MD -MP -MF .deps/sysbench.Tpo -c -o sysbench.o sysbench.c mv -f .deps/sysbench.Tpo .deps/sysbench.Po gcc -DHAVE_CONFIG_H -I. -I../config -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../sysbench -D_REENTRANT -g -O2 -MT sb_timer.o -MD -MP -MF .deps/sb_timer.Tpo -c -o sb_timer.o sb_timer.c mv -f .deps/sb_timer.Tpo .deps/sb_timer.Po gcc -DHAVE_CONFIG_H -I. -I../config -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../sysbench -D_REENTRANT -g -O2 -MT sb_options.o -MD -MP -MF .deps/sb_options.Tpo -c -o sb_options.o sb_options.c mv -f .deps/sb_options.Tpo .deps/sb_options.Po gcc -DHAVE_CONFIG_H -I. -I../config -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../sysbench -D_REENTRANT -g -O2 -MT sb_logger.o -MD -MP -MF .deps/sb_logger.Tpo -c -o sb_logger.o sb_logger.c mv -f .deps/sb_logger.Tpo .deps/sb_logger.Po gcc -DHAVE_CONFIG_H -I. -I../config -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../sysbench -D_REENTRANT -g -O2 -MT db_driver.o -MD -MP -MF .deps/db_driver.Tpo -c -o db_driver.o db_driver.c mv -f .deps/db_driver.Tpo .deps/db_driver.Po /bin/bash ../libtool --tag=CC --mode=link gcc -D_REENTRANT -g -O2 -lumem -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient_r -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lrt -lm libtool: link: gcc -D_REENTRANT -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o -lumem tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient_r -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lrt -lm -R/usr/sfw/lib -R/usr/sfw/lib/mysql Undefined first referenced symbol in file mysql_library_end drivers/mysql/libsbmysql.a(libsbmysql_a-drv_mysql.o) mysql_library_init drivers/mysql/libsbmysql.a(libsbmysql_a-drv_mysql.o) ld: fatal: Symbol referencing errors. No output written to sysbench collect2: ld returned 1 exit status make[2]: *** [sysbench] Error 1 -------------------------------- When I compile after running this './configure --with-mysql-libs=/usr/local/mysql/lib/ --with-mysql-includes=/usr/local/mysql/include/' - I get this --------------------------- gcc -DHAVE_CONFIG_H -I. -I../../../config -I/usr/local/mysql/include/ -D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I../../../sysbench -D_REENTRANT -g -O2 -MT libsbmysql_a-drv_mysql.o -MD -MP -MF .deps/libsbmysql_a-drv_mysql.Tpo -c -o libsbmysql_a-drv_mysql.o `test -f 'drv_mysql.c' || echo './'`drv_mysql.c drv_mysql.c:35:19: mysql.h: No such file or directory drv_mysql.c:36:26: mysqld_error.h: No such file or directory drv_mysql.c: In function `mysql_drv_describe': drv_mysql.c:284: error: `MYSQL_RES' undeclared (first use in this function) drv_mysql.c:284: error: (Each undeclared identifier is reported only once drv_mysql.c:284: error: for each function it appears in.) drv_mysql.c:284: error: `res' undeclared (first use in this function) drv_mysql.c:285: error: `MYSQL_ROW' undeclared (first use in this function) drv_mysql.c:285: error: syntax error before "row" drv_mysql.c:286: error: `MYSQL_FIELD' undeclared (first use in this function) drv_mysql.c:286: error: `fields' undeclared (first use in this function) drv_mysql.c:328: error: `row' undeclared (first use in this function) drv_mysql.c: In function `mysql_drv_connect': drv_mysql.c:360: error: `MYSQL' undeclared (first use in this function) drv_mysql.c:360: error: `con' undeclared (first use in this function) drv_mysql.c:366: error: syntax error before ')' token drv_mysql.c:401: error: `MYSQL_VERSION_ID' undeclared (first use in this function) drv_mysql.c: In function `mysql_drv_disconnect': drv_mysql.c:441: error: `MYSQL' undeclared (first use in this function) drv_mysql.c:441: error: `con' undeclared (first use in this function) drv_mysql.c: In function `mysql_drv_bind_param': drv_mysql.c:520: error: `MYSQL' undeclared (first use in this function) drv_mysql.c:520: error: `con' undeclared (first use in this function) drv_mysql.c:520: error: syntax error before ')' token drv_mysql.c: In function `mysql_drv_query': drv_mysql.c:729: error: `MYSQL' undeclared (first use in this function) drv_mysql.c:729: error: `con' undeclared (first use in this function) drv_mysql.c:739: error: `ER_LOCK_DEADLOCK' undeclared (first use in this function) drv_mysql.c:739: error: `ER_LOCK_WAIT_TIMEOUT' undeclared (first use in this function) drv_mysql.c:739: error: `ER_CHECKREAD' undeclared (first use in this function) drv_mysql.c: In function `mysql_drv_store_results': drv_mysql.c:789: error: `MYSQL' undeclared (first use in this function) drv_mysql.c:789: error: `con' undeclared (first use in this function) drv_mysql.c:790: error: `MYSQL_RES' undeclared (first use in this function) drv_mysql.c:790: error: `res' undeclared (first use in this function) drv_mysql.c:791: error: `MYSQL_ROW' undeclared (first use in this function) drv_mysql.c:791: error: syntax error before "row" drv_mysql.c:839: error: `ER_LOCK_DEADLOCK' undeclared (first use in this function) drv_mysql.c:839: error: `ER_LOCK_WAIT_TIMEOUT' undeclared (first use in this function) drv_mysql.c:855: error: `row' undeclared (first use in this function) drv_mysql.c: In function `mysql_drv_free_results': drv_mysql.c:879: error: `MYSQL_RES' undeclared (first use in this function) drv_mysql.c:879: error: syntax error before ')' token make[3]: *** [libsbmysql_a-drv_mysql.o] Error 1 ----------------------------------------- When I tried what was listed in the previous thread - # Set up my environment [I did this with 'CC=/opt/SUNWspro/bin/cc; export CC'] CC=/opt/SUNWspro/bin/cc CFLAGS=-xarch=v9 LD_LIBRARY_PATH=/usr/local/mysql/lib:/usr/ccs/lib:/usr/lib:/usr/local/lib:/li b:/usr/ucblib PATH=/opt/SUNWspro/bin:/opt/SUNWspro/bin:/usr/sbin:/usr/bin:/usr/local/bin:.: /usr/ccs/bin:/usr/local/mysql/bin:/usr/local/bin:.:/usr/ccs/bin:/usr/local/mysql /bin # Cleaned out -xc99=none which was being produced by mysql_config by using a slightly modified version of the one liner recommended in this thread find . -name Makefile -print | while read i; do sed -e "s/-xc99=none//g" $i> $i.orig; mv $i.orig $i; done - I get -------------------------------- /bin/bash ../libtool --tag=CC --mode=link /opt/SUNWspro/bin/cc -D_REENTRANT -xarch=v9 -lumem -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lgen -lsocket -lnsl -lm -L/usr/local/ssl/lib -lssl -lcrypto -lrt -lm libtool: link: /opt/SUNWspro/bin/cc -D_REENTRANT -xarch=v9 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o -fPIC -lumem tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lgen -lsocket -lnsl -lssl -lcrypto -lrt -lm -R/usr/local/lib -R/usr/lib -R/usr/openwin/lib -R/usr/local/ssl/lib -R/usr/local/BerkeleyDB.4.2/lib -R/usr/X11R6/lib cc: Warning: illegal use of -xarch option, illegal value ignored: v9 cc: Warning: illegal option -xarch=v9 ld: fatal: library -lmysqlclient_r: not found ld: fatal: File processing errors. No output written to sysbench make[2]: *** [sysbench] Error 1 --------------------------- If I remove the export of 'CFLAGS=-xarch=v9' but keep the rest from above I get ---------------------------- /bin/bash ../libtool --tag=CC --mode=link /opt/SUNWspro/bin/cc -D_REENTRANT -lumem -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -fPIC -L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -R/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4-lgen -lsocket -lnsl -lm -L/usr/local/ssl/lib -lssl -lcrypto -lrt -lm libtool: link: /opt/SUNWspro/bin/cc -D_REENTRANT -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o -fPIC -lumem tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a te sts/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lposix4 -lgen -lsocket -lnsl -lssl -lcrypto -lrt -lm -R/usr/local/lib -R/usr/lib -R/usr/openwin/lib -R/usr/local/ssl/lib -R/usr/local/BerkeleyDB.4.2/lib -R/usr/X11R6/lib ld: fatal: library -lmysqlclient_r: not found ld: fatal: File processing errors. No output written to sysbench make[2]: *** [sysbench] Error 1 ------------------------- Nothing seems to work and I have minimal experience with these things. Any help would definitely be appreciated. Thanks.
-- Sivakumar Shanmugasundaram Staff Engineer ISV Engineering - Systems Group | Sun Microsystems India Pvt Ltd Ph: +91-80-66937340 Cell: +91-9845228967 _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org