• Icon: Bug Bug
    • Resolution: Can't Do
    • Icon: Undefined Undefined
    • None
    • CentOS Stream 9
    • qemu-kvm
    • None
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • s390x
    • None

      What were you trying to do that didn't work?

      Try to compile manticore search with CLANG.

      Please provide the package NVR for which bug is seen:

      16.0.6-1.el9

      How reproducible:

      always

      Steps to reproduce

      1. podman run --rm -ti --entrypoint /bin/sh quay.io/centos/centos:stream9
      2. in the container:
        export SEARCHD_REF=6.2.12 SEARCHD_REPO=https://github.com/manticoresoftware/manticoresearch.git CC=clang-16 CXX=clang++-16 BUILD_PATH=/tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues BUILD_FLAGS="-DUSE_SYSLOG=0 -DWITH_GALERA=0 -DWITH_RE2=0 -DWITH_STEMMER=0 -DWITH_ICU=1 -DWITH_SSL=1 -DWITH_ZLIB=1 -DWITH_ODBC=0 -DWITH_EXPAT=0 -DWITH_ICONV=1 -DWITH_POSTGRESQL=0 -DWITH_MYSQL=0 -DBUILD_TESTING=0"
        mkdir /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues
        cd /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues
        yum install -y --setopt=skip_missing_names_on_install=False,tsflags=nodocs llvm-toolset mysql cmake boost-devel openssl-devel zlib-devel bison flex systemd-units rpm-build git
        git clone --depth=1 --branch=$SEARCHD_REF $SEARCHD_REPO .
        sed -i -e 's/Boost_USE_STATIC_LIBS ON/Boost_USE_STATIC_LIBS OFF/' src/CMakeLists.txt
        mkdir build && cd build
        cmake $BUILD_FLAGS ..
        cmake --build . --target package --config RelWithDebInfo
        

      Expected results

      compilation to succeed

      Actual results

      CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
        The C compiler
      
          "/usr/bin/clang-16"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues/build/CMakeFiles/CMakeTmp
          
          Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f787f/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_f787f.dir/build.make CMakeFiles/cmTC_f787f.dir/build
          gmake[1]: Entering directory '/tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues/build/CMakeFiles/CMakeTmp'
          Building C object CMakeFiles/cmTC_f787f.dir/testCCompiler.c.o
          /usr/bin/clang-16 -DcmTC_f787f_EXPORTS   -o CMakeFiles/cmTC_f787f.dir/testCCompiler.c.o -c /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues/build/CMakeFiles/CMakeTmp/testCCompiler.c
          clang-16: error: unknown argument: '-o'
          clang-16: error: unknown argument: '-c'
          clang-16: error: no such file or directory: 'CMakeFiles/cmTC_f787f.dir/testCCompiler.c.o'
          gmake[1]: ***
      

      I believe this issue is same as the Fedora issue:
      https://bugzilla.redhat.com/show_bug.cgi?id=2209635
      https://gitlab.com/qemu-project/qemu/-/issues/1668

      Because at one of the attempts I've got an error message that I'm not anymore sure how to reproduce

      clang-16: error: unsupported option '--driver-mode=g++'; did you mean '--driver-mode=g++'?
      

      Here's a full build log of github action:
      https://github.com/3scale/searchd/actions/runs/6771898825/job/18403305343

              virt-maint virt-maint
              akostadi1@redhat.com Aleksandar Kostadinov
              virt-maint virt-maint
              Virtualization Quality Engineering IBM Z Virtualization Quality Engineering IBM Z
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: