I'm trying to get a port of MariaDB 10.11 working on FreeBSD 12.4. First, I'm a 25 year FreeBSD user, but not a C programmer. I work in the FreeBSD, Apache, MariaDB, PHP world. I want a feature that's in MariaDB 10.11 that's not in 10.6 (the latest in the ports, seems 10-7 thru 10.10 skipped, 10.11 is long term support released 2023/02).
I set up a test box and have copied what's in the 10.6 port to 10.11 and made adjustments to Makefile, patches, etc. I have made it as far as having make build and install mariadb1011-client, but it fails on linking of mysqltest 65% of the way building the server. The failure is on (complete c++ command at bottom):
Yet at the beginning of the build they're found:
And the libraries are in /usr/local/lib:
If someone could throw me a bone on where to look from here, it would be much appreciated!
Complete c++ command that fails:
I set up a test box and have copied what's in the 10.6 port to 10.11 and made adjustments to Makefile, patches, etc. I have made it as far as having make build and install mariadb1011-client, but it fails on linking of mysqltest 65% of the way building the server. The failure is on (complete c++ command at bottom):
Code:
ld: error: unable to find library -lpcre2-posix
ld: error: unable to find library -lpcre2-8
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Yet at the beginning of the build they're found:
Code:
===> Extracting for mariadb1011-server-10.11.2
=> SHA256 Checksum OK for mariadb-10.11.2.tar.gz.
===> Patching for mariadb1011-server-10.11.2^M
===> Applying FreeBSD patches for mariadb1011-server-10.11.2 from /usr/ports/databases/mariadb1011-server/files
===> mariadb1011-server-10.11.2 depends on executable: bison - found
===> mariadb1011-server-10.11.2 depends on file: /usr/local/bin/cmake - found
===> mariadb1011-server-10.11.2 depends on executable: ninja - found
===> mariadb1011-server-10.11.2 depends on file: /usr/local/bin/python3.9 - found
===> mariadb1011-server-10.11.2 depends on shared library: libpcre2-8.so - found (/usr/local/lib/libpcre2-8.so)
===> mariadb1011-server-10.11.2 depends on shared library: libpcre2-posix.so - found (/usr/local/lib/libpcre2-posix.so)
And the libraries are in /usr/local/lib:
Code:
rw-r--r-- 1 root wheel 1067360 Mar 7 17:16 /usr/local/lib/libpcre2-8.a
lrwxr-xr-x 1 root wheel 20 Mar 7 17:16 /usr/local/lib/libpcre2-8.so@ -> libpcre2-8.so.0.11.2
lrwxr-xr-x 1 root wheel 20 Mar 7 17:16 /usr/local/lib/libpcre2-8.so.0@ -> libpcre2-8.so.0.11.2
-rwxr-xr-x 1 root wheel 759336 Mar 7 17:16 /usr/local/lib/libpcre2-8.so.0.11.2*
-rw-r--r-- 1 root wheel 8154 Mar 7 17:16 /usr/local/lib/libpcre2-posix.a
lrwxr-xr-x 1 root wheel 23 Mar 7 17:16 /usr/local/lib/libpcre2-posix.so@ -> libpcre2-posix.so.3.0.4
lrwxr-xr-x 1 root wheel 23 Mar 7 17:16 /usr/local/lib/libpcre2-posix.so.3@ -> libpcre2-posix.so.3.0.4
If someone could throw me a bone on where to look from here, it would be much appreciated!
Complete c++ command that fails:
Code:
[ 65% 1672/2534] /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_DLOPEN -DHAVE_OPENSSL -Dmariadb_test_EXPORTS -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/
libmariadb/include -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/wsrep-lib/include -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.
2/wsrep-lib/wsrep-API/v26 -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/include -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/i
nclude/providers -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/mysys_ssl -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/sql -I/u
sr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/strings -I/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/client -I/usr/local/include/edi
tline -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fstack-protector --param=ssp-buffer-size=
4 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -is
ystem /usr/local/include -std=gnu++11 -DTHREADS -MD -MT client/CMakeFiles/mariadb-test.dir/mysqltest.cc.o -MF client/CMakeFiles/mariadb-test.dir/mysqltest.cc.o.d
-o client/CMakeFiles/mariadb-test.dir/mysqltest.cc.o -c /usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/client/mysqltest.cc
[ 65% 1673/2534] : && /usr/bin/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fstack-prote
ctor --param=ssp-buffer-size=4 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -D_FORT
IFY_SOURCE=2 -DDBUG_OFF -L/usr/local/lib, -Wl,-z,notext -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,--export-dynamic client/CMakeFiles/mariadb-test.dir/m
ysqltest.cc.o client/CMakeFiles/mariadb-test.dir/__/sql/sql_string.cc.o -o client/mariadb-test -pthread libmariadb/libmariadb/libmariadbclient.a mysys/libmysy
s.a -lpcre2-posix -lpcre2-8 -lssl -lcrypto dbug/libdbug.a strings/libstrings.a mysys/libmysys.a dbug/libdbug.a strings/libstrings.a -lm -lz -lexecinf
o -pthread && cd /usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/client && /usr/local/bin/cmake -E create_symlink mariadb-test mysqltes
^[[31mFAILED: ^[[0mclient/mariadb-test
: && /usr/bin/c++ -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fstack-protector --param=ssp-
buffer-size=4 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -D_FORTIFY_SOURCE=2 -DDB
UG_OFF -L/usr/local/lib, -Wl,-z,notext -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,--export-dynamic client/CMakeFiles/mariadb-test.dir/mysqltest.cc.o cli
ent/CMakeFiles/mariadb-test.dir/__/sql/sql_string.cc.o -o client/mariadb-test -pthread libmariadb/libmariadb/libmariadbclient.a mysys/libmysys.a -lpcre2-posi
x -lpcre2-8 -lssl -lcrypto dbug/libdbug.a strings/libstrings.a mysys/libmysys.a dbug/libdbug.a strings/libstrings.a -lm -lz -lexecinfo -pthread && cd
/usr/ports/databases/mariadb1011-server/work/mariadb-10.11.2/client && /usr/local/bin/cmake -E create_symlink mariadb-test mysqltest
ld: error: unable to find library -lpcre2-posix
ld: error: unable to find library -lpcre2-8
c++: error: linker command failed with exit code 1 (use -v to see invocation)