[odb-users] Cannot Compile ODB Compiler on RHEL 8.5
Tyler Lytle
tlytle123 at gmail.com
Fri Jun 10 18:27:56 EDT 2022
I think I am going down a rabbit hole of RPM issues. The RHEL 8.5 ISO that
contains the RedHat provided repository does not seem to have a plugin
support package for GCC 8. But, weirdly, it has plugin support packages for
GCC 9, 10, and 11. I don't quite understand what I'm looking at or how to
find things so I went a different route. I instead downloaded the
precompiled ODB 2.4.0 RPM from the Code Synthesis website and installed
that and I am now making headway. The runtime ODB library was able to be
built and installed correctly. Now, I am trying to build and install the
MySQL runtime library. I am getting the following error during
configuration:
[tlytle at localhost libodb-mysql-2.4.0]$ ./configure
...
configure: error: libmysqlclient_r is not found; consider using
CPPFLAGS/LDFLAGS to specify its location
Looking in /usr/lib64/mysql, the only MySQL related libraries are
these: libmysqlclient.so libmysqlclient.so.21 libmysqlclient.so.21.1.26
Looking around on the web, the libmysqlclient_r library is no longer
distributed with newer versions of MySQL as the libmysqlclient.so library
is now re-entrant, rendering the libmysqlclient_r.so library meaningless.
To bypass this, I just created a symlink named libmysqlclient_r.so to
libmysqlclient.so.
After doing this, I can now get configure to work. However, when trying to
make the libodb-mysql runtime library, I get a mountain of errors. If you
want, I can copy-paste these in a separate e-mail or get them to you some
other way, but it is a lot of compilation errors. The make commands are as
follows:
[tlytle at localhost libodb-mysql-2.4.0]$ make
Making all in odb/mysql
make[1]: Entering directory
'/home/tlytle/repos/common/odb/libodb-mysql-2.4.0/odb/mysql'
make all-am
make[2]: Entering directory
'/home/tlytle/repos/common/odb/libodb-mysql-2.4.0/odb/mysql'
depbase=`echo connection.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H
-I'../..' -I'../..' -DLIBODB_MYSQL_DYNAMIC_LIB -g -O2 -D_REENTRANT -MT
connection.lo -MD -MP -MF $depbase.Tpo -c -o connection.lo connection.cxx
&&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../..
-DLIBODB_MYSQL_DYNAMIC_LIB -g -O2 -D_REENTRANT -MT connection.lo -MD -MP
-MF .deps/connection.Tpo -c connection.cxx -fPIC -DPIC -o
.libs/connection.o
Just one example of the errors in the output:
In file included from ../../odb/mysql/mysql.hxx:27,
from ../../odb/mysql/database.hxx:18,
from connection.cxx:8:
/usr/include/mysql/mysql.h:640:16: error: using typedef-name 'MYSQL_BIND'
after 'struct'
typedef struct MYSQL_BIND {
^~~~~~~~~~
On Fri, Jun 10, 2022 at 10:27 AM Boris Kolpackov <boris at codesynthesis.com>
wrote:
> Tyler Lytle <tlytle123 at gmail.com> writes:
>
> > I got the following output:
> >
> > [tlytle at localhost odb]$ g++ --print-file-name=plugin
> > /usr/lib/gcc/x86_64-redhat-linux/8/plugin
> >
> > [tlytle at localhost plugin]$ cd /usr/lib/gcc/x86_64-redhat-linux/8/plugin/
> > [tlytle at localhost plugin]$ ls
> > annobin.so annobin.so.0 annobin.so.0.0.0 libcc1plugin.so
> > libcc1plugin.so.0 libcc1plugin.so.0.0.0 libcp1plugin.so
> > libcp1plugin.so.0 libcp1plugin.so.0.0.0
> >
> > The include/ directory is actually up one directory level as shown below:
>
> I don't think that's the directory we are looking for. The one
> we are after should be inside the directory reported with
> --print-file-name=plugin. It should contain headers like gcc.h
> and gcc-plugin.h.
>
> It looks like you only have the plugin libraries but not the
> headers. Maybe there is a separate package that contains these?
> Try to look for a package that contains gcc-plugin.h.
>
--
Tyler Lytle
E-Mail: tlytle123 at gmail.com
More information about the odb-users
mailing list