mozilla-services / hindsight

Hindsight - light weight data processing skeleton
Mozilla Public License 2.0
665 stars 55 forks source link

fix build issue with lua sandbox #168

Closed adriensaladin closed 6 years ago

adriensaladin commented 6 years ago

fixes build issue with Dockerfile (#166) Since lua_sandbox_extensions sets a g++ flag not available in centos 7 I installed a more recent version of g++.

I'm not a Redhat/Centos expert so there may be a better way to do this.

adriensaladin commented 6 years ago

change it to use devtoolset-6 as we use in lua_sandbox_extensions

Right, I will update the Dockerfile to use devtoolset6, thanks for suggesting it.

Note: as a subsequent change I think we should look at removing the lua_sandbox_extensions build from the hindsight repo, so we are not duplicating what happens in lua_sandbox_extensions. Or at the least only build extensions we need to test hindsight as part of the travis job.

I understand your point. But if I understand this Dockerfile is also used to create the official docker image mozilla/hindsight (as seen in https://github.com/mozilla-services/hindsight/blob/master/.travis.yml#L25-L31). As a user I would be happy to have a way to retrieve a "complete" hindsight docker image or an easy way to create it.

adriensaladin commented 6 years ago

I'm still trying to switch to devtoolset-6 but in the meantime something has probably changed with the dependencies and even this current PR does not build anymore with the following error:

CPack3: Create package using RPM
CPack3: Install projects
CPack3: - Run preinstall target for: hindsight
CPack3: - Install project: hindsight
CPack3: Create package
CPackRPM: Will use GENERATED spec file: /app/src/hindsight/release/_CPack_Packages/Linux/RPM/SPECS/hindsight.spec
CPackRPM:Debug: You may consult rpmbuild logs in: 
CPackRPM:Debug:    - /app/src/hindsight/release/_CPack_Packages/Linux/RPM/rpmbuildhindsight.err
CPackRPM:Debug: *** error: line 24: Unknown tag: Suggests: luasandbox-hindsight >= 0.0.1
 ***
CPackRPM:Debug:    - /app/src/hindsight/release/_CPack_Packages/Linux/RPM/rpmbuildhindsight.out
CPackRPM:Debug: *** Building target platforms: x86_64
Building for target x86_64
 ***
CMake Error at /usr/share/cmake3/Modules/CPackRPM.cmake:2745 (message):
  RPM package was not generated!
  /app/src/hindsight/release/_CPack_Packages/Linux/RPM
Call Stack (most recent call first):
  /usr/share/cmake3/Modules/CPackRPM.cmake:2816 (cpack_rpm_generate_package)

I would appreciate any idea concerning this one...

adriensaladin commented 6 years ago

@ameihm0912 The same error also occurs when building lua_sandbox_extensions with https://github.com/mozilla-services/lua_sandbox_extensions/blob/master/Dockerfile

trink commented 6 years ago

The docker image is now pulling down a newer rpm-build.x86_64 0:4.11.3-32.el7 which now errors on the Suggests tag (not supported until 4.12), this has been fixed in the dev branch.

ameihm0912 commented 6 years ago

@adriensaladin this should be all fixed up now so I am going to close this off

Thanks for bringing this issue up and submitting a PR