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

How to install? #3

Open
ryandesign opened this issue Jan 8, 2021 · 2 comments
Open

How to install? #3

ryandesign opened this issue Jan 8, 2021 · 2 comments

Comments

@ryandesign
Copy link

Now that the build system is bazel, how can the software be installed?

The old autotools instructions with arowpp 0.1.2 said:

$ git clone https://github.com/tetsuok/arowpp.git
$ cd arowpp
$ ./configure [--enable-gtest]
$ make
$ make check # This is optional. See the note below.
$ make install

Note the make install step which (typically with sudo) installs the software.

The new bazel build instructions with arowpp 0.1.3 say:

$ git clone https://github.com/tetsuok/arowpp.git
$ cd arowpp
$ bazel build //:arow_learn //:arow_test

That builds, but how to install?

@tetsuok
Copy link
Owner

tetsuok commented Jan 9, 2021

Good catch. Thanks for reporting the issue. My understanding is that bazel doesn't offer the counterpart of make install (there is an extension to support the installation, but it only works in Linux right now). Users need to copy the products by themselves. I can update README.md to mention the following installation process to install, but I'm not sure there is a canonical way to install the built products when using Bazel.
Bazel normally produces built products (e.g., executables, shared/dynamic/static libraries) under bazel-bin when you run bazel build (bazel-bin will be created in the same directory where WORKSPACE is located).

Sample installation process

bazel build //:arow_learn //:arow_test would produces arow_learn, arow_test, libarowpp.a, and libarowpp.so under bazel-bin. You can just copy these files to your preferred location, e.g., /usr/local/{bin,lib}, using e.g., cp or install. Below is an example of installing the binaries to /usr/local using cp:

sudo cp bazel-bin/arow_learn bazel-bin/arow_test /usr/local/bin
sudo cp bazel-bin/libarowpp.a /usr/local/lib

NOTE: Installing shared/dynamic library libarowpp.so, is a bit tricky. I didn't find the best solution yet because additional commands are required to set up the path for it (install_name_tool -change in macOS needs to be run to fix the path, for example).

Here is an example of how to install the public header:

$ sudo cp ./src/arowpp.h /usr/local/include

@ryandesign
Copy link
Author

I wondered if the installation process might be manual now. In that case, adding those instructions to the readme would be good, and make sure to keep it updated if you change what gets built in the future.

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