OpenProject in a jail (or how to change the standard linker)

Status
Not open for further replies.

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
Hello,
I am trying to get to run OpenProject in a Jail with FreeNAS-9.10.2-U6
I am following the manual installation instructions but ran across some compiling issues that someone with more experience can maybe help me with.

I am starting with an updated base jail using portmaster and ccache.

- first installed some stuff
Code:
portmaster
  graphics/py-wand
  databases/memcached
  lang/python
  lang/gcc
  databases/mysql80-client
  archivers/bzip2
  devel/icu
  textproc/libyaml
  devel/py-gyp
  devel/py-yaml
  devel/ncurses
  devel/py-ncurses


- add a user named openproject with bash shell

- install rbenv/ruby from git

Code:
%su - openproject
%cd ~
%git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
%echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
%echo 'eval "$(rbenv init -)"' >> ~/.profile
%source ~/.profile
%git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
%rbenv install 2.4.2
%rbenv rehash
%rbenv global 2.4.2

- install nodenv/node from git
Code:
%su - openproject		# if not already
%cd ~
%git clone https://github.com/OiNutter/nodenv.git ~/.nodenv
%echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.profile
%echo 'eval "$(nodenv init -)"' >> ~/.profile
%git clone git://github.com/OiNutter/node-build.git ~/.nodenv/plugins/node-build
%echo 'MAKE=gmake; export MAKE' >> ~/.profile	  # otherwise build failed
%source ~/.profile
%nodenv install 6.9.1
%nodenv rehash
%nodenv global 6.9.1

- install openproject
Code:
%su - openproject		# if not already
%cd ~
%git clone https://github.com/opf/openproject-ce.git --branch stable/7 --depth 1
%cd openproject-ce
%gem install bundler
%bundle install --deployment --without postgres sqlite development test therubyracer docker

this is where it fails:
Make sure that `gem install unf_ext -v '0.0.7.4'` succeeds before bundling.
if I try that it fails with the following:
Code:
%gem install unf_ext -v '0.0.7.4'
linking shared-object unf_ext.so
/usr/bin/ld: unrecognized option '--compress-debug-sections=zlib'
/usr/bin/ld: use the --help option for usage information
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:259: unf_ext.so] Error 1

When changing the standard FreeBSD linker to ld.gold, this should work, but I have no idea how I do that.
I tried LD=ld.gold; export LD in my .profile but that didn't help; I even copied /usr/local/bin/ld.gold to /usr/local/bin/ld but still the same error.

Any ideas? I don't really want to use a VM with docker.
 
Last edited:
D

dlavigne

Guest
Did you resolve this? If not, why did you not install ruby and node from pkgs or ports?
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
no, I didn't solve this
I could not use ports because in ports the latest ruby version is 2.3.5 but the openproject gemfile specifies 2.4.2
 

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
sry, I have 2.4 installed, but nonetheless
Code:
%ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [amd64-freebsd10]
%bundle install --deployment --without postgres sqlite development test therubyracer docker
Your Ruby version is 2.3.5, but your Gemfile specified ~> 2.4.2
 
Last edited:

lopr

Explorer
Joined
Mar 19, 2015
Messages
71
I just commented out the requirement of the ruby version in the Gemfile and bundle finished without failure.
to sum up, I installed as root via portmaster
portmaster lang/ruby24 www/node6 www/npm4
changed the link of ruby
ln -sf /usr/local/bin/ruby24 /usr/local/bin/ruby
deleted the ruby requirement in /home/openproject/openproject-ce/Gemfile
and ran
bundle install --deployment --without postgres sqlite development test therubyracer docker
again

then further with the installation:
npm install
but that stops with following error:
Code:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"freebsd","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


trying to force the thing..
npm i -f

I will have to see tomorrow if that worked :)
 
Last edited:
Status
Not open for further replies.
Top