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

missing draco/compression/attributes/attributes_decoder_interface.h"file in build #912

Closed
Irvenae opened this issue Jul 20, 2022 · 3 comments · Fixed by #913
Closed

missing draco/compression/attributes/attributes_decoder_interface.h"file in build #912

Irvenae opened this issue Jul 20, 2022 · 3 comments · Fixed by #913
Assignees
Labels

Comments

@Irvenae
Copy link

Irvenae commented Jul 20, 2022

bazel-out/k8-fastbuild/bin/external/draco/draco/include/draco/compression/point_cloud/point_cloud_decoder.h:18:10: fatal error: draco/compression/attributes/attributes_decoder_interface.h: No such file or directory
18 | #include "draco/compression/attributes/attributes_decoder_interface.h"

When adding

"${draco_src_root}/compression/attributes/attributes_decoder_interface.h"

at L104 of CMakeLists.txt the build seems to work.

@tomfinegan tomfinegan self-assigned this Jul 21, 2022
@tomfinegan tomfinegan added the bug label Jul 21, 2022
@tomfinegan
Copy link
Contributor

Thanks for the report. You may actually be the first to attempt building Draco with Bazel.

tomfinegan added a commit that referenced this issue Jul 21, 2022
/compression/attributes/attributes_decoder_interface.h was omitted,
which broke Bazel builds.

Fixes: #912
tomfinegan added a commit that referenced this issue Jul 21, 2022
/compression/attributes/attributes_decoder_interface.h was omitted,
which broke Bazel builds.

Fixes: #912
@tomfinegan
Copy link
Contributor

@Irvenae How are you setting up your Bazel build of Draco? I'm not familiar with setting up a Bazel build that runs a CMake build (or uses it for input), but I can put coverage in place if the setup isn't too complicated.

@Irvenae
Copy link
Author

Irvenae commented Jul 21, 2022

In the workspace file (of the bazel project) you download draco with an http_archive rule e.g.

http_archive(
name = "draco",
build_file = "//build_tools:draco.BUILD.bazel",
sha256 = "7882a942a1da14a9ae9d557b1a3af7f44bdee7f5d42b745c4e474fb8b28d4e5e",
strip_prefix = "draco-1.5.3",
url = "https://github.com/google/draco/archive/1.5.3.tar.gz",
)

as you can see you use the build_file argument to pass how it should be built.
That draco.BUILD.bazel file contains in our case

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
filegroup(
name = "all_srcs",
srcs = glob([
"cmake/*",
"src/**",
"CMakeLists.txt",
]),
)

cmake(
name = "draco",
lib_source = ":all_srcs",
generate_args = ["-GNinja"], // Probably not necessary in your case.
cache_entries = {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "OFF",
},
copts = ["-fPIC"],
out_static_libs = [
"libdraco.a",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)

danielgronlund pushed a commit to danielgronlund/draco that referenced this issue Aug 22, 2024
/compression/attributes/attributes_decoder_interface.h was omitted,
which broke Bazel builds.

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

Successfully merging a pull request may close this issue.

2 participants