[SOLVED] Compiling: Jupyter/Kernel.cpp ‘write’ was not declared in this scope

r2787.2023eac isn’t compiling for me, resulting in:

[100%] Building CXX object tools/cling/tools/Jupyter/CMakeFiles/libclingJupyter.dir/Kernel.cpp.o /tmp/abs/cling-git/src/llvm/tools/cling/tools/Jupyter/Kernel.cpp: In function ‘void cling::Jupyter::pushOutput(std::map<std::__cxx11::basic_string<char>, cling::Jupyter::MIMEDataRef>)’: /tmp/abs/cling-git/src/llvm/tools/cling/tools/Jupyter/Kernel.cpp:59:42: error: ‘write’ was not declared in this scope write(pipeToJupyterFD, &sizeLong, 1); ^ tools/cling/tools/Jupyter/CMakeFiles/libclingJupyter.dir/build.make:62: recipe for target 'tools/cling/tools/Jupyter/CMakeFiles/libclingJupyter.dir/Kernel.cpp.o' failed make[2]: *** [tools/cling/tools/Jupyter/CMakeFiles/libclingJupyter.dir/Kernel.cpp.o] Error 1 make[2]: Leaving directory '/tmp/abs/cling-git/src/cling-build' CMakeFiles/Makefile2:13042: recipe for target 'tools/cling/tools/Jupyter/CMakeFiles/libclingJupyter.dir/all' failed

Any suggestions on how to deal with this?

I’m compiling cling with:

[code]
source=(“llvm::git+http://root.cern.ch/git/llvm.git#branch=cling-patches”
“clang::git+http://root.cern.ch/git/clang.git#branch=cling-patches”
“cling::git+http://root.cern.ch/git/cling.git#branch=master”)

cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="/opt/cling"
-DLLVM_TARGETS_TO_BUILD=“host”
-DLLVM_BUILD_LLVM_DYLIB=OFF
-DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_FFI=ON
-DLLVM_BUILD_DOCS=OFF
-DLLVM_ENABLE_SPHINX=OFF
-DLLVM_ENABLE_DOXYGEN=OFF
-DFFI_INCLUDE_DIR=$(pkg-config --cflags-only-I libffi | cut -c3-)
“$srcdir/llvm”

make -C tools/clang
make -C tools/cling[/code]

Hi 0xACE,

The fix is in cling’s master. Let us know if you still see a problem, ideally specifying platform + compiler.

Thanks for reporting!

Cheers, Axel.

Hello.

Yes it’s solved now in commit 7644a681de2e76a4db6d26ee8e636bc3e91f5f1e.

Thank you, I was having trouble finding which library it was trying to use.

Feel free to mark this thread as solved if I haven’t done it right.