Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22812

"failed to create symbolic link" during the build

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.4
    • 10.5.4
    • Compiling
    • Ubuntu 18.04, gcloud instance 32 cores

    Description

      10.5.4 9c55f83eaedc4fdb1c1e5538646b0a9325f670fb

      ...build...
      [100%] Built target mariadb-backup
      CPack: Create package using TGZ
      CPack: Install projects
      CPack: - Run preinstall target for: MySQL
      CPack: - Install project: MySQL
      failed to create symbolic link 'bin/mariadb-config': No such file or directory
      CPack: Create package
      CPack: - package: /test/10.5_opt/mariadb-10.5.4-linux-x86_64.tar.gz generated.
      

      Reason:

      /test/MD050620-mariadb-10.5.4-linux-x86_64-opt$ ls bin/mariadb*-*config
      ls: cannot access 'bin/mariadb-config': No such file or directory
      /test/MD050620-mariadb-10.5.4-linux-x86_64-opt$ ls bin/mariadb*_*config
      bin/mariadb_config
      

      i.e. - vs _. Likely recent change or typo.

      10.4 not affected.

      Build command used & full deterministic testcase:

      git clone --depth=1 --recurse-submodules -j8 --branch=10.5 https://github.com/MariaDB/server.git 10.5
      cp -r 10.5 10.5_opt
      cd 10.5_opt
      cmake . -DWITH_SSL=bundled -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DDEBUG_EXTNAME=OFF -DWITH_EMBEDDED_SERVER=0 -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost_135307 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_ZLIB=bundled -DWITH_ROCKSDB=1 -DWITH_PAM=ON -DWITH_WSREP=ON -DWITH_INNODB_DISALLOW_WRITES=ON -DFORCE_INSOURCE_BUILD=1
      make -j 32
      ./scripts/make_binary_distribution
      

      List of most libs previously installed, in case it matters (unlikely), on Ubuntu 18.04:

       sudo apt-get install -y build-essential man-db patch make cmake automake autoconf git gcc libtool bison openssl lshw lzma lzma-dev git linux-headers-generic g++ libncurses5-dev libaio1 libaio-dev libjemalloc1 libjemalloc-dev libdbd-mysql libssl-dev libgtest-dev zlib1g zlib1g-dbg zlib1g-dev libreadline-dev libreadline7-dbg debhelper devscripts pkg-config dpkg-dev lsb-release libpam0g-dev libcurl4-openssl-dev libssh-dev fail2ban libz-dev libgcrypt20 libgcrypt20-dev libssl-dev libboost-all-dev python-mysqldb libbz2-dev gnutls-dev libbsd-dev libedit-dev liblz4-dev chrpath dh-apparmor dh-exec dh-systemd libcrack2-dev libcurl4-openssl-dev libjudy-dev libkrb5-dev libpcre2-dev libsnappy-dev libsystemd-dev libxml2-dev libzstd-dev unixodbc-dev uuid-dev 

      Attachments

        Issue Links

          Activity

            it's in cmake/mariadb_connector_c.cmake:46

            IF(UNIX)
              INSTALL(CODE "EXECUTE_PROCESS(
                              COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_BINDIR}
                              COMMAND ${CMAKE_COMMAND} -E create_symlink mariadb_config ${INSTALL_BINDIR}/mariadb-config // Sergei Golubchik 2 months ago MDEV-22003 
                              WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX})"
                      COMPONENT Development)
            ENDIF()
            

            abychko Alexey Bychko (Inactive) added a comment - it's in cmake/mariadb_connector_c.cmake:46 IF(UNIX) INSTALL(CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_BINDIR} COMMAND ${CMAKE_COMMAND} -E create_symlink mariadb_config ${INSTALL_BINDIR}/mariadb-config // Sergei Golubchik 2 months ago MDEV-22003 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX})" COMPONENT Development) ENDIF()
            elenst Elena Stepanova added a comment - - edited

            If I understand the logic correctly, it's the other way round – it attempts to create a symlink called bin/mariadb-config (to the file mariadb_config). And fails, on whatever reason. We saw it in buildbot in one of builders even in March. At that point it was a sporadic failure – that is, in one build it goes all right, next one fails, then again all right. There was a suggestion then that some sort of a race condition is involved in symlink creation. I don't know if it still happens in buildbot, that builder was replaced, and it's the kind of problem which is [nearly] impossible to search for with the structure of the old buildbot.

            elenst Elena Stepanova added a comment - - edited If I understand the logic correctly, it's the other way round – it attempts to create a symlink called bin/mariadb-config (to the file mariadb_config ). And fails, on whatever reason. We saw it in buildbot in one of builders even in March. At that point it was a sporadic failure – that is, in one build it goes all right, next one fails, then again all right. There was a suggestion then that some sort of a race condition is involved in symlink creation. I don't know if it still happens in buildbot, that builder was replaced, and it's the kind of problem which is [nearly] impossible to search for with the structure of the old buildbot.

            I can't reproduce it on 8cores VM, so yes, it may be race condition

            abychko Alexey Bychko (Inactive) added a comment - I can't reproduce it on 8cores VM, so yes, it may be race condition

            I cannot reproduce it either

            serg Sergei Golubchik added a comment - I cannot reproduce it either

            Thank you Sergei for the fix. I can confirmed this is fixed (opt+dbg tested)

            10.5.4 07d1c8567cbfe94398a9857c47fb9919cad42651

            [100%] Built target mariadb-backup
            CPack: Create package using TGZ
            CPack: Install projects
            CPack: - Run preinstall target for: MySQL
            CPack: - Install project: MySQL
            CPack: Create package
            CPack: - package: /test/10.5_opt/mariadb-10.5.4-linux-x86_64.tar.gz generated.
            

            Roel Roel Van de Paar added a comment - Thank you Sergei for the fix. I can confirmed this is fixed (opt+dbg tested) 10.5.4 07d1c8567cbfe94398a9857c47fb9919cad42651 [100%] Built target mariadb-backup CPack: Create package using TGZ CPack: Install projects CPack: - Run preinstall target for: MySQL CPack: - Install project: MySQL CPack: Create package CPack: - package: /test/10.5_opt/mariadb-10.5.4-linux-x86_64.tar.gz generated.

            People

              serg Sergei Golubchik
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.