Re: [Sqlrelay-discussion] Problem compiling SQL Relay 0.50
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2013-08-01 20:21:09
|
FYI, fixes for these issues will be in 0.51.
Dave
dav...@fi...
On 3/4/2013 6:55 AM, Ville Silventoinen wrote:
> Hi,
>
> I've now managed to compile sqlrelay-0.50 on RedHat 6.1. Here's what I
> had to do:
>
> 1. To solve the "cc1plus: error: unrecognized command line option
> "-Wno-long-double"" issue, I modified the configure to set it to empty
> string (I know this isn't a real fix, sorry):
>
> # diff configure configure.original
> 15168,15169c15168
> < #WNOLONGDOUBLE="-Wno-long-double"
> < WNOLONGDOUBLE=""
> ---
> > WNOLONGDOUBLE="-Wno-long-double"
>
> 2. sql_pwdenc should be spelled sqlr_pwdend in the spec file (missing
> "r" character). It was also missing from the %files section:
>
> # diff sqlrelay.spec sqlrelay.spec.original
> 422d421
> < %{_bindir}/sqlr-pwdenc
> 432c431
> < %{_libexecdir}/sqlrelay/sqlrpwdenc_*
> ---
> > %{_libexecdir}/sqlrelay/sqlpwdenc_*
>
> 3. sqlrsh doesn't compile, because filename variable is not initialized
> (g++ treats warnings as errors). I also initialized filenamelen,
> probably not necessary:
>
> # diff src/cmdline/sqlrsh.cpp src/cmdline/sqlrsh.cpp.original
> 1571,1572c1571,1572
> < size_t filenamelen = 0;
> < char *filename = NULL;
> ---
> > size_t filenamelen;
> > char *filename;
>
> 4. I had to modify the Makefiles for postgresql and mysql. When I tried
> to build with rpmbuild, the install failed because the $(RM) commands in
> the Makefiles remove the *.a and *.la files. This took me quite a long
> time to figure out. I compared the Makefiles between 0.46 and 0.50
> releases and managed to fix them:
>
> # diff src/api/postgresql/Makefile src/api/postgresql/Makefile.original
> 38c38,39
> < $(LIBTOOL) --mode=finish $(libdir)
> ---
> > $(RM) $(libdir)/libpqsqlrelay.a
> > $(RM) $(libdir)/libpqsqlrelay.la <http://libpqsqlrelay.la>
>
> # diff src/api/mysql/Makefile src/api/mysql/Makefile.original
> 64a65,66
> > $(RM) $(libdir)/libmysql3sqlrelay.a
> > $(RM) $(libdir)/libmysql3sqlrelay.la <http://libmysql3sqlrelay.la>
> 65a68,69
> > $(RM) $(libdir)/libmysql40sqlrelay.a
> > $(RM) $(libdir)/libmysql40sqlrelay.la <http://libmysql40sqlrelay.la>
> 66a71,72
> > $(RM) $(libdir)/libmysql41sqlrelay.a
> > $(RM) $(libdir)/libmysql41sqlrelay.la <http://libmysql41sqlrelay.la>
> 67a74,75
> > $(RM) $(libdir)/libmysql50sqlrelay.a
> > $(RM) $(libdir)/libmysql50sqlrelay.la <http://libmysql50sqlrelay.la>
> 69c77,78
> < $(LIBTOOL) --mode=finish $(libdir)
> ---
> > $(RM) $(libdir)/libmysql51sqlrelay.a
> > $(RM) $(libdir)/libmysql51sqlrelay.la <http://libmysql51sqlrelay.la>
>
> After this the rpmbuild command works for me.
>
> # uname -a
> Linux vsi-oy-test1.ebi.ac.uk <http://vsi-oy-test1.ebi.ac.uk>
> 2.6.32-279.9.1.el6.x86_64 #1 SMP Fri Aug 31 09:04:24 EDT 2012 x86_64
> x86_64 x86_64 GNU/Linux
>
> # cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 6.1 (Santiago)
>
> If you need any further details, please don't hesitate to ask.
>
> Cheers,
> Ville
>
> On 1 March 2013 17:37, Ville Silventoinen <vil...@gm...
> <mailto:vil...@gm...>> wrote:
>
> Hi,
>
> I just tried to compile sqlrelay-0.50 on RedHat 6.1 (I installed
> rudiments 0.41-1 first successfully):
>
> ...
> libtool: compile: g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
> -mtune=generic -Wall -pipe -Wno-long-double -Werror
> -DDEFAULT_CONFIG_FILE=\"/etc/sqlrelay.conf\"
> -DSYSTEM_SQLRSHRC=\"/etc/sqlrsh\" -I./ -I../../ -I../../src/common
> -I../../src/util -I../../src/server -I../../src/api/c++/include -c
> sqlrsh.cpp -fPIC -DPIC -o .libs/sqlrsh.o
> cc1plus: warnings being treated as errors
> sqlrsh.cpp: In member function 'void sqlrsh::execute(int, const
> char**)':
> sqlrsh.cpp:1572: error: 'filename' may be used uninitialized in this
> function
> At global scope:
> cc1plus: error: unrecognized command line option "-Wno-long-double"
> make[2]: *** [sqlrsh.lo] Error 1
> make[2]: Leaving directory
> `/root/rpmbuild/BUILD/sqlrelay-0.50/src/cmdline'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/rpmbuild/BUILD/sqlrelay-0.50/src'
> make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.DBkPfW (%build)
>
> I'm using a shell script like this to build the RPMs:
>
> #!/bin/sh
> rpmbuild -ta \
> -without db2 \
> -without erlang \
> -without freetds \
> -without firebird \
> -without odbc \
> -without ruby \
> -without sqlite \
> -without sybase \
> -without mdbtools \
> -without tcl \
> -without zope \
> -without gtk \
> -with oracle-instant-client-prefix=/usr \
> sqlrelay-0.50.tar.gz
>
> Any ideas? Apologies if this has already been reported, I haven't
> been able to keep up with the mailing list recently.
>
> Thanks,
> Ville
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
>
>
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
>
|