Bug 259047 - databases/clickhouse: port to FreeBSD aarch64
Summary: databases/clickhouse: port to FreeBSD aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-10 14:31 UTC by Mikael Urankar
Modified: 2021-11-09 10:23 UTC (History)
2 users (show)

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


Attachments
v0 (11.38 KB, patch)
2021-10-10 14:31 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-10-12 07:21:00 UTC
submitter is committer.
Comment 2 Oleg Ginzburg 2021-10-13 11:08:46 UTC
LGTM.

However I was only able to check x86-64 build ( via poudriere ).

I do not have the appropriate hardware to check the aarch64. I have tried using qemu-user-static and try to build clickhouse in aarch64 jail:

% uname -ma
FreeBSD arm64.my.domain 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  arm64

but got an error:
--
FAILED: contrib/openldap-cmake/lber-version.c /tmp/usr/ports/databases/clickhouse/work/ClickHouse-21.7.4.18-stable/contrib/openldap-cmake/lber-version.c 
cd /tmp/usr/ports/databases/clickhouse/work/ClickHouse-21.7.4.18-stable/contrib/openldap && /usr/local/bin/cmake -E env bash -c "/tmp/usr/ports/databases/clickhouse/work/ClickHouse-21.7.4.18-stable/contrib/openldap/build/mkversion -v '2.5.X' liblber.la > \"/tmp/usr/ports/databases/clickhouse/work/ClickHouse-21.7.4.18-stable/contrib/openldap-cmake/lber-version.c\""
bash: /tmp/usr/ports/databases/clickhouse/work/ClickHouse-21.7.4.18-stable/contrib/openldap/build/mkversion: /bin/sh: bad interpreter: No such file or directory
--

although:
--
file -s /bin/sh
/bin/sh: ELF 64-bit LSB executable, ARM aarch64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.0 (1300139), FreeBSD-style, stripped

arm64:/ # sh
# echo "just work"
just work
#
--

I don't mind trying these changes on a FreeBSD aarch64 build cluster, for amd64 architecture nothing changes.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-11-08 18:40:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=752601257a53022940feb142be2943d839d016d9

commit 752601257a53022940feb142be2943d839d016d9
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2021-11-08 18:38:59 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-11-08 18:38:59 +0000

    databases/clickhouse: Port to aarch64.

    PR:             259047
    Approved by:    Oleg Ginzburg (maintainer)

 databases/clickhouse/Makefile                      |  5 +-
 .../files/patch-cmake_find_ldap.cmake (new)        | 10 +++
 ...trib_boringssl_crypto_cpu-aarch64-linux.c (new) | 75 ++++++++++++++++++++++
 ...oc_internal_jemalloc__internal__defs.h.in (new) | 11 ++++
 ...atch-contrib_rocksdb-cmake_CMakeLists.txt (new) | 14 ++++
 .../patch-contrib_rocksdb_CMakeLists.txt (new)     | 13 ++++
 .../patch-contrib_rocksdb_util_crc32c.cc (new)     | 38 +++++++++++
 ...tch-contrib_rocksdb_util_crc32c__arm64.cc (new) | 45 +++++++++++++
 .../files/patch-src_Common_StackTrace.cpp (new)    | 11 ++++
 9 files changed, 220 insertions(+), 2 deletions(-)