Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Issues
  • #1791
Closed
Open
Issue created Mar 03, 2018 by Administrator@rootContributor

Cannot build cgo_library with "/" or "." in the package name

Created by: linzhp

When a cgo_library resides in a package with "/" or "." in its name, e.g., github.com/shirou/gopsutil/cpu, Buck will crash. An example package can be found here.

buck test cpuUsage/cgo_lib:all_tests
2018-03-03 06:56:24,178 [WARNING][buck_tool.py:402] Not using buckd because watchman isn't installed.
/root/go/src/buck_go_examples/buck-out/gen/cpuUsage/cgo_lib/cgo_lib#cgo-gen-import/gen/_cgo_import.go:1:17: syntax error: unexpected /, expecting ;

Build failed: Command failed with exit code 2.
stderr: 
    When running <go compile>.
    When building rule //cpuUsage/cgo_lib:all_tests#linux_amd64,test-library.
Parsing buck files: finished in 1.4 sec (100%)
Creating action graph: finished in 0.7 sec (100%)
Building: finished in 3.9 sec (100%) 21/24 jobs, 11 updated, 45.8% cache miss
  Total time: 6.2 sec

cc @monty-uber @vit

Assignee
Assign to
Time tracking