Bug 233514 - databases/mariadb103-server: fails to build on 11.2
Summary: databases/mariadb103-server: fails to build on 11.2
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-25 19:10 UTC by doctor
Modified: 2018-11-27 06:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doctor 2018-11-25 19:10:26 UTC
2 issues

1) int64_t is not recognised in one section.

2)  Please create a mongodb compile option.
Comment 1 doctor 2018-11-25 19:23:28 UTC
additional:

1) in ../work/mariadb-10.3.11/storage/connect/value.h

Around line 115  I have to add 

virtual void SetValue(int64_t) {assert(false)} ;  

to continue compiling.

2) 

In a source code compile I add

-DCONNECT-WITH-MONGO=OFF to get mariadb to compile.

Can we set a compile option for in the configuration section?

I am willing to test a patch for the 2 above situations.
Comment 2 w.schwarzenfeld freebsd_triage 2018-11-25 19:36:49 UTC
mariadb103 server or client?
Comment 3 Bernard Spil freebsd_committer 2018-11-25 19:44:02 UTC
Hi doctor,

Can you provide poudriere logs? (or build logs, and output of uname -a, make showconfig)
Comment 4 doctor 2018-11-26 01:27:51 UTC
server and I use portmaster 

uname -a
FreeBSD doctor.nl2k.ab.ca 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


make config
===> The following configuration options are available for mariadb103-server-10.3.11:
     CONNECT_EXTRA=on: Enable ODBC and XML in CONNECT engine
     DOCS=on: Build and/or install documentation
     WSREP=on: Build wsrep clustering
====> Optional page compression
     LZ4=off: LZ4 compression support
     LZO=off: LZO compression support
     SNAPPY=off: Snappy compression library support
     ZSTD=off: Zstandard compression support (RocksDB only)
====> Optional MariaDB storage engines
     INNOBASE=on: InnoDB default engine
     MROONGA=off: Mroonga Full Text Search engine
     OQGRAPH=off: Open Query Graph Computation engine
     ROCKSDB=off: RocksDB LSM engine (Alpha)
     SPHINX=on: SphinxSE engine
     SPIDER=on: Partitioning and XA-transactions engine
     TOKUDB=off: Fractal tree index tree data structure engine
====> Optional Mroonga features
     ZMQ=off: ZeroMQ support
     MSGPACK=off: MsgPack support
====> GSSAPI Security API support: you have to select exactly one of them
     GSSAPI_BASE=off: GSSAPI support via base system (needs Kerberos)
     GSSAPI_HEIMDAL=off: GSSAPI support via security/heimdal
     GSSAPI_MIT=off: GSSAPI support via security/krb5
     GSSAPI_NONE=on: Disable GSSAPI support
===> Use 'make config' to modify these settings

Also can we get an option to turn MongoDB off?
Comment 5 Bernard Spil freebsd_committer 2018-11-26 09:07:51 UTC
Cannot reproduce. See build log with same options on 11.2-RELEASE-p3 https://brnrd.eu/poudriere/data/112amd64-svn/2018-11-24_17h13m04s/logs/mariadb103-server-10.3.11.log

You'll need to provide more information. When not building in a clean environment like with portmaster you're probably hit with cmake picking up bits and pieces from other installed ports (MongoDB?).

> //Compile CONNECT storage engine with MONGO support
> CONNECT_WITH_MONGO:BOOL=ON

So this should do the trick:
--- Makefile    (revision 485783)
+++ Makefile    (working copy)
@@ -87,6 +87,7 @@
                -DDEFAULT_SYSCONFDIR="${PREFIX}/etc" \
                -DWITH_JEMALLOC="system" \
                -DWITH_LIBWRAP=1 \
+               -DWITH_CONNECT_WITH_MONGO="OFF" \
                -DWITH_SSL="${OPENSSLBASE}" \
                -DWITH_UNIT_TESTS=0 \
                -DWITHOUT_DOCS=1 \

