glow icon indicating copy to clipboard operation
glow copied to clipboard

Compile error when building glow

Open nikola-suljagic opened this issue 2 years ago • 11 comments

Hi to all, Can someone help me why I encountered error when building Glow:

image

It looks like that in thirdparty/folly/folly/TimeoutQueue.cpp is missed to include header file as you can see from above image. But it's weird to me, it looks that some part of my system isn't compatible. I'm using llvm-15 and Ubuntu 22.04 linux distribution.

Did I miss something?

Thanks in advance!!!

nikola-suljagic avatar Feb 12 '23 14:02 nikola-suljagic

same issue here

HamzaBenHaj avatar Feb 14 '23 16:02 HamzaBenHaj

I was able to solve it by adding #include to TimeoutQueue.cpp, but there seems to be other build issues on master branch. Does any able to build successfully?

harishch4 avatar Feb 27 '23 08:02 harishch4

This does not directly solve the issue but I only managed to successfully build glow in a docker container using ubuntu/bionic as base image.

jankraing avatar Mar 03 '23 08:03 jankraing

Kinda late but.

#include <limits>

fvalasiad avatar Jun 25 '23 05:06 fvalasiad

Checking out to one of earlier versions of Folly (v2022.12.19.00) and GoogleBenchmark (v1.3.0) worked for me. It may work with a bit newer versions of these dependencies but I haven't put an additional effort into trying that.

In addition to above changes, I also needed to add #include <cstddef> to test_libjit.cpp file.

m-peko avatar Aug 22 '23 12:08 m-peko

Hi @m-peko, I tried Folly (v2022.12.19.00) using LLVM-15, still got many compilation errors, did I miss something?

/usr/local/include/fmt/base.h:1597:3: error: static assertion failed due to requirement 'formattable_char': Mixing character types is disallowed. static_assert(formattable_char, "Mixing character types is disallowed."); ^ ~~~~~~~~~~~~~~~~ /usr/local/include/fmt/base.h:2005:20: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::context, folly::Range<const char *>, 0>' requested here return {{detail::make_arg<NUM_ARGS <= detail::max_packed_args, Context>( ^ /usr/local/include/fmt/format.h:4366:28: note: in instantiation of function template specialization 'fmt::make_format_args<fmt::context, folly::Range<const char *>, 1UL, 0UL, 15ULL, 0>' requested here return vformat(fmt, fmt::make_format_args(args...)); ^ /home/leon/dlrm/glow/thirdparty/folly/folly/IPAddressV4.cpp:73:14: note: in instantiation of function template specialization 'fmt::format<folly::Range<const char *> &>' requested here fmt::format("Can't convert invalid IP '{}' to long", ip));

coolshark777 avatar May 17 '24 18:05 coolshark777

Hi @coolshark777, I tried Folly (v2022.12.19.00) using LLVM-17 and i'm getting the same compilation errors as you have commented above. Did you manage to resolve the issue?

amrinfathima-mcw avatar Jun 03 '25 13:06 amrinfathima-mcw

@amrinfathima-mcw

Searching around, found this: https://github.com/facebook/folly/commit/5295ccef6d7861231ec2c16a4d6f1af12991a9e7

So basically prior to 2021, they were using sformat, their custom formatter, which accounted for the custom folly type.

But then they moved to vanilla fmt::format.

So I am guessing that something about their custom type, fmt::format, or even the compiler itself has changed ever since, to make it compatible with fmt::format.

So maybe using ip.str() will make it work for now, but it's a hacky solution.

tldr open /home/leon/dlrm/glow/thirdparty/folly/folly/IPAddressV4.cpp and change: fmt::format("Can't convert invalid IP '{}' to long", ip));

to: fmt::format("Can't convert invalid IP '{}' to long", ip.str()));

Aha, checking folly/Format.h from that commit:

 14  * folly::format has been superseded by
 13  * [fmt](https://fmt.dev/latest/index.html). `#include <fmt/core.h>`
 12  *
 11  * format() performs text-formatting, similar to Python's str.format. The full
 10  * specification is on github:
  9  * https://github.com/facebook/folly/blob/main/folly/docs/Format.md
  8  *
  7  * @refcode folly/docs/examples/folly/Format.cpp
  6  * @file Format.h
  5  */

What c++ version are you using anyways?

fvalasiad avatar Jun 03 '25 13:06 fvalasiad

Hi @fvalasiad , thanks, but i think i just downgraded fmt version to 9 and that resolved the error. I'm using C++-17 as I already had that, I just modified the CMakeLists.txt to use the same, but i still do get errors halfway through the build. FAILED: lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPULLVMIRGen.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DGIT_DATE=\"2024-05-11\" -DGIT_SHA1=\"05dd99b97\" -DGIT_TAG=\"\" -DGLOW_BUILD_DATE=\"2025-06-04\" -DGLOW_VERSION="\"2024-05-11 (05dd99b97) ()\"" -DGLOW_WITH_CPU=1 -DGLOW_WITH_LLVMIRCODEGEN=1 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DWITH_PNG -D__STDC_FORMAT_MACROS -I/home/mcw/Documents/glow_try/glow/include -I/home/mcw/Documents/glow_try/build_debug/include -I/home/mcw/Documents/glow_try/build_debug -I/home/mcw/Documents/glow_try/glow -I/home/mcw/Documents/glow_try/glow/externalbackends -I/home/mcw/Documents/glow_try/glow/thirdparty/fp16/include -I/home/mcw/Documents/glow_try/build_debug/libobj/libobj_cpu -I/home/mcw/Documents/glow_try/glow/thirdparty/miniz-2.0.8 -I/home/mcw/Documents/glow_try/glow/thirdparty/folly -I/home/mcw/Documents/glow_try/build_debug/thirdparty/folly -isystem /home/mcw/Documents/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/include -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPULLVMIRGen.cpp.o -MF lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPULLVMIRGen.cpp.o.d -o lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPULLVMIRGen.cpp.o -c /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPULLVMIRGen.cpp In file included from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPULLVMIRGen.h:19, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPULLVMIRGen.cpp:17: /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMIRGen.h:32:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory 32 | #include "llvm/Transforms/IPO/PassManagerBuilder.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [368/754] Building CXX object lib/Backend/CMakeFiles/Backend.dir/BackendUtils.cpp.o FAILED: lib/Backend/CMakeFiles/Backend.dir/BackendUtils.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DGIT_DATE=\"2024-05-11\" -DGIT_SHA1=\"05dd99b97\" -DGIT_TAG=\"\" -DGLOW_BUILD_DATE=\"2025-06-04\" -DGLOW_VERSION="\"2024-05-11 (05dd99b97) ()\"" -DGLOW_WITH_CPU=1 -DGLOW_WITH_LLVMIRCODEGEN=1 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DWITH_PNG -D__STDC_FORMAT_MACROS -I/home/mcw/Documents/glow_try/glow/include -I/home/mcw/Documents/glow_try/build_debug/include -I/home/mcw/Documents/glow_try/build_debug -I/home/mcw/Documents/glow_try/glow -I/home/mcw/Documents/glow_try/glow/externalbackends -I/home/mcw/Documents/glow_try/glow/thirdparty/fp16/include -I/home/mcw/Documents/glow_try/glow/thirdparty/miniz-2.0.8 -I/home/mcw/Documents/glow_try/glow/thirdparty/folly -I/home/mcw/Documents/glow_try/build_debug/thirdparty/folly -isystem /home/mcw/Documents/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/include -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT lib/Backend/CMakeFiles/Backend.dir/BackendUtils.cpp.o -MF lib/Backend/CMakeFiles/Backend.dir/BackendUtils.cpp.o.d -o lib/Backend/CMakeFiles/Backend.dir/BackendUtils.cpp.o -c /home/mcw/Documents/glow_try/glow/lib/Backend/BackendUtils.cpp In file included from /home/mcw/Documents/glow_try/glow/lib/Backend/BackendUtils.cpp:17: /home/mcw/Documents/glow_try/glow/include/glow/Graph/FXIRWrapper.h:23:10: fatal error: folly/json/dynamic.h: No such file or directory 23 | #include <folly/json/dynamic.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [369/754] Building CXX object lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUBackend.cpp.o FAILED: lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUBackend.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DGIT_DATE=\"2024-05-11\" -DGIT_SHA1=\"05dd99b97\" -DGIT_TAG=\"\" -DGLOW_BUILD_DATE=\"2025-06-04\" -DGLOW_VERSION="\"2024-05-11 (05dd99b97) ()\"" -DGLOW_WITH_CPU=1 -DGLOW_WITH_LLVMIRCODEGEN=1 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DWITH_PNG -D__STDC_FORMAT_MACROS -I/home/mcw/Documents/glow_try/glow/include -I/home/mcw/Documents/glow_try/build_debug/include -I/home/mcw/Documents/glow_try/build_debug -I/home/mcw/Documents/glow_try/glow -I/home/mcw/Documents/glow_try/glow/externalbackends -I/home/mcw/Documents/glow_try/glow/thirdparty/fp16/include -I/home/mcw/Documents/glow_try/build_debug/libobj/libobj_cpu -I/home/mcw/Documents/glow_try/glow/thirdparty/miniz-2.0.8 -I/home/mcw/Documents/glow_try/glow/thirdparty/folly -I/home/mcw/Documents/glow_try/build_debug/thirdparty/folly -isystem /home/mcw/Documents/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/include -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUBackend.cpp.o -MF lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUBackend.cpp.o.d -o lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUBackend.cpp.o -c /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUBackend.cpp In file included from /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUBackend.cpp:17: /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMIRGen.h:32:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory 32 | #include "llvm/Transforms/IPO/PassManagerBuilder.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [370/754] Building CXX object lib/Backends/CPU/CMakeFiles/CPUBackend.dir/Transforms.cpp.o FAILED: lib/Backends/CPU/CMakeFiles/CPUBackend.dir/Transforms.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DGIT_DATE=\"2024-05-11\" -DGIT_SHA1=\"05dd99b97\" -DGIT_TAG=\"\" -DGLOW_BUILD_DATE=\"2025-06-04\" -DGLOW_VERSION="\"2024-05-11 (05dd99b97) ()\"" -DGLOW_WITH_CPU=1 -DGLOW_WITH_LLVMIRCODEGEN=1 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DWITH_PNG -D__STDC_FORMAT_MACROS -I/home/mcw/Documents/glow_try/glow/include -I/home/mcw/Documents/glow_try/build_debug/include -I/home/mcw/Documents/glow_try/build_debug -I/home/mcw/Documents/glow_try/glow -I/home/mcw/Documents/glow_try/glow/externalbackends -I/home/mcw/Documents/glow_try/glow/thirdparty/fp16/include -I/home/mcw/Documents/glow_try/build_debug/libobj/libobj_cpu -I/home/mcw/Documents/glow_try/glow/thirdparty/miniz-2.0.8 -I/home/mcw/Documents/glow_try/glow/thirdparty/folly -I/home/mcw/Documents/glow_try/build_debug/thirdparty/folly -isystem /home/mcw/Documents/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/include -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT lib/Backends/CPU/CMakeFiles/CPUBackend.dir/Transforms.cpp.o -MF lib/Backends/CPU/CMakeFiles/CPUBackend.dir/Transforms.cpp.o.d -o lib/Backends/CPU/CMakeFiles/CPUBackend.dir/Transforms.cpp.o -c /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/Transforms.cpp In file included from /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/Transforms.cpp:17: /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMIRGen.h:32:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory 32 | #include "llvm/Transforms/IPO/PassManagerBuilder.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [371/754] Building CXX object lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUFactory.cpp.o FAILED: lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUFactory.cpp.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CONTEXT_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DGFLAGS_IS_A_DLL=0 -DGIT_DATE=\"2024-05-11\" -DGIT_SHA1=\"05dd99b97\" -DGIT_TAG=\"\" -DGLOW_BUILD_DATE=\"2025-06-04\" -DGLOW_VERSION="\"2024-05-11 (05dd99b97) ()\"" -DGLOW_WITH_CPU=1 -DGLOW_WITH_LLVMIRCODEGEN=1 -DGOOGLE_GLOG_DLL_DECL="" -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS="" -DWITH_PNG -D__STDC_FORMAT_MACROS -I/home/mcw/Documents/glow_try/glow/include -I/home/mcw/Documents/glow_try/build_debug/include -I/home/mcw/Documents/glow_try/build_debug -I/home/mcw/Documents/glow_try/glow -I/home/mcw/Documents/glow_try/glow/externalbackends -I/home/mcw/Documents/glow_try/glow/thirdparty/fp16/include -I/home/mcw/Documents/glow_try/build_debug/libobj/libobj_cpu -I/home/mcw/Documents/glow_try/glow/thirdparty/miniz-2.0.8 -I/home/mcw/Documents/glow_try/glow/thirdparty/folly -I/home/mcw/Documents/glow_try/build_debug/thirdparty/folly -isystem /home/mcw/Documents/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/include -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUFactory.cpp.o -MF lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUFactory.cpp.o.d -o lib/Backends/CPU/CMakeFiles/CPUBackend.dir/CPUFactory.cpp.o -c /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUFactory.cpp In file included from /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUBackend.h:23, from /home/mcw/Documents/glow_try/glow/lib/Backends/CPU/CPUFactory.cpp:17: /home/mcw/Documents/glow_try/glow/include/glow/LLVMIRCodeGen/LLVMIRGen.h:32:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory 32 | #include "llvm/Transforms/IPO/PassManagerBuilder.h"

amrinfathima-mcw avatar Jun 04 '25 08:06 amrinfathima-mcw

@amrinfathima-mcw I see those headers are located under /usr/include/llvm-${ver}/

So it probably has something to do with the fact you are using an llvm version incompatible with the one installed in your system. I recall glow could be pointed at a specific llvm install

do an llc --version

and compare it with the llvm you are trying to use, then report here.

fvalasiad avatar Jun 04 '25 09:06 fvalasiad

@amrinfathima-mcw One of your problems that I have also faced is incorrect include paths for the json functionality of folly.

This one

error: folly/json/dynamic.h: No such file or directory 23 | #include <folly/json/dynamic.h> |          ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated.

Big and most sincere salute from the bottom of my heart to @Gownta and his https://github.com/pytorch/glow/commit/f3cdb7a15e6852778d670d29e81c741194c1db63 commit. Either you update folly submodule , or leave the paths as they are. Because this version of folly does not have such paths https://github.com/facebook/folly/tree/c94486da2f41ff65862197efdaf062944574f56f

Anyway. This patch could fix one of your problems

diff --git a/include/glow/Graph/FXIRUtils.h b/include/glow/Graph/FXIRUtils.h
index ecf955a64..17ab011f5 100644
--- a/include/glow/Graph/FXIRUtils.h
+++ b/include/glow/Graph/FXIRUtils.h
@@ -24,7 +24,7 @@
 #include <cstdint>
 #include <folly/Conv.h>
 #include <folly/String.h>
-#include <folly/json/dynamic.h>
+#include <folly/dynamic.h>
 #include <type_traits>
 
 namespace glow {
diff --git a/include/glow/Graph/FXIRWrapper.h b/include/glow/Graph/FXIRWrapper.h
index dd2367890..6ec5869e4 100644
--- a/include/glow/Graph/FXIRWrapper.h
+++ b/include/glow/Graph/FXIRWrapper.h
@@ -20,7 +20,7 @@
 #include "glow/Graph/Graph.h"
 #include "llvm/ADT/MapVector.h"
 
-#include <folly/json/dynamic.h>
+#include <folly/dynamic.h>
 
 namespace glow {
 
diff --git a/lib/Backends/NNPI/NNPI.h b/lib/Backends/NNPI/NNPI.h
index 38ac78683..6db778dee 100644
--- a/lib/Backends/NNPI/NNPI.h
+++ b/lib/Backends/NNPI/NNPI.h
@@ -19,7 +19,7 @@
 #include "NNPIAdapterContainer.h"
 #include "NNPIOptions.h"
 #include "glow/Backend/Backend.h"
-#include <folly/json/dynamic.h>
+#include <folly/dynamic.h>
 #include <vector>
 
 namespace glow {
diff --git a/lib/Backends/NNPI/NNPICompiledFunction.h b/lib/Backends/NNPI/NNPICompiledFunction.h
index 333deb85b..49e0d3d66 100644
--- a/lib/Backends/NNPI/NNPICompiledFunction.h
+++ b/lib/Backends/NNPI/NNPICompiledFunction.h
@@ -24,7 +24,7 @@
 #include "glow/ExecutionContext/ExecutionContext.h"
 #include "nnpi_inference_types.h"
 #include "nnpi_transformer.h"
-#include <folly/json/dynamic.h>
+#include <folly/dynamic.h>
 #include <map>
 #include <memory>
 #include <mutex>
diff --git a/lib/Graph/FXIRUtils.cpp b/lib/Graph/FXIRUtils.cpp
index 775b6da28..8313aabfe 100644
--- a/lib/Graph/FXIRUtils.cpp
+++ b/lib/Graph/FXIRUtils.cpp
@@ -19,7 +19,7 @@
 #include "glow/Graph/FXIRWrapper.h"
 #include "llvm/Support/Casting.h"
 
-#include <folly/json/DynamicConverter.h>
+#include <folly/DynamicConverter.h>
 
 using namespace glow;
 
diff --git a/lib/Runtime/Provisioner/Provisioner.cpp b/lib/Runtime/Provisioner/Provisioner.cpp
index f057f8de2..c91343ff6 100644
--- a/lib/Runtime/Provisioner/Provisioner.cpp
+++ b/lib/Runtime/Provisioner/Provisioner.cpp
@@ -26,7 +26,7 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/FormatVariadic.h"
 
-#include <folly/json/dynamic.h>
+#include <folly/dynamic.h>
 #include <future>
 #include <map>
 #include <mutex>
diff --git a/torch_glow/src/GlowCompileSpec.cpp b/torch_glow/src/GlowCompileSpec.cpp
index f82baea25..c0345c403 100644
--- a/torch_glow/src/GlowCompileSpec.cpp
+++ b/torch_glow/src/GlowCompileSpec.cpp
@@ -16,7 +16,7 @@
 
 #include "GlowCompileSpec.h"
 #include "PyTorchCommon.h"
-#include "folly/json/json.h"
+#include "folly/json.h"
 #include <ATen/core/ivalue.h>
 #include <torch/custom_class.h>
 
diff --git a/torch_glow/src/GlowCompileSpec.h b/torch_glow/src/GlowCompileSpec.h
index 4088b416e..17bfcbff7 100644
--- a/torch_glow/src/GlowCompileSpec.h
+++ b/torch_glow/src/GlowCompileSpec.h
@@ -20,8 +20,8 @@
 #include "PyTorchCommon.h"
 #include <ATen/core/ivalue.h>
 
-#include "folly/json/dynamic.h"
-#include "folly/json/json.h"
+#include "folly/dynamic.h"
+#include "folly/json.h"
 
 namespace glow {
 

janchk avatar Jun 10 '25 11:06 janchk