Skip to content

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

@KyutakLim

Description

@KyutakLim

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 ?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions