• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.0
    • rhel-10.0
    • bcc
    • None
    • bcc-0.30.0-5.el10
    • No
    • Important
    • rhel-sst-kernel-tps
    • ssg_core_kernel
    • 12
    • 15
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      bcc-0.30.0-3.el10.src.rpm fails to build with LLVM 19 with the following error:

      [ 65%] Built target api-static
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc: In member function 'bool ebpf::MapVisitor::VisitCallExpr(clang::CallExpr*)':
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc:341:27: error: 'class llvm::StringRef' has no member named 'startswith'; did you mean 'starts_with'?
        341 |         if (!A->getName().startswith("maps"))
            |                           ^~~~~~~~~~
            |                           starts_with
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc: In member function 'bool ebpf::ProbeVisitor::assignsExtPtr(clang::Expr*, int*)':
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc:393:29: error: 'class llvm::StringRef' has no member named 'startswith'; did you mean 'starts_with'?
        393 |           if (!A->getName().startswith("maps"))
            |                             ^~~~~~~~~~
            |                             starts_with
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc: In member function 'bool ebpf::BTypeVisitor::VisitCallExpr(clang::CallExpr*)':
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc:940:27: error: 'class llvm::StringRef' has no member named 'startswith'; did you mean 'starts_with'?
        940 |         if (!A->getName().startswith("maps"))
            |                           ^~~~~~~~~~
            |                           starts_with
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc: In member function 'bool ebpf::BTypeVisitor::VisitVarDecl(clang::VarDecl*)':
      /builddir/build/BUILD/bcc-0.30.0/src/cc/frontends/clang/b_frontend_action.cc:1458:23: error: 'class llvm::StringRef' has no member named 'startswith'; did you mean 'starts_with'?
       1458 |     if (!A->getName().startswith("maps"))
            |                       ^~~~~~~~~~
            |                       starts_with
      

      StringRef::startswith was marked for deprecation in LLVM 18 and finally removed in LLVM 19. Replacing uses of startswith with starts_with fixes the build issues.

      Issue tracked upstream in https://github.com/iovisor/bcc/issues/5125

              jmarchan@redhat.com Jerome Marchand
              rhn-support-jchecahi Jesus Checa Hidalgo
              Jerome Marchand Jerome Marchand
              Ziqian (Zamir) SUN Ziqian (Zamir) SUN
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: