open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
817 stars 392 forks source link

Error "'off64_t' has not been declared" when executing ./build.sh -g in /opentelemetry-cpp/docker #2590

Open KyutakLim opened 3 months ago

KyutakLim commented 3 months ago

Describe your environment Linux server which git installed

Steps to reproduce After git clone opentelemetry-cpp repo, $ /local/repo/opentelemetry-cpp]$ cd docker/ $ /local/repo/opentelemetry-cpp/docker]$ ./build.sh -g

Attachment for error message: otel-docker-build-error.txt

I got the error message as below:


185.0 [  2%] Linking CXX shared library libabsl_base.so
185.0 [  2%] Built target base
185.0 [  2%] Building CXX object third_party/abseil-cpp/absl/base/CMakeFiles/malloc_internal.dir/internal/low_level_alloc.cc.o
185.3 In file included from /opt/third_party/grpc/build/subs/Source/grpc/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc:26:
185.3 /opt/third_party/grpc/build/subs/Source/grpc/third_party/abseil-cpp/absl/base/internal/direct_mmap.h:75:25: **_error: 'off64_t' has not been declared_**
185.3    75 |                         off64_t offset) noexcept {
185.3       |                         ^~~~~~~
185.4 gmake[5]: *** [third_party/abseil-cpp/absl/base/CMakeFiles/malloc_internal.dir/build.make:76: third_party/abseil-cpp/absl/base/CMakeFiles/malloc_internal.dir/internal/low_level_alloc.cc.o] Error 1
185.4 gmake[4]: *** [CMakeFiles/Makefile2:1848: third_party/abseil-cpp/absl/base/CMakeFiles/malloc_internal.dir/all] Error 2
185.4 gmake[3]: *** [Makefile:136: all] Error 2
185.4 gmake[2]: *** [CMakeFiles/grpc.dir/build.make:86: subs/Stamp/grpc/grpc-build] Error 2
185.4 gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/grpc.dir/all] Error 2
185.4 gmake: *** [Makefile:136: all] Error 2
------
Dockerfile:16
--------------------
  15 |
  16 | >>> RUN mkdir build \
  17 | >>>     && cd build \
  18 | >>>     && cmake -DCMAKE_INSTALL_PREFIX=/opt/third_party/install \
  19 | >>>     -DGRPC_GIT_TAG=${GRPC_GIT_TAG} /opt/third_party/grpc \
  20 | >>>     && cmake --build . -j ${CORES} --target install
  21 |
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir build     && cd build     && cmake -DCMAKE_INSTALL_PREFIX=/opt/third_party/install     -DGRPC_GIT_TAG=${GRPC_GIT_TAG} /opt/third_party/grpc     && cmake --build . -j ${CORES} --target install" did not co
```mplete successfully: exit code: 2

**What is the expected behavior?**
build success with no error message.

**What is the actual behavior?**
build failure in docker directory.

**Additional context**
How do I get the solution for this issue ?
marcalff commented 3 months ago

Related to:

https://github.com/abseil/abseil-cpp/commit/4500c2fada4e952037c59bd65e8be1ba0b29f21e

https://github.com/abseil/abseil-cpp/issues/1473

Looks like opentelemetry-cpp needs to upgrade abseil.

github-actions[bot] commented 1 month ago

This issue was marked as stale due to lack of activity.