Open innoag opened 2 years ago
Hi,
There are 2 issues here:
export LDFLAGS="-L/usr/lib64/mysql"
(or whatever the path where MySQL is installed).
-HTH
Regards, Devrim
resolved some of packages installed today, followings are the messages while compile:
[root@mich mysql_fdw]# export LDFLAGS="-L/usr/lib64/mysql" [root@mich mysql_fdw]# make USE_PGXS=1 Makefile:44: *** PostgreSQL 9.6, 10, 11, 12, 13 or 14 is required to compile this extension. Stop.
as far i have postgres rpms install: [root@mich mysql_fdw]# rpm -aq|grep postgres postgresql13-devel-13.4-1PGDG.rhel7.x86_64 postgresql-libs-9.2.24-7.el7_9.x86_64 postgresql-9.2.24-7.el7_9.x86_64 postgresql13-13.4-1PGDG.rhel7.x86_64 postgresql-devel-9.2.24-7.el7_9.x86_64 postgresql13-server-13.4-1PGDG.rhel7.x86_64 postgresql13-libs-13.4-1PGDG.rhel7.x86_64
Hi,
It seems binary path for PG13 is not added in PATH variable. Can you please add that and check again?
e.g:
export PATH=
it looks like fine to see mysql_fdw.so been generated. but please see end up error messages after 'make USE_PGXS=1 installcheck'. its db just default installed nothing changed both pg and mysql.
[root@mich mysql_fdw]# export PATH=/usr/pgsql-13/bin:$PATH [root@mich mysql_fdw]# export LDFLAGS="-L/usr/lib64/mysql" [root@mich mysql_fdw]# make USE_PGXS=1 gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o connection.o connection.c gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o option.o option.c gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o deparse.o deparse.c gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o mysql_query.o mysql_query.c gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o mysql_fdw.o mysql_fdw.c gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC -shared -o mysql_fdw.so connection.o option.o deparse.o mysql_query.o mysql_fdw.o -L/usr/pgsql-13/lib -L/usr/lib64/llvm5.0/lib -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-13/lib',--enable-new-dtags /opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o connection.bc connection.c /opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o option.bc option.c /opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o deparse.bc deparse.c /opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o mysql_query.bc mysql_query.c /opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2 -I/usr/include/mysql -D _MYSQL_LIBNAME=\"libmysqlclient.so\" -I. -I./ -I/usr/pgsql-13/include/server -I/usr/pgsql-13/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin -emit-llvm -c -o mysql_fdw.bc mysql_fdw.c [root@mich mysql_fdw]# make USE_PGXS=1 install /bin/mkdir -p '/usr/pgsql-13/lib' /bin/mkdir -p '/usr/pgsql-13/share/extension' /bin/mkdir -p '/usr/pgsql-13/share/extension' /bin/install -c -m 755 mysql_fdw.so '/usr/pgsql-13/lib/mysql_fdw.so' /bin/install -c -m 644 .//mysql_fdw.control '/usr/pgsql-13/share/extension/' /bin/install -c -m 644 .//mysql_fdw--1.0.sql .//mysql_fdw--1.1.sql .//mysql_fdw--1.0--1.1.sql '/usr/pgsql-13/share/extension/' /bin/mkdir -p '/usr/pgsql-13/lib/bitcode/mysql_fdw' /bin/mkdir -p '/usr/pgsql-13/lib/bitcode'/mysql_fdw/ /bin/install -c -m 644 connection.bc '/usr/pgsql-13/lib/bitcode'/mysql_fdw/./ /bin/install -c -m 644 option.bc '/usr/pgsql-13/lib/bitcode'/mysql_fdw/./ /bin/install -c -m 644 deparse.bc '/usr/pgsql-13/lib/bitcode'/mysql_fdw/./ /bin/install -c -m 644 mysql_query.bc '/usr/pgsql-13/lib/bitcode'/mysql_fdw/./ /bin/install -c -m 644 mysql_fdw.bc '/usr/pgsql-13/lib/bitcode'/mysql_fdw/./ cd '/usr/pgsql-13/lib/bitcode' && /usr/lib64/llvm5.0/bin/llvm-lto -thinlto -thinlto-action=thinlink -o mysql_fdw.index.bc mysql_fdw/connection.bc mysql_fdw/option.bc mysql_fdw/deparse.bc mysql_fdw/mysql_query.bc mysql_fdw/mysql_fdw.bc [root@mich mysql_fdw]# make USE_PGXS=1 installcheck /usr/pgsql-13/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/pgsql-13/bin' --dbname=contrib_regression server_options connection_validation dml select pushdown join_pushdown (using postmaster on Unix socket, default port) ============== dropping database "contrib_regression" ============== psql: error: FATAL: role "root" does not exist command failed: "/usr/pgsql-13/bin/psql" -X -c "DROP DATABASE IF EXISTS \"contrib_regression\"" "postgres" make: *** [installcheck] Error 2
Hi,
From the output shared above, it is clear that mysql_fdw installation is completed after executing 'make USE_PGXS=1 install' command. Now you can create the extension and start using the same.
The command 'make USE_PGXS=1 installcheck' is used to run the regressions and it is failing at your end because you have used the root user to run it. Kindly use the 'postgres' (or user which is postgres cluster owner) to run the regression.
Thanks, Suraj
Hi @innoag,
We have not received any further updates on this from your end. We are happy to assist if you provide the required details. If the issue is resolved then can you please close the case from your end?
the env i had is oracle linux (kernel 3.10.0-1062.el7.x86_64), packages were installed below:
[blin@mich bin]$ rpm -aq|grep mysql mysql-community-devel-8.0.25-1.el7.x86_64 mysql-connector-c++-devel-8.0.26-1.el7.x86_64 mysql-release-el7-1.0-5.el7.x86_64 mysql-connector-java-8.0.25-1.el7.noarch mysql-community-libs-8.0.25-1.el7.x86_64 mysql-community-server-8.0.25-1.el7.x86_64 mysql-community-client-plugins-8.0.25-1.el7.x86_64 mysql-community-client-8.0.25-1.el7.x86_64 mysql-shell-8.0.25-1.el7.x86_64 mysql-community-libs-compat-8.0.25-1.el7.x86_64 mysql-connector-c++-8.0.26-1.el7.x86_64 mysql-connector-c++-jdbc-8.0.26-1.el7.x86_64 mysql-community-common-8.0.25-1.el7.x86_64
[blin@mich bin]$ rpm -aq|grep postgres postgresql13-13.3-1PGDG.rhel7.x86_64 postgresql-libs-9.2.24-7.el7_9.x86_64 postgresql13-server-13.3-1PGDG.rhel7.x86_64 postgresql-9.2.24-7.el7_9.x86_64 postgresql13-libs-13.3-1PGDG.rhel7.x86_64
on the step of $ make USE_PGXS=1 if referred to mysql-community-devel.x86_64 which doesnot work if executing make. it seems missing something either header(s) to make fdw compiled. it doesnt work either if i tried to yum mysql_fdw_13.x86_64 i got following messages:
[root@mich mysql]# yum install mysql_fdw_13.x86_64 mariadb-devel.x86_64 Loaded plugins: aliases, changelog, kabi, langpacks, tmprepo, ulninfo, verify, versionlock Loading support for kernel ABI Package 1:mariadb-devel-5.5.68-1.el7.x86_64 is obsoleted by mysql-community-devel-8.0.26-1.el7.x86_64 which is already installed Resolving Dependencies --> Running transaction check ---> Package mysql_fdw_13.x86_64 0:2.6.0-1.rhel7 will be installed --> Processing Dependency: mariadb-devel for package: mysql_fdw_13-2.6.0-1.rhel7.x86_64 Package 1:mariadb-devel-5.5.68-1.el7.x86_64 is obsoleted by mysql-community-devel-8.0.26-1.el7.x86_64 which is already installed --> Finished Dependency Resolution Error: Package: mysql_fdw_13-2.6.0-1.rhel7.x86_64 (pgdg13) Requires: mariadb-devel Available: 1:mariadb-devel-5.5.56-2.el7.i686 (ol7_latest) mariadb-devel = 1:5.5.56-2.el7 Available: 1:mariadb-devel-5.5.60-1.el7_5.i686 (ol7_latest) mariadb-devel = 1:5.5.60-1.el7_5 Available: 1:mariadb-devel-5.5.64-1.el7.i686 (ol7_latest) mariadb-devel = 1:5.5.64-1.el7 Available: 1:mariadb-devel-5.5.65-1.el7.i686 (ol7_latest) mariadb-devel = 1:5.5.65-1.el7 Available: 1:mariadb-devel-5.5.68-1.el7.i686 (ol7_latest) mariadb-devel = 1:5.5.68-1.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest