Bug 213902 - databases/mariadb101-server: Fails to build if Mroonga FTS engine enabled
Summary: databases/mariadb101-server: Fails to build if Mroonga FTS engine enabled
Status: Closed FIXED
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: 2016-10-29 22:54 UTC by Peter Jeremy
Modified: 2016-11-12 00:50 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy freebsd_committer freebsd_triage 2016-10-29 22:54:26 UTC
Enabling MROONGA adds a dependency on archivers/liblz4 but the MariaDB build system does not correctly link against liblz4, causing the build to fail:

--- storage/mroonga/CMakeFiles/mroonga.dir/all ---
--- storage/mroonga/ha_mroonga.so ---
[ 89%] Linking CXX shared module ha_mroonga.so
cd /var/obj/usr/ports/databases/mariadb101-server/work/mariadb-10.1.18/storage/mroonga && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mroonga.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC -O2 -pipe -fstack-protector -fno-strict-aliasing -DWITH_INNODB_DISALLOW_WRITES -fno-exceptions -fno-rtti -O2 -pipe -fstack-protector -fno-strict-aliasing -DDBUG_OFF  -Wl,-rpath,/usr/local/lib -fstack-protector -shared  -o ha_mroonga.s
o CMakeFiles/mroonga.dir/ha_mroonga.cpp.o CMakeFiles/mroonga.dir/mrn_table.cpp.o CMakeFiles/mroonga.dir/udf/mrn_udf_last_insert_grn_id.cpp.o CMakeFiles/mroonga.dir/udf/mrn_udf_snippet.cpp.o CMakeFiles/mroonga.dir/udf/mrn_udf_command.cpp.o CMakeFiles/mroo
nga.dir/udf/mrn_udf_escape.cpp.o CMakeFiles/mroonga.dir/lib/mrn_match_escalation_threshold_scope.cpp.o CMakeFiles/mroonga.dir/lib/mrn_path_mapper.cpp.o CMakeFiles/mroonga.dir/lib/mrn_smart_grn_obj.cpp.o CMakeFiles/mroonga.dir/lib/mrn_index_table_name.cpp
.o CMakeFiles/mroonga.dir/lib/mrn_index_column_name.cpp.o CMakeFiles/mroonga.dir/lib/mrn_debug_column_access.cpp.o CMakeFiles/mroonga.dir/lib/mrn_auto_increment_value_lock.cpp.o CMakeFiles/mroonga.dir/lib/mrn_external_lock.cpp.o CMakeFiles/mroonga.dir/li
b/mrn_multiple_column_key_codec.cpp.o CMakeFiles/mroonga.dir/lib/mrn_field_normalizer.cpp.o CMakeFiles/mroonga.dir/lib/mrn_encoding.cpp.o CMakeFiles/mroonga.dir/lib/mrn_parameters_parser.cpp.o CMakeFiles/mroonga.dir/lib/mrn_lock.cpp.o CMakeFiles/mroonga.
dir/lib/mrn_condition_converter.cpp.o CMakeFiles/mroonga.dir/lib/mrn_time_converter.cpp.o CMakeFiles/mroonga.dir/lib/mrn_database_manager.cpp.o CMakeFiles/mroonga.dir/lib/mrn_value_decoder.cpp.o CMakeFiles/mroonga.dir/lib/mrn_database_repairer.cpp.o -pth
read ../../libservices/libmysqlservices.a vendor/groonga/lib/libgroonga.a vendor/groonga/vendor/plugins/groonga-normalizer-mysql/normalizers/libmysql_normalizer.a vendor/groonga/lib/libgroonga.a -pthread -lexecinfo -lrt -lpthread -lz -llz4 -lm -lstdc++ 
/usr/bin/ld: cannot find -llz4
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [storage/mroonga/ha_mroonga.so] Error code 1

(Whilst there's a runtime reference to liblz4 being in /usr/local/lib, there's no -L/usr/local/lib so liblz4.so isn't found).

I've tried this on both 10-stable and 11-stable with identical results.
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2016-11-12 00:43:54 UTC
Hi Peter,

I fixed an lz4 issue with the 10.1.19 ports #r425916 but failed to reference this PR.
Can you please check if your issue is fixed?

Thanks,

Bernard.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-11-12 00:50:07 UTC
A commit references this bug:

Author: brnrd
Date: Sat Nov 12 00:49:05 UTC 2016
New revision: 425917
URL: https://svnweb.freebsd.org/changeset/ports/425917

Log:
  MFH: r424132 r425398 r425916

  databases/mariadb101-server: Update to 10.1.18

    - Regular update to 10.1.18

  Fix data encryption at rest when building with LibreSSL

  Replace RAND_SSLeay->bytes with arc4random_buf when using LibreSSL, as
  it supports RAND_SSLeay only for ABI compatibility [0].

  Note that the code in question in mariadb mentions that RAND_bytes
  isn't guaranteed to not block and therefore uses these functions directly.
  As LibreSSL implements RAND_bytes in terms of arc4random_buf, which
  shouldn't block, the patch could also use RAND_bytes instead of
  using arc4random_buf directly, but the current version of the patch
  has been tested in production and might be less confusing overall.

  Bumped revision, as this fixes a runtime problem.

  [0]
  https://github.com/libressl/libressl/blob/master/src/crypto/rand/rand_lib.c#L36

  PR:		213577
  Approved by:	ssl blanket

  databases/mariadb101-server: Update to 10.1.19

    - Update to 10.1.19
    - Use target-OPT-on not .if exists
    - Remove OQGraph patches now included upstream

  PR:		213902
  Security:	9bc14850-a070-11e6-a881-b499baebfeaf

  Approved by:	ports-secteam (junovitch)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/databases/mariadb101-server/Makefile
  branches/2016Q4/databases/mariadb101-server/distinfo
  branches/2016Q4/databases/mariadb101-server/files/patch-mysys_ssl-my_crypt.cc
  branches/2016Q4/databases/mariadb101-server/files/patch-storage_oqgraph_graphcore.cc
  branches/2016Q4/databases/mariadb101-server/files/patch-storage_oqgraph_oqgraph__shim.h