Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build tensorestore as a cmake project #151

Closed
georgeza-dev opened this issue Apr 7, 2024 · 4 comments
Closed

Failing to build tensorestore as a cmake project #151

georgeza-dev opened this issue Apr 7, 2024 · 4 comments

Comments

@georgeza-dev
Copy link

georgeza-dev commented Apr 7, 2024

Hello,
I am trying to build and link tensorestore library with my c++ code.

I am using cmake approach and follow all the official instructions from here https://google.github.io/tensorstore .
Trying to compile and build cmake project, Unfortunately, I am getting the error below , related to protobufs :

[ 50%] Generating src/google/protobuf/wkt/google/protobuf/any.pb.h, src/google/protobuf/wkt/google/protobuf/api.pb.h, src/google/protobuf/wkt/google/protobuf/duration.pb.h, src/google/protobuf/wkt/google/protobuf/empty.pb.h, src/google/protobuf/wkt/google/protobuf/field_mask.pb.h, src/google/protobuf/wkt/google/protobuf/source_context.pb.h, src/google/protobuf/wkt/google/protobuf/struct.pb.h, src/google/protobuf/wkt/google/protobuf/timestamp.pb.h, src/google/protobuf/wkt/google/protobuf/type.pb.h, src/google/protobuf/wkt/google/protobuf/wrappers.pb.h, src/google/protobuf/wkt/google/protobuf/any.pb.cc, src/google/protobuf/wkt/google/protobuf/api.pb.cc, src/google/protobuf/wkt/google/protobuf/duration.pb.cc, src/google/protobuf/wkt/google/protobuf/empty.pb.cc, src/google/protobuf/wkt/google/protobuf/field_mask.pb.cc, src/google/protobuf/wkt/google/protobuf/source_context.pb.cc, src/google/protobuf/wkt/google/protobuf/struct.pb.cc, src/google/protobuf/wkt/google/protobuf/timestamp.pb.cc, src/google/protobuf/wkt/google/protobuf/type.pb.cc, src/google/protobuf/wkt/google/protobuf/wrappers.pb.cc
../build/_deps/protobuf-build/src/google/protobuf/wkt/: No such file or directory
make[2]: *** [deps/protobuf-build/CMakeFiles/genrule__protobuf_src_google_protobuf_gen_wkt_cc_sources.dir/build.make:102: _deps/protobuf-build/src/google/protobuf/wkt/google/protobuf/any.pb.h] Error 1
make[1]: *** [CMakeFiles/Makefile2:59507: _deps/protobuf-build/CMakeFiles/genrule__protobuf_src_google_protobuf_gen_wkt_cc_sources.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Platform: Ubuntu 20.04.6 LTS (Focal Fossa)

Any ideas would be very much appreciated,
Best regards,

George

@laramiel
Copy link
Collaborator

Our CI builds tensorstore using CMake on every change, but environments differ.
Could you provide the exact commands you are using?

@georgeza-dev
Copy link
Author

georgeza-dev commented Apr 16, 2024

Hello, thanks for your response.
I am trying to build everything in Tensorstore repository, so I am using "cmake .. " from ./build directory and then "make" so as to get all the shared libraries.

At the end of the day, I will use it to read/write file based and cloud based zarr directories .
But I am lacking the way to build only the zarr driver, so tried to build everything.

Thanks in advance for your help.
George

@laramiel
Copy link
Collaborator

laramiel commented Apr 16, 2024

Try using the Ninja generator for cmake.

cmake -G Ninja

Edit: The cmake build does output some files to generated directories, and I suspect that the make generator and the Ninja generator handle that differently; most of our testing uses the Ninja generator.

@georgeza-dev
Copy link
Author

Thanks for your answer!! I will give a try.
Best,
George

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants