googlevr / seurat

Seurat is a scene simplification technology designed to process very complex 3D scenes into a representation that renders efficiently on mobile 6DoF VR systems.
Apache License 2.0
870 stars 94 forks source link

build failed for butterfly #4

Open thomasflynn opened 6 years ago

thomasflynn commented 6 years ago

I'm getting the following when trying to build butterfly:

$ ~/bin/bazel --bazelrc tools/bazel_linux.rc build -c opt seurat/viewer/butterfly:butterfly INFO: Analysed target //seurat/viewer/butterfly:butterfly (0 packages loaded). INFO: Found 1 target... ERROR: /home/flynnt/.cache/bazel/_bazel_flynnt/8734449d4e1d216509d7e0e9da30fc96/external/glfw/BUILD.bazel:33:1: undeclared inclusion(s) in rule '@glfw//:glfw_linux': this rule is missing dependency declarations for the following files included by 'external/glfw/src/xkb_unicode.c': '/usr/lib/clang/6.0.0/include/stddef.h' '/usr/lib/clang/6.0.0/include/__stddef_max_align_t.h' '/usr/lib/clang/6.0.0/include/stdint.h' '/usr/lib/clang/6.0.0/include/stdarg.h' Target //seurat/viewer/butterfly:butterfly failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 0.635s, Critical Path: 0.27s INFO: 0 processes. FAILED: Build did NOT complete successfully

I'm not familiar with Bazel. Some googling around suggested that something about c++ builtins should be added to CROSSTOOL (i think someone was having trouble compiling tensorflow). Looking for CROSSTOOL in seurat, revealed bazel_linux.rc which has a comment along the lines of: "The 'correct' way to do this would be to use a custom CROSSTOOL, but this is much simpler". Do you have suggestions on how to go about fixing this?

davejrichardson commented 6 years ago

Hi Thomas,

What versions of Bazel and Clang are you using? Run:

bazel version clang++ --version

I've encountered this error myself building on Linux, but I didn't do the last few Linux builds before we pushed it live, and one of my colleagues seemed to think everything was OK on Bazel 0.13 on Linux with Clang 3.9.

I haven't yet resolved it on my own Linux system. Lots of other people have encountered issues like this, and that may help:

https://github.com/bazelbuild/bazel/issues/1317

thomasflynn commented 6 years ago

$ clang++ --version clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin

$ bazel version Build label: 0.13.0 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Mon Oct 18 21:33:40 +50297 (1525078013620) Build timestamp: 1525078013620 Build timestamp as int: 1525078013620

thomasflynn commented 6 years ago

I'm running Ubuntu 18.04LTS. I didn't want to bother with compiling/installing yet another version of clang on my system (was running 16.04LTS), so i just upgraded Ubuntu. It was pretty quick and painless to upgrade Ubuntu for me.

davejrichardson commented 6 years ago

Did the Ubuntu upgrade change anything?

thomasflynn commented 6 years ago

I'm sure the upgrade changed a lot of things from 16.04 :). focus-follows-mouse seems to work properly for me now :). i don't seem to miss the Unity interface. But you probably are more interested in clang.

16.04LTS had clang 3.5.9. this project requires clang 3.9. another project i needed to build required clang 3.6.0 (assimp). 18.04 provided clang 6.0.0. I could solve all my clang problems by upgrading to 18.04. And that seemed to go pretty well until this failure on butterfly (seurat compiled fine).

in any case, as more people upgrade to 18.04, more people will have clang 6 and if this is an issue with clang 6, you'll need to end up dealing with it. shrug

davejrichardson commented 6 years ago

Hi Tom,

As I understand it, this is a Basel configuration issue. I recall reading a Bazel forum post about adding an explicit system folder flag to the compiler command line. It would be like -isystem /usr/.../ depending on the path to your header files. You might be able to do that with a Bazel.rc line.

I’ve posted in one of the Bazel open issues about our project needing this to be fixed, but I recall the Bazel team thinks it’s low priority as a user configuration issue.

Anyway, if you have another too that can View meshes, you should be able to see the output without building our viewer.

On Wed, May 9, 2018 at 7:21 PM Tom Flynn notifications@github.com wrote:

I'm sure the upgrade changed a lot of things from 16.04 :). focus-follows-mouse seems to work properly for me now :). i don't seem to miss the Unity interface. But you probably are more interested in clang.

16.04LTS had clang 3.5.9. this project requires clang 3.9. another project i needed to build required clang 3.6.0 (assimp). 18.04 provided clang 6.0.0. I could solve all my clang problems by upgrading to 18.04. And that seemed to go pretty well until this failure on butterfly (seurat compiled fine).

in any case, as more people upgrade to 18.04, more people will have clang 6 and if this is an issue with clang 6, you'll need to end up dealing with it. shrug

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googlevr/seurat/issues/4#issuecomment-387931815, or mute the thread https://github.com/notifications/unsubscribe-auth/AgsupmEnU0TVE7x7l1e_oxLzL220UcAhks5tw6QVgaJpZM4T151A .