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

BPF+LLVM: Add support for BPF shared objects #1805

Closed
mvines opened this issue Nov 13, 2018 · 7 comments
Closed

BPF+LLVM: Add support for BPF shared objects #1805

mvines opened this issue Nov 13, 2018 · 7 comments
Assignees

Comments

@mvines
Copy link
Member

mvines commented Nov 13, 2018

A single .o is too limiting

@mvines mvines added this to the v0.11 Tabletops milestone Nov 13, 2018
@jackcmay
Copy link
Contributor

I have the changes to support LLVM LD's creation of BPF based .so but they are in a local clone of the LLVM github mirror. Even if we forked LLVM to hold our changes temporarily expecting our users to build LLVM is probably to cumbersome. We could provide a binary... @mvines any other ideas?

@mvines
Copy link
Member Author

mvines commented Nov 13, 2018

Yeah I think for now we simply need to provide LLVM binaries for our main two environments, macOS and Ubuntu 18.04 (sry WSL...), until the LLVM changes can be upstreamed and released in an official upstream version. This can take the form initially as a tarball attached to a github release in our fork of the LLVM github mirror.

@mvines
Copy link
Member Author

mvines commented Nov 13, 2018

Actually better: let's just provide a docker image containing our forked LLVM. That'll work everywhere.
@jackcmay -- if you get the solana LLVM fork operational I'm happy to do the docker plumbing and hookup with bpf.mk

@jackcmay
Copy link
Contributor

jackcmay commented Nov 13, 2018

Steps to sync and build the Solana LLVM forks:

To sync, build, test llvm ld 
- git clone [email protected]:solana-labs/llvm.git
- git clone [email protected]:solana-labs/lld.git llvm/tools/lld
- mkdir llvm/build
- cd llvm/build
- cmake -G "Unix Makefiles" ..
- make -j check-lld

To rebuild lld

- cd llvm/build/tools/lld/
- make install

I haven't submitted my lld changes there yet, still need to complete my modifications to rbpf/solana to use the ELF shared objects (rather then .o's)

@jackcmay
Copy link
Contributor

@mvines For the docker work, want to teach me to fish?

@mvines
Copy link
Member Author

mvines commented Nov 14, 2018

Sure! So we want something that looks like the shellcheck docker image that we use here. This is a multi-stage Dockerfile, https://github.com/koalaman/shellcheck/blob/master/Dockerfile, that builds shellcheck in one image, then copies the resulting binary to a second image to keep the overall size down.

Also get familiar with our Dockerfiles in the docker-* subdirectories of https://github.com/solana-labs/solana/tree/master/ci, we like to use build.sh scripts to build and push the images to dockerhub. Send me your dockerhub account name and I'll add you to our org there so you can push stuff

@jackcmay
Copy link
Contributor

jackcmay commented Dec 5, 2018

Fixed: #2012

@jackcmay jackcmay closed this as completed Dec 5, 2018
CriesofCarrots pushed a commit to CriesofCarrots/solana that referenced this issue Jun 20, 2024
* Fix SyscallLogPubkey doc comment

* Update logging.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants