Bug 244991 - www/rubygem-passenger ./passenger-install-apache2-module -> make: don't know how to make /var/.../libev/ev.c
Summary: www/rubygem-passenger ./passenger-install-apache2-module -> make: don't know ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sergey A. Osokin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-22 22:01 UTC by gessel
Modified: 2020-03-24 18:24 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gessel 2020-03-22 22:01:12 UTC
Trying to rebuild passenger for an update using

# /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/bin/passenger-install-apache2-module
I get the following error:

rm -f buildout/libev/libev.la
cd buildout/libev/ && make libev.la V=1
make: don't know how to make /var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/ev.c. Stop

make: stopped in /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev
rake aborted!
Command failed with status (2): [cd buildout/libev/ && make libev.la V=1...]


It appears to be related to the problem reported here: https://www.pseudomoon.jp/dotclear/index.php?post/2019/01/24/passenger-install-apache2-module-%E3%81%A7%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%9F%E8%A9%B1%E3%80%82



# ls /var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/
ls: /var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/: No such file or directory


In the Makefile:

VPATH = /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev

which looks right:

 # ls /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev
aclocal.m4      config.guess    configure       ev_epoll.c      ev_port.c       ev_win32.c      ev.h            event.h         LICENSE         Makefile.in     README
autogen.sh      config.h.in     configure.ac    ev_kqueue.c     ev_select.c     ev_wrap.h       ev++.h          install-sh      ltmain.sh       missing
Changes         config.sub      depcomp         ev_poll.c       ev_vars.h       ev.c            event.c         libev.m4        Makefile.am     mkinstalldirs

# grep -r "work-apache" /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/

verifies similar issues as reported by takagiwa at pseudomooon.jp

/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/event.Plo:2:  /var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/event.c \

etc.

Replace:

/var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/
with 
/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/

and
/var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/ruby_native_extension
with
/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/ruby_native_extension

backup first: 

# cp /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/event.Plo /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/event.Plo.bak
# cp /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/ev.Plo /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/ev.Plo.bak
# cp /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/ruby/ruby-2.6.5-x86_64-freebsd/Makefile /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/ruby/ruby-2.6.5-x86_64-freebsd/Makefile.bak

sed it up

# sed -i "" "s|/var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/|/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/|g" /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/event.Plo
# sed -i "" "s|/var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/|/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/cxx_supportlib/vendor-modified/libev/|g" /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/libev/.deps/ev.Plo
# sed -i "" "s|/var/ports/usr/ports/www/rubygem-passenger/work-apache/passenger-6.0.4/src/ruby_native_extension|/usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/src/ruby_native_extension|g" /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/ruby/ruby-2.6.5-x86_64-freebsd/Makefile

check the work

# grep -r "work-apache" /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/buildout/

looks good, try again:

# /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/bin/passenger-install-apache2-module

SUCCESS!
Comment 1 Sergey A. Osokin freebsd_committer 2020-03-23 14:31:44 UTC
Hi,

thanks for the report.


I've just tried to reproduce the issue with freshly downloaded www/rubygem-passenger port, but no luck, everything works fine.

Could you please add more details how to reproduce the issue.

Thanks.
Comment 2 Sergey A. Osokin freebsd_committer 2020-03-24 18:24:24 UTC
Hi,

my guess is you tried to use the /usr/local/lib/ruby/gems/2.6/gems/passenger-6.0.4/bin/passenger-install-apache2-module to rebuild the apache module.

If that the case then I would recommend to use a standard approach:

# cd /usr/ports/www/rubygem-passenger
# make install clean

or run

# pkg install rubygem-passenger-apache-6.0.4_1

to install a binary package.

Hope it helps.