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
  • #1858
Closed
Open
Issue created Apr 19, 2018 by R1kk3r@R1kk3r

Wrong extension when cross-compiling a shared library

I have a multi-platform library declared in buck that can be compiled for iOS, Android and OSX. The build process is hosted on an OSX machine and compiles fine for the mentioned platforms. I built an Ubuntu 16.04 x86_64 toolchain using crosstool-ng. I was able to use it with the following .buckconfig configuration.

[cxx#crossubuntu]
 cpp = /Volumes/Untitled/x-tool/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-gcc
 cc = /Volumes/Untitled/x-tool/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-gcc
 cxxpp = /Volumes/Untitled/x-tool/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-g++
 cxx = /Volumes/Untitled/x-tool/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-g++
 ld = /Volumes/Untitled/x-tool/x86_64-ubuntu16.04-linux-gnu/bin/x86_64-ubuntu16.04-linux-gnu-g++
 linker_platform = GNU
 default_platform = linux-x86_64

Then calling buck build //src/mylib:mylib#crossubuntu,shared

The resulting library is a valid ELF file but the filename is terminated with ".dylib". I can simply add a genrule to rename it but it would be nice to have a .so generated instead since I declared the default_platform to be linux-x86_64.

Another strange thing is that if instead of the crossubuntu flavor I use linux-x86_64, it does not work.

[cxx#linux-x86_64]
 cpp = ...
 ...
 default_platform = linux-x86_64

buck build //src/mylib:mylib#linux-x86_64,shared fails because it is not able to find the linux-x86_64 platform...

Assignee
Assign to
Time tracking