If you need an option, then it should also be functional when it's enabled. Please provide a working patch.
Comment 6 doctor 2018-11-26 18:37:58 UTC
OPtion might be better path to take.  Tried the Makefile patch however we have

 egrep MONGO work/m*11/*
work/mariadb-10.3.11/CMakeCache.txt://Compile CONNECT storage engine with MONGO support
work/mariadb-10.3.11/CMakeCache.txt:CONNECT_WITH_MONGO:BOOL=ON
work/mariadb-10.3.11/CMakeCache.txt:MONGOC_LIBRARY:FILEPATH=/usr/local/lib/libmongoc-1.0.so
work/mariadb-10.3.11/CMakeCache.txt:WITH_CONNECT_WITH_MONGO:UNINITIALIZED=OFF

The BOOL should be OFF not on.
Comment 7 doctor 2018-11-26 18:40:19 UTC
BTW You missed my point about using the pure source and how I adjusted the source to compile Mariadb 10.3.11 from source.  Mongodb is added into Mariadb 10.3.11 as part of the package.
Comment 8 Bernard Spil freebsd_committer 2018-11-26 19:07:27 UTC
(In reply to doctor from comment #7)
I don't think I did... I maintain the port and am not responsible for builds from an unpacked tarball, that's MariaDB's responsibility (they do respond on jira.mariadb.org). I cannot reproduce your reported issue with int64_t. The port builds OK in a clean build environment (poudriere). There's not even output of your build that I can work with. The MariaDB build system is too clever, there's no end to the list of knobs that need to be added (like CONNECT-WITH-MONGO) to switch things off that potentially could build when cmake finds them.

The patch is indeed botched. It should read

+               -DCONNECT_WITH_MONGO="OFF" \

as you correctly stated in Comment 1.

PS. You could capture your build logs with something like `script build.log` and then running `make clean && make all`. I can't promise that I can actually fix the problem that you're experiencing with such output but the literal error messages are important. I can't go and add a random line at an approximate location in some file for an error I cannot reproduce and add that patch to the port.
Comment 9 doctor 2018-11-26 20:02:16 UTC
 diff Makefile Makefile.orig
47c47
< OPTIONS_GROUP_ENGINES=        INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB MONGODB 
---
> OPTIONS_GROUP_ENGINES=        INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB  
63d62
< MONGODB_DESC= MongoDB addon from MariaDB
162d160
< MONGODB_CMAKE_OFF=    -DCONNECT_WITH_MONGO=OFF
root@doctor:/usr/ports/databases/mariadb103-server # diff Makefile.orig Makefile
47c47
< OPTIONS_GROUP_ENGINES=        INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB  
---
> OPTIONS_GROUP_ENGINES=        INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB MONGODB 
62a63
> MONGODB_DESC= MongoDB addon from MariaDB
160a162
> MONGODB_CMAKE_OFF=    -DCONNECT_WITH_MONGO=OFF

Makefile.orig you file and Makefile is the I added so that MONGODB is an option and it works.  So how does that translate into a patch?
Comment 10 doctor 2018-11-26 21:57:34 UTC
upon reading  Here is the patch that should work

--- Makefile.orig       2018-11-26 12:59:11.069137000 -0700
+++ Makefile    2018-11-26 11:46:33.605780000 -0700
@@ -44,7 +44,7 @@
 OPTIONS_DEFINE=                CONNECT_EXTRA DOCS
 OPTIONS_DEFINE_amd64=  WSREP
 OPTIONS_GROUP_COMPRESSION=     LZ4 LZO SNAPPY ZSTD
-OPTIONS_GROUP_ENGINES= INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB  
+OPTIONS_GROUP_ENGINES= INNOBASE MROONGA OQGRAPH ROCKSDB SPHINX SPIDER TOKUDB MONGODB 
 OPTIONS_GROUP_GROONGA= ZMQ MSGPACK
 OPTIONS_EXCLUDE_i386=  TOKUDB
 
@@ -60,6 +60,7 @@
 SPHINX_DESC=   SphinxSE engine
 SPIDER_DESC=   Partitioning and XA-transactions engine
 TOKUDB_DESC=   Fractal tree index tree data structure engine
+MONGODB_DESC=  MongoDB addon from MariaDB
 WSREP_DESC=    Build wsrep clustering
 ZMQ_DESC=      ZeroMQ support
 ZSTD_DESC+=    Zstandard compression support (RocksDB only)
@@ -158,6 +159,7 @@
 TOKUDB_IMPLIES=                SNAPPY
 TOKUDB_PORTDOCS=       README.md
 TOKUDB_VARS=           LICENSE+=PerconaFT LICENSE_COMB=multi
+MONGODB_CMAKE_OFF=     -DCONNECT_WITH_MONGO=OFF
 WSREP_CMAKE_OFF=       -DWITH_WSREP=OFF
 WSREP_LIB_DEPENDS=     libgalera.so:databases/galera
 ZMQ_LIB_DEPENDS=       libzmq.so:net/libzmq4
Comment 11 w.schwarzenfeld freebsd_triage 2018-11-26 23:14:22 UTC
Please, send a build.log.  Install sysutils/screen and start it with screen -L (if you work with sudo - sudo screen -L. After build you will find a screenlog.0 file in the port.

They should solved in the code and not in the port Makefile.
Comment 12 w.schwarzenfeld freebsd_triage 2018-11-26 23:15:17 UTC
Corr: The error(s) instead of they.
Comment 13 w.schwarzenfeld freebsd_triage 2018-11-26 23:21:59 UTC
Forget: after build, you have to type exit to leave the screen session.
Comment 14 doctor 2018-11-27 05:06:58 UTC
screen or script?
Comment 15 w.schwarzenfeld freebsd_triage 2018-11-27 06:07:52 UTC
I does not matter script or screen, like you want.