Skip to content

Build failure when depending on target in // #31

@AustinSchuh

Description

@AustinSchuh

When I depend on a target in the root package, I get an annoying build failure.

doxygen(    
    name = "doxygen",                                                                                                                                                                                                                                                                                                                                 
    srcs = [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
        "//:LICENSE.md",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    ],                                                                                                                                                                                                                                                                                                                                                           
    outs = ["html"],    
    doxyfile_template = "Doxyfile",                                                                                                                                                                                                                                                                                                                              
    exclude = "wpiutil/src/main/native/resources/wpilib-128.png docs/theme.css",                                                                                                                                                                                                                                                           
    html_extra_stylesheet = "docs/theme.css",                                                                                                                                                                                                                                                                                                              
    project_logo = "wpiutil/src/main/native/resources/wpilib-128.png",                                                                                                                                                                                                                                                                                         
    project_name = "WPILibC++",                                                                                                                                                                                                                                                                                              
    project_number = "$(WPILIB_VERSION)",                                                                                                                                                                                                                                                                                                         
    strip_from_inc_path = paths,    
    strip_from_path = paths,                                                                                                                                                                                                                                                                                  
    target_compatible_with = select({                                                                                                                                                                                                                                                                                          
        "@platforms//cpu:x86_64": [],                                                                                                                                                                                                                                                                                            
        "//conditions:default": ["@platforms//:incompatible"],                                                                                                                                                                                                                                                                                       
    }),                                                                                                                                                                                                                                                                                                                                    
)
austin[3762] server1868-1 (doxygen) ~/local/allwpilib3
$ bazel test -c opt //...
INFO: Analyzed 1176 targets (36 packages loaded, 6482 targets configured).
ERROR: /home/austin/local/allwpilib3/docs/BUILD.bazel:55:8: Building doxygen documentation for rule 'doxygen' failed: (Exit 2): doxygen failed: error executing DoxygenBuild command (from target //docs:doxygen) external/doxygen/linux/doxygen bazel-out/k8-opt/bin/docs/Doxyfile

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/dev/shm/bazel-sandbox.4d3c097c0a97f2da7a46adb4ecfab883763059ef5c0a7cd7d6c5786cd12fe713/linux-sandbox/647/execroot/__main__/bazel-out/k8-opt/bin/docs/Doxyfile:2904: warning: Reached end of file while still inside a (nested) comment. Nesting level 1 (probable line reference: 1044)
/dev/shm/bazel-sandbox.4d3c097c0a97f2da7a46adb4ecfab883763059ef5c0a7cd7d6c5786cd12fe713/linux-sandbox/647/execroot/__main__/external/doxygen/linux/doxygen:259971: warning: the \endcond does not have a corresponding \cond in this file
input buffer overflow, can't enlarge buffer because scanner uses REJECT
    lexical analyzer: /mnt/hgfs/dimitri/doxygen.git/src/pre.l (for: /dev/shm/bazel-sandbox.4d3c097c0a97f2da7a46adb4ecfab883763059ef5c0a7cd7d6c5786cd12fe713/linux-sandbox/647/execroot/__main__/external/doxygen/linux/doxygen)

INFO: Elapsed time: 1.512s, Critical Path: 1.13s
INFO: 5 processes: 13216 action cache hit, 5 internal.
ERROR: Build did NOT complete successfully

Digging in, this is because . gets added to the inputs path, which then tries to parse external/doxygen and overflows the input buffer.

I fixed it by copying the file out of //, but it would be wonderful if either the rule exploded when I did it, or if it handled it correctly.

wpilibsuite/allwpilib#8157 has the full change (with workaround).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions