Bug 220330 - www/rubygem-selenium-webdriver fails to build when WRKDIRPREFIX is set
Summary: www/rubygem-selenium-webdriver fails to build when WRKDIRPREFIX is set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-28 11:43 UTC by Zane C. Bowers-Hadley
Modified: 2019-07-03 20:48 UTC (History)
7 users (show)

See Also:
bugzilla: maintainer-feedback? (ruby)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zane C. Bowers-Hadley 2017-06-28 11:43:25 UTC
Howdy!

This is not currently building for me. Below is the result of make.

[root@vulpes]/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver# make | less
===>  License APACHE20 accepted by the user
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by rubygem-selenium-webdriver-3.4.3 for building
===>  Extracting for rubygem-selenium-webdriver-3.4.3
=> SHA256 Checksum OK for rubygem/selenium-webdriver-3.4.3.gem.
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/ruby23 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/gem23 - found
Unpacked gem: '/usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.4.3'
===>  Patching for rubygem-selenium-webdriver-3.4.3
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/ruby23 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/ruby23 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/gem23 - found
===>  Configuring for rubygem-selenium-webdriver-3.4.3
===>  Building for rubygem-selenium-webdriver-3.4.3
  Successfully built RubyGem
  Name: selenium-webdriver
  Version: 3.4.3
  File: selenium-webdriver-3.4.3.gem
===>  Staging for rubygem-selenium-webdriver-3.4.3
===>   rubygem-selenium-webdriver-3.4.3 depends on package: rubygem-childprocess>=0.5 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on package: rubygem-rubyzip>=1.0 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/ruby23 - found
===>   rubygem-selenium-webdriver-3.4.3 depends on file: /usr/local/bin/gem23 - found
===>   Generating temporary packing list
(cd /usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.4.3; /usr/bin/env RB_USER_INSTALL=yes LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/local/bin/gem23 install -l --no-update-sources --install-dir /usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.3 --ignore-dependencies --bindir=/usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/stage/usr/local/bin --rdoc --ri selenium-webdriver-3.4.3.gem -- --build-args )
Successfully installed selenium-webdriver-3.4.3
Parsing documentation for selenium-webdriver-3.4.3
Installing ri documentation for selenium-webdriver-3.4.3
Installing darkfish documentation for selenium-webdriver-3.4.3
Done installing documentation for selenium-webdriver after 27 seconds
1 gem installed
/bin/rm -f -r /usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.3/build_info/
/usr/bin/find /usr/obj/arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.3 -type f -name '*.so' -exec /usr/bin/strip {} +
strip: moving loadable section .note.gnu.build-id, is this intentional?
strip: moving loadable section .hash, is this intentional?
strip: moving loadable section .gnu.hash, is this intentional?
strip: moving loadable section .dynsym, is this intentional?
strip: moving loadable section .dynstr, is this intentional?
strip: moving loadable section .gnu.version, is this intentional?
strip: moving loadable section .gnu.version_r, is this intentional?
strip: moving loadable section .rel.dyn, is this intentional?
strip: moving loadable section .rel.plt, is this intentional?
strip: moving loadable section .init, is this intentional?
strip: moving loadable section .plt, is this intentional?
strip: moving loadable section .text, is this intentional?
strip: moving loadable section .fini, is this intentional?
strip: moving loadable section .rodata, is this intentional?
strip: moving loadable section .eh_frame, is this intentional?
strip: elf_update() failed: Layout constraint violation
*** Error code 1

Stop.
make: stopped in /arc/src/FreeBSD/ports/head/www/rubygem-selenium-webdriver
Comment 1 Zane C. Bowers-Hadley 2017-06-29 11:30:11 UTC
Hmm... this appears to only happen if I have WRKDIRPREFIX set.

If I unset that, it works fine.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-13 23:33:54 UTC
Maintainer feedback?
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2018-01-14 05:20:01 UTC
Poudriere use WRKDIRPREFIX=/wrkdirs by default but we did not encounter build failure for this reason.
Comment 4 Zane C. Bowers-Hadley 2018-01-24 03:42:47 UTC
I've been using WRKDIRPREFIX=/usr/obj .
Comment 5 Zane C. Bowers-Hadley 2018-01-24 03:46:19 UTC
Setting WRKDIRPREFIX=/wrkdirs did not have any affect.

[root@vulpes]/arc/src/ports/www/rubygem-selenium-webdriver>make                                                                                             [0]
===>  License APACHE20 accepted by the user
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by rubygem-selenium-webdriver-3.8.0 for building
===>  Extracting for rubygem-selenium-webdriver-3.8.0
=> SHA256 Checksum OK for rubygem/selenium-webdriver-3.8.0.gem.
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/ruby24 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/gem24 - found
Unpacked gem: '/wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.8.0'
===>  Patching for rubygem-selenium-webdriver-3.8.0
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/ruby24 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/ruby24 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/gem24 - found
===>  Configuring for rubygem-selenium-webdriver-3.8.0
===>  Building for rubygem-selenium-webdriver-3.8.0
  Successfully built RubyGem
  Name: selenium-webdriver
  Version: 3.8.0
  File: selenium-webdriver-3.8.0.gem
===>  Staging for rubygem-selenium-webdriver-3.8.0
===>   rubygem-selenium-webdriver-3.8.0 depends on package: rubygem-childprocess>=0.5 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on package: rubygem-rubyzip>=1.0 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/ruby24 - found
===>   rubygem-selenium-webdriver-3.8.0 depends on file: /usr/local/bin/gem24 - found
===>   Generating temporary packing list
(cd /wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.8.0; /usr/bin/env RB_USER_INSTALL=yes LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/local/bin/gem24 install -l --no-update-sources --install-dir /wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.4 --ignore-dependencies --bindir=/wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/bin --rdoc --ri selenium-webdriver-3.8.0.gem -- --build-args )
Successfully installed selenium-webdriver-3.8.0
Parsing documentation for selenium-webdriver-3.8.0
Installing ri documentation for selenium-webdriver-3.8.0
Installing darkfish documentation for selenium-webdriver-3.8.0
Done installing documentation for selenium-webdriver after 26 seconds
1 gem installed
/bin/rm -f -r /wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.4/build_info/
/usr/bin/find /wrkdirs/arc/src/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.4 -type f -name '*.so' -exec /usr/bin/strip {} +
strip: moving loadable section .note.gnu.build-id, is this intentional?
strip: moving loadable section .hash, is this intentional?
strip: moving loadable section .gnu.hash, is this intentional?
strip: moving loadable section .dynsym, is this intentional?
strip: moving loadable section .dynstr, is this intentional?
strip: moving loadable section .gnu.version, is this intentional?
strip: moving loadable section .gnu.version_r, is this intentional?
strip: moving loadable section .rel.dyn, is this intentional?
strip: moving loadable section .rel.plt, is this intentional?
strip: moving loadable section .init, is this intentional?
strip: moving loadable section .plt, is this intentional?
strip: moving loadable section .text, is this intentional?
strip: moving loadable section .fini, is this intentional?
strip: moving loadable section .rodata, is this intentional?
strip: moving loadable section .eh_frame, is this intentional?
strip: elf_update() failed: Layout constraint violation
*** Error code 1

Stop.
make: stopped in /arc/src/ports/www/rubygem-selenium-webdriver
Comment 6 Zane C. Bowers-Hadley 2018-03-30 03:04:17 UTC
On a interesting note, I have a 100% failure rate trying to build this if zsh is the current shell I am in.

I have to be in csh with WRKDIRPREFIX not set.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-03-30 03:51:03 UTC
Do you have zsh as standardshell for root? if so, I don't think this is a good idea.
Comment 8 Zane C. Bowers-Hadley 2018-03-30 03:52:40 UTC
For root I have csh, but am using zsh with toor.
Comment 9 Marián Černý 2019-05-29 17:17:53 UTC
Today the same things happened to me as well. I am using csh and have WRKDIRPREFIX set to /tmp/portbuild.

I just re-run "make install" and it was ok on the second try.
Comment 10 Marko Cupać 2019-05-31 13:07:21 UTC
Build is failing in poudriere:

...
Successfully installed selenium-webdriver-3.14.1
1 gem installed
/bin/rm -f -r /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/build_info/
/usr/bin/find /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so' -exec /usr/bin/strip {} +
strip: moving loadable section .note.gnu.build-id, is this intentional?
strip: moving loadable section .hash, is this intentional?
strip: moving loadable section .gnu.hash, is this intentional?
strip: moving loadable section .dynsym, is this intentional?
strip: moving loadable section .dynstr, is this intentional?
strip: moving loadable section .gnu.version, is this intentional?
strip: moving loadable section .gnu.version_r, is this intentional?
strip: moving loadable section .rel.dyn, is this intentional?
strip: moving loadable section .rel.plt, is this intentional?
strip: moving loadable section .init, is this intentional?
strip: moving loadable section .plt, is this intentional?
strip: moving loadable section .text, is this intentional?
strip: moving loadable section .fini, is this intentional?
strip: moving loadable section .rodata, is this intentional?
strip: moving loadable section .eh_frame, is this intentional?
strip: elf_update() failed: Layout constraint violation
*** Error code 1
Comment 11 Laurent Daverio 2019-06-04 09:48:41 UTC
Hello everybody,

actually, this bug is blocking the build of www/rubygem-rails5 and thence, of www/gitlab-ce, at least the current version, 11.11.0, as the problem didn't with the previous version, 11.10.4.xx

So, I guess this makes the priority of the bug a little higher than "Affects Only Me" now.

Have a great day,

