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

open/R build fails while running build_openr.sh #38

Closed
P3RP opened this issue Nov 22, 2018 · 3 comments
Closed

open/R build fails while running build_openr.sh #38

P3RP opened this issue Nov 22, 2018 · 3 comments

Comments

@P3RP
Copy link

P3RP commented Nov 22, 2018

Please use this template for reporting suspected bugs or requests for help.

Issue Description

Open/R build fails while running build_openr.sh.

Environment

OS version: ubuntu-16.04

Minimal test code / Steps to reproduce the issue

openr-master/build$ sudo bash ./build_openr.sh

What's the actual result?

[ 85%] Linking CXX executable openr
/usr/bin/ld: /usr/local/lib/libfbzmq.a(ResourceMonitor.cpp.o): undefined reference to symbol '_ZN5boost10filesystem6detail6statusERKNS0_4pathEPNS_6system10error_codeE'
//usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/openr.dir/build.make:132: recipe for target 'openr' failed
make[2]: *** [openr] Error 1
CMakeFiles/Makefile2:1385: recipe for target 'CMakeFiles/openr.dir/all' failed
make[1]: *** [CMakeFiles/openr.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

What's the expected result?

OpenR built and installed successfully

@saifhhasan
Copy link
Contributor

I will appreciate a pull request if you happen to have fix. Internally we use different workflow and build_openr.sh is kept for quick start.

@butjar
Copy link
Contributor

butjar commented Feb 22, 2019

Same problem here. build_openr.sh doesn't build on Ubuntu 16.04. Do you use the docker build instead? This works well for me, I realized that the versions of the dependencies differ from the build script.

If you do not maintain the build script, could you explain how to extract the build artifacts from docker and install them ?

@saifhhasan
Copy link
Contributor

Hello @butjar - build_openr.sh can be used to build but you will need to fix minor errors. Folks in past have done that.

Build openr in non-shared mode (You will have to modify openr build step in generated docker file). Copy openr binary (/usr/sbin/openr) and python modules (/usr/lib//site-packages). It should work.

butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
Currently the build_script 'build_openr.sh' is broken (facebook#38). Create a
debian system builder that creates a build_script from the
fbcode_builder. The shell_builder does something very similar. However,
the shell_builder doesn't install dependencies and programs to the
system, but to a temp directory.

To initialize the debian system builder, clone the shell_builder to make
changes more traceable.
butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
These two build config need adjustments for a system build:
- Add sudo to 'make install'
- Update ldconfig after build

For better traceability start from the fbcode_builder configs.
butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
The debian_system_builder creates a build script (like build_openr.sh)
that uses the fbcode_builder logic to install OpenR and its dependencies
to the system. Therefore, a build script created with the
debian_system_builder uses the same dependencies as the docker build
workflow that is integrated in the CI system.

To create a build_script run:

```
python fbcode_builder/debian_system_builder.py > ./build_openr.sh
sudo chmod +x build_openr.sh
sudo ./build_openr.sh
```
butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
Currently the build_script 'build_openr.sh' is broken (facebook#38). Create a
debian system builder that creates a build_script from the
fbcode_builder. The shell_builder does something very similar. However,
the shell_builder doesn't install dependencies and programs to the
system, but to a temp directory.

To initialize the debian system builder, clone the shell_builder to make
changes more traceable.
butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
These two build config need adjustments for a system build:
- Add sudo to 'make install'
- Update ldconfig after build

For better traceability start from the fbcode_builder configs.
butjar added a commit to butjar/openr that referenced this issue Mar 25, 2019
The debian_system_builder creates a build script (like build_openr.sh)
that uses the fbcode_builder logic to install OpenR and its dependencies
to the system. Therefore, a build script created with the
debian_system_builder uses the same dependencies as the docker build
workflow that is integrated in the CI system.

To create a build_script run:

```
python fbcode_builder/debian_system_builder.py > ./build_openr.sh
sudo chmod +x build_openr.sh
sudo ./build_openr.sh
```
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
facebook#41 (review)

Move the debian system builder to subdirectory of build. The
fbcode_builder is shared accross other projects and should not be
modified.
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
Currently the build_script 'build_openr.sh' is broken (facebook#38). Create a
debian system builder that creates a build_script from the
fbcode_builder. The shell_builder does something very similar. However,
the shell_builder doesn't install dependencies and programs to the
system, but to a temp directory.

To initialize the debian system builder, clone the shell_builder to make
changes more traceable.
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
These two build config need adjustments for a system build:
- Add sudo to 'make install'
- Update ldconfig after build

For better traceability start from the fbcode_builder configs.
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
The debian_system_builder creates a build script (like build_openr.sh)
that uses the fbcode_builder logic to install OpenR and its dependencies
to the system. Therefore, a build script created with the
debian_system_builder uses the same dependencies as the docker build
workflow that is integrated in the CI system.

To create a build_script run:

```
python fbcode_builder/debian_system_builder.py > ./build_openr.sh
sudo chmod +x build_openr.sh
sudo ./build_openr.sh
```
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
facebook#41 (review)

Move the debian system builder to subdirectory of build. The
fbcode_builder is shared accross other projects and should not be
modified.
butjar added a commit to butjar/openr that referenced this issue Mar 28, 2019
Currently the build_script 'build_openr.sh' is broken (facebook#38). Create a
debian system builder that creates a build_script from the
fbcode_builder. The shell_builder does something very similar. However,
the shell_builder doesn't install dependencies and programs to the
system, but to a temp directory.

The debian_system_builder creates a build script (like build_openr.sh)
that uses the fbcode_builder logic to install OpenR and its dependencies
to the system. Therefore, a build script created with the
debian_system_builder uses the same dependencies as the docker build
workflow that is integrated in the CI system.

Since the fbcode_builder is shared across multiple projects the
debian_system_builder lives in a separate directory. This requires some
hustle to import and reuse the fbcode_builder code (appending stuff to
the path).

To create a build_script run:

```
python debian_system_builder/debian_system_builder.py > ./build_openr.sh
sudo chmod +x build_openr.sh
sudo ./build_openr.sh
```
facebook-github-bot pushed a commit that referenced this issue Apr 6, 2019
Summary:
Title: [fbcode_builder] Create system buildscript generator based on fbcode_builder logic

Description:
As discussed in #38 the build script `build_openr.sh` is broken, mainly due to dependency issues. I suggested in #40 to use the fbcode_builder logic to create the script with the same dependencies of the build logic used by the CI system.

The debian_system_builder allows to create a build script that can be run directly on the host similar to the shell_builder. In addition, the shell_builder is adjusted for a system build/ install.
Pull Request resolved: #41

Differential Revision: D14819285

Pulled By: saifhhasan

fbshipit-source-id: b16114432faee46a28fadf1e0fa1e891b8748010
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

3 participants