Package Details: mysql-shell 8.0.25-1

Git Clone URL: https://aur.archlinux.org/mysql-shell.git (read-only, click to copy)
Package Base: mysql-shell
Description: An interface supporting development and administration for the MySQL Server
Upstream URL: https://dev.mysql.com/downloads/shell/
Keywords: mysqlsh
Licenses: GPL
Submitter: rdoursenaud
Maintainer: None
Last Packager: FrederickZh
Votes: 3
Popularity: 0.006695
First Submitted: 2018-06-15 10:18 (UTC)
Last Updated: 2021-05-11 08:56 (UTC)

Latest Comments

elamperti commented on 2023-04-02 16:17 (UTC) (edited on 2023-04-02 16:18 (UTC) by elamperti)

Requires a newer version of v8, I've tried some workarounds but it may require updating or creating other dependencies (which I don't have time to do right now). It also seems to depend on antlr4, which can be solved by installing antlr4-runtime and patching mysql-shell's CMakeLists.txt to accept v4.11

sed -i 's/ANTLR4_VERSION_SHORT VERSION_EQUAL "4.10"/ANTLR4_VERSION_SHORT VERSION_EQUAL "4.11"/' CMakeLists.txt

The GPG key changed as well, now it should be using 859BE8D7C586F538430B19C2467B942D3A79BD29 (source)

Hopefully someone can take it from here. And btw, thanks @FrederickZh for your previous work.

FrederickZh commented on 2022-06-15 12:41 (UTC) (edited on 2022-08-31 14:14 (UTC) by FrederickZh)

I'm having trouble building v8 for this. The newer version needs v8 8.5.210.20.

I wasn't able to build [1] directly. I also tried building [2] but got

../../src/base/platform/platform-posix.cc:759:59: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Werror,-Wsign-compare]
  if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < PTHREAD_STACK_MIN) {
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
../../src/base/platform/platform-posix.cc:760:19: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
    stack_size_ = PTHREAD_STACK_MIN;
                ~ ^~~~~~~~~~~~~~~~~
/usr/include/bits/pthread_stack_min-dynamic.h:26:30: note: expanded from macro 'PTHREAD_STACK_MIN'
#   define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

(IIRC this was the same error as what I got building latest... I should probably install clang and try again...)

I'll have to find some other time to dig deeper. In the meanwhile any help is appreciated.

Edit: Installed clang and got the same error again. And just noticed it seemed to have a bundled clang...

Edit 2: I can build but with icu71, I got tons of test failures...

==> Starting build()...
ninja: Entering directory `out.gn/x64.release/'
[1531/1531] LINK ./cctest
==> Starting check()...
Build found: /mnt/v8/src/v8/out.gn/x64.release
>>> Autodetected:
pointer_compression
>>> Running tests for x64.debug
>>> Running with test processors
=== cctest/test-api-icu/LocaleConfigurationChangeNotification ===
#
# Fatal error in ../../test/cctest/test-api-icu.cc, line 20
# Check failed: v8_str(date)->StrictEquals( CompileRun("new Date('02/14/2020 13:45').toLocaleString()")).
#
#
#
#FailureMessage Object: 0x7ffda41ed340
==== C stack trace ===============================

    /mnt/v8/src/v8/out.gn/x64.release/cctest(v8::base::debug::StackTrace::StackTrace()+0x13) [0x55c230bb7483]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(+0x45980fd) [0x55c230bb60fd]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(V8_Fatal(char const*, int, char const*, ...)+0x153) [0x55c230b9f953]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(+0x1c6be2e) [0x55c22e289e2e]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(+0x1c6bc24) [0x55c22e289c24]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(CcTest::Run()+0x16e) [0x55c22e0304ce]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(main+0x362) [0x55c22e031a72]
    /usr/lib/libc.so.6(+0x232d0) [0x7ff9f7c3c2d0]
    /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7ff9f7c3c38a]
    /mnt/v8/src/v8/out.gn/x64.release/cctest(_start+0x25) [0x55c22e0301e5]
Command: out.gn/x64.release/cctest test-api-icu/LocaleConfigurationChangeNotification --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner
--- FAILED ---
=== intl/regress-1041319 ===
Received signal 11 <unknown> 000000000000

==== C stack trace ===============================

 [0x55d24a985ac4]
 [0x7f77b1851a40]
 [0x7f77b21dd873]
 [0x7f77b2146015]
 [0x7f77b214635b]
 [0x55d2497edff6]
 [0x55d24929ac59]
 [0x55d24929a779]
 [0x55d24a57a27f]
[end of stack trace]
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/regress-1041319.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
exit code: -11 [FFFFFFF5]
--- CRASHED ---
=== intl/regress-1074578 ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <March 8, 2020 at 5:00:00 PM MST>, found <March 8, 2020 at 5:00:00 PM PDT>.
  throw new Error(message);
  ^
Error: Failure: expected <March 8, 2020 at 5:00:00 PM MST>, found <March 8, 2020 at 5:00:00 PM PDT>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/regress-1074578.js:34:1
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/regress-1074578.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/regress-1107661 ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <latn>, found <armn>.
  throw new Error(message);
  ^
Error: Failure: expected <latn>, found <armn>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/regress-1107661.js:14:3
    at Array.forEach (<anonymous>)
    at /mnt/v8/src/v8/test/intl/regress-1107661.js:12:29
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/regress-1107661.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/regress-9312 ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure (Expected to see the same output from "no" and "nb".): expected <januar mandag>, found <January Monday>.
  throw new Error(message);
  ^
Error: Failure (Expected to see the same output from "no" and "nb".): expected <januar mandag>, found <January Monday>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/regress-9312.js:25:5
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/regress-9312.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/number-format/unified/percent ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <percent>, found <decimal>.
  throw new Error(message);
  ^
Error: Failure: expected <percent>, found <decimal>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/number-format/unified/percent.js:13:1
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/number-format/unified/percent.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/number-format/unified/style-unit ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <unit>, found <decimal>.
  throw new Error(message);
  ^
Error: Failure: expected <unit>, found <decimal>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/number-format/unified/style-unit.js:82:3
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/number-format/unified/style-unit.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/number-format/unified/unit-display ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <short>, found <undefined>.
  throw new Error(message);
  ^
Error: Failure: expected <short>, found <undefined>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/number-format/unified/unit-display.js:19:1
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/number-format/unified/unit-display.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
=== intl/relative-time-format/resolved-options-nu ===
Warning: unknown flag --enable-slow-asserts.
Try --help for options
/mnt/v8/src/v8/test/intl/assert.js:105: Error: Failure: expected <latn>, found <arab>.
  throw new Error(message);
  ^
Error: Failure: expected <latn>, found <arab>.
    at fail (/mnt/v8/src/v8/test/intl/assert.js:105:9)
    at assertEquals (/mnt/v8/src/v8/test/intl/assert.js:114:5)
    at /mnt/v8/src/v8/test/intl/relative-time-format/resolved-options-nu.js:6:1
Command: out.gn/x64.release/d8 --test test/intl/assert.js test/intl/utils.js test/intl/relative-time-format/resolved-options-nu.js --random-seed=730241407 --nohard-abort --enable-slow-asserts --verify-heap --testing-d8-test-runner --allow-natives-syntax
--- FAILED ---
[05:09|%  97|+ 16419|-   9]: Done
>>> 16930 base tests produced 16428 (97%) non-filtered tests
>>> 16428 tests ran
==> ERROR: A failure occurred in check().
    Aborting...

[1] https://aur.archlinux.org/packages/v8

[2] https://aur.archlinux.org/cgit/aur.git/commit/?h=v8&id=6b2bb1763db5d2ec81698ba84f3073f50cf2d5f1

FrederickZh commented on 2019-08-16 10:23 (UTC)

I managed to get it built with this PKGBUILD:

# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
pkgname=mysql-shell
pkgver=8.0.17
pkgrel=1
pkgdesc='An interface supporting development and administration for the MySQL Server'
arch=('x86_64' 'i686')
url="https://dev.mysql.com/downloads/shell/"
license=('GPL')
GTEST_VERSION="1.8.0"
source=(
    "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-$pkgver-src.tar.gz"
    "mysql-shell-$pkgver-src.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-shell-$pkgver-src.tar.gz"
    "https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-$pkgver.tar.gz"
    "mysql-boost-$pkgver.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-boost-$pkgver.tar.gz"
    "googletest-release-$GTEST_VERSION.zip::https://github.com/google/googletest/archive/release-$GTEST_VERSION.zip"
)
noextract=("googletest-release-$GTEST_VERSION.zip")
md5sums=(
    "8a1b15515ec6f3e21aa777bbfe77c721"
    "SKIP"
    "7472a25d91973cbba5d8a8f176a3080b"
    "SKIP"
    "adfafc8512ab65fd3cf7955ef0100ff5"
)
validpgpkeys=('A4A9406876FCBD3C456770C88C718D3B5072E1F5')
depends=('python2' 'openssl' 'protobuf')
makedepends=('v8-6.7-static' 'cmake' 'clang' 'zip' 'zlib' 'libsasl' 'rpcsvc-proto' 'python2' 'python2-colorama' 'python2-pylint' 'python2-lazy-object-proxy' 'python2-singledispatch' 'python2-wrapt' 'ninja' 'git' 'wget')

build() {
    msg2 "Configuring MySQL"
    cd "$srcdir/mysql-$pkgver"
    mkdir -p bld && cd $_
    cmake .. -DWITH_BOOST="../boost" -DWITH_SSL=system -DWITH_PROTOBUF=system
    cd "$srcdir/mysql-$pkgver/bld"
    msg2 "Building mysqlclient"
    cmake --build . --target mysqlclient
    msg2 "Building mysqlxclient"
    cmake --build . --target mysqlxclient

    msg2 "Configuring MySQL Shell"
    cd "$srcdir/$pkgname-$pkgver-src"
    mkdir -p bld && cd $_
    cmake .. \
        -DWITH_TESTS=1 \
        -DWITH_GMOCK="${srcdir}/googletest-release-$GTEST_VERSION.zip" \
        -DCMAKE_C_COMPILER=/usr/bin/clang \
        -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DMYSQL_SOURCE_DIR="$srcdir/mysql-$pkgver" \
        -DMYSQL_BUILD_DIR="$srcdir/mysql-$pkgver/bld" \
        -DHAVE_PYTHON=1 \
        -DHAVE_V8=1 \
        -DV8_INCLUDE_DIR="/usr/include" \
        -DV8_LIB_DIR="/usr/lib" \
        -DWITH_PROTOBUF="/usr"
    msg2 "Building MySQL Shell"
    make
}

package() {
    cd "$srcdir/$pkgname-$pkgver-src/bld"
    make DESTDIR="$pkgdir/" install
    cd "$srcdir/$pkgname-$pkgver-src"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

In terms of dependencies, I've pushed V8 6.7.288.46 to https://aur.archlinux.org/packages/v8-6.7-static/ however separating libmysqlclient and libmysqlxclient from the build process is still a quite tricky. Ideally we can make some effort to ship libmysqlxclient with https://aur.archlinux.org/packages/mysql/ and fix the missing header issues in the package atm, but since libmysql(x)client and mysqlsh have to share the same versions of libraries e.g. protobuf, we'd like to link both of them dynamically to system libraries so that intermediate static ones from MySQL won't be required for the Shell, but again finger crossed that can always work... So perhaps it's just better to build static libmysql(x)client in this package...

FrederickZh commented on 2019-08-05 06:56 (UTC)

Is it better to rename this package to mysql-shell-bin? Personally I would expect it to be built from source based on the naming.