Laurent.
Comment 12 Matthias Fechner freebsd_committer freebsd_triage 2019-06-04 12:02:40 UTC
(In reply to Marko Cupać from comment #10)
I had exactly the same problem, but building it again succeeded then (with poudriere).
It could be an `svn up` here in between.
Comment 13 Marko Cupać 2019-06-04 12:17:01 UTC
(In reply to Matthias Fechner from comment #12)

I was also re-trying builds (after fetching portsnap) and it failed multiple times. Finally, it build fine a few minutes ago. I'm using ccache, I had some problems with it in the past, could it be related? Or something in ports infrastructure? I don't see any changes to the port itself since quite some time.

log:

Successfully installed selenium-webdriver-3.14.1
1 gem installed
/bin/rm -f -r /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/build_info/
/usr/bin/find /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so' -exec /usr/bin/strip {} +
/usr/bin/find /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f \( -name mkmf.log -or -name gem_make.out \) -delete
/bin/rm -f -r /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/ext  /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/cache 2> /dev/null || true
/bin/rmdir /wrkdirs/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/extensions 2> /dev/null || true
====> Compressing man pages (compress-man)
===========================================================================
=======================<phase: package        >============================
===>  Building package for rubygem-selenium-webdriver-3.14.1
===========================================================================
=>> Cleaning up wrkdir
===>  Cleaning for rubygem-selenium-webdriver-3.14.1
build of www/rubygem-selenium-webdriver | rubygem-selenium-webdriver-3.14.1 ended at Tue Jun  4 12:28:32 CEST 2019
build time: 00:00:17
Comment 14 Marián Černý 2019-06-04 20:21:29 UTC
The build has failed on other mashine for me now. First re-run failed as well. Second re-run worked:

# cd /usr/ports/www/rubygem-selenium-webdriver/
root@portbuild:/usr/ports/www/rubygem-selenium-webdriver # make install
===>  Staging for rubygem-selenium-webdriver-3.14.1
===>   rubygem-selenium-webdriver-3.14.1 depends on package: rubygem-childprocess>=0.5 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on package: rubygem-rubyzip>=1.2.2 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on file: /usr/local/bin/ruby25 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on file: /usr/local/bin/gem25 - found
===>   Generating temporary packing list
(cd /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.14.1; /usr/bin/env RB_USER_INSTALL=yes LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/local/bin/gem25 install -l --no-update-sources --install-dir /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 --ignore-dependencies --bindir=/tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/bin --no-document selenium-webdriver-3.14.1.gem -- )
Successfully installed selenium-webdriver-3.14.1
1 gem installed
/bin/rm -f -r /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/build_info/
/usr/bin/find /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so' -exec /usr/bin/strip {} +
strip: moving loadable section .note.gnu.build-id, is this intentional?
strip: moving loadable section .hash, is this intentional?
strip: moving loadable section .gnu.hash, is this intentional?
strip: moving loadable section .dynsym, is this intentional?
strip: moving loadable section .dynstr, is this intentional?
strip: moving loadable section .gnu.version, is this intentional?
strip: moving loadable section .gnu.version_r, is this intentional?
strip: moving loadable section .rel.dyn, is this intentional?
strip: moving loadable section .rel.plt, is this intentional?
strip: moving loadable section .init, is this intentional?
strip: moving loadable section .plt, is this intentional?
strip: moving loadable section .text, is this intentional?
strip: moving loadable section .fini, is this intentional?
strip: moving loadable section .rodata, is this intentional?
strip: moving loadable section .eh_frame, is this intentional?
strip: elf_update() failed: Layout constraint violation
*** Error code 1

Stop.
make: stopped in /usr/ports/www/rubygem-selenium-webdriver
root@portbuild:/usr/ports/www/rubygem-selenium-webdriver # make install
===>  Staging for rubygem-selenium-webdriver-3.14.1
===>   rubygem-selenium-webdriver-3.14.1 depends on package: rubygem-childprocess>=0.5 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on package: rubygem-rubyzip>=1.2.2 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on file: /usr/local/bin/ruby25 - found
===>   rubygem-selenium-webdriver-3.14.1 depends on file: /usr/local/bin/gem25 - found
===>   Generating temporary packing list
(cd /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/selenium-webdriver-3.14.1; /usr/bin/env RB_USER_INSTALL=yes LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/local/bin/gem25 install -l --no-update-sources --install-dir /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 --ignore-dependencies --bindir=/tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/bin --no-document selenium-webdriver-3.14.1.gem -- )
Successfully installed selenium-webdriver-3.14.1
1 gem installed
/bin/rm -f -r /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/build_info/
/usr/bin/find /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so' -exec /usr/bin/strip {} +
/usr/bin/find /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f \( -name mkmf.log -or -name gem_make.out \) -delete
/bin/rm -f -r /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/ext  /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/cache 2> /dev/null || true
/bin/rmdir /tmp/portbuild/usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/extensions 2> /dev/null || true
====> Compressing man pages (compress-man)
===>  Installing for rubygem-selenium-webdriver-3.14.1
===>  Checking if rubygem-selenium-webdriver is already installed
===>   Registering installation for rubygem-selenium-webdriver-3.14.1
[portbuild.pematon.com] Installing rubygem-selenium-webdriver-3.14.1...
Comment 15 Marián Černý 2019-06-04 20:26:40 UTC
Tried to simulate the problem: make clean ; make deinstall ; make install ... and it failed ... I had to do "make install" two more times until it succeeded.
Once again make clean ; make deinstall ... and I had to do "make install" *eight* times until it succeeded. So it seams quite random.
Comment 16 Laurent Daverio 2019-06-04 20:45:28 UTC
(In reply to Marián Černý from comment #15)
I tried to reproduce it, but it fails consistently here. At least that's logical ;)
Comment 17 Laurent Daverio 2019-06-06 18:57:53 UTC
(In reply to Laurent Daverio from comment #16)

For the people who are here because they are trying to install Rails or Gitlab, I've used the following workaround :

1- In /usr/local/www/gitlab-ce, type (as root) "gem install selenium-webdriver"

2- Edit Makefile in /usr/ports/www/rubygem-rails5 to remover the dependency to rubygem-selenium-webdriver

3- From there, Rails and Gitlal can be installed normally.

Hope this helps :) I've been a few days without Gitlab, and this was becoming problematic to me.

Laurent.
Comment 18 Otacílio de Araújo Ramos Neto 2019-06-27 23:07:47 UTC
The problem is related with this line:

/usr/bin/find /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so' -exec /usr/bin/strip {} +

This line expands to:

/usr/bin/strip /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so

That causes: 
strip: moving loadable section .note.gnu.build-id, is this intentional?
strip: moving loadable section .hash, is this intentional?
strip: moving loadable section .gnu.hash, is this intentional?
strip: moving loadable section .dynsym, is this intentional?
strip: moving loadable section .dynstr, is this intentional?
strip: moving loadable section .gnu.version, is this intentional?
strip: moving loadable section .gnu.version_r, is this intentional?
strip: moving loadable section .rel.dyn, is this intentional?
strip: moving loadable section .rel.plt, is this intentional?
strip: moving loadable section .init, is this intentional?
strip: moving loadable section .plt, is this intentional?
strip: moving loadable section .text, is this intentional?
strip: moving loadable section .fini, is this intentional?
strip: moving loadable section .rodata, is this intentional?
strip: moving loadable section .eh_frame, is this intentional?
strip: elf_update() failed: Layout constraint violation

BUT if the order of amd64 and x86 is swaped to:

/usr/bin/strip /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/firefox/native/linux/amd64/x_ignore_nofocus.so

The line works fine. I think that the order of the file name return in find is 
the cause of problem. Maybe a approach like:

for i in `/usr/bin/find /usr/ports/www/rubygem-selenium-webdriver/work/stage/usr/local/lib/ruby/gems/2.5 -type f -name '*.so'`; 
do
	strip $i
done

is a better choice.
Comment 19 Otacílio de Araújo Ramos Neto 2019-06-27 23:26:21 UTC
1. Runing make patch

2. Removing "lib/
selenium/webdriver/firefox/native/linux/x86/x_ignore_nofocus.so".freeze 
 from work/selenium-webdriver-3.14.1/selenium-webdriver.gemspec

3. make install 

Is a workaround that works for me
Comment 20 commit-hook freebsd_committer freebsd_triage 2019-07-03 20:42:01 UTC
A commit references this bug:

Author: mfechner
Date: Wed Jul  3 20:41:52 UTC 2019
New revision: 505792
URL: https://svnweb.freebsd.org/changeset/ports/505792

Log:
  Do not strip the libs as this breaks the build of this package.
  The build does not always fail, but I can reproduce the build with every second build by using poudriere:
  poudriere testport -j 120amd64 www/rubygem-selenium-webdriver

  The error message that is displayed is:
  strip: moving loadable section .note.gnu.build-id, is this intentional?
  strip: moving loadable section .hash, is this intentional?
  strip: moving loadable section .gnu.hash, is this intentional?
  strip: moving loadable section .dynsym, is this intentional?
  strip: moving loadable section .dynstr, is this intentional?
  strip: moving loadable section .gnu.version, is this intentional?
  strip: moving loadable section .gnu.version_r, is this intentional?
  strip: moving loadable section .rel.dyn, is this intentional?
  strip: moving loadable section .rel.plt, is this intentional?
  strip: moving loadable section .init, is this intentional?
  strip: moving loadable section .plt, is this intentional?
  strip: moving loadable section .text, is this intentional?
  strip: moving loadable section .fini, is this intentional?
  strip: moving loadable section .rodata, is this intentional?
  strip: moving loadable section .eh_frame, is this intentional?
  strip: elf_update() failed: Layout constraint violation
  *** Error code 1

  PR:		220330
  Reported by:	vvelox at vvelox.net

Changes:
  head/www/rubygem-selenium-webdriver/Makefile
Comment 21 Matthias Fechner freebsd_committer freebsd_triage 2019-07-03 20:48:00 UTC
I hope the commit fixes it for all of you.
Thanks for the detailed information, that helped me to reproduce it.