| Summary: | databases/ruby-bdb: update to default ruby25 breaks ruby-bdb | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Marco Beishuizen <mbeis> | ||||||
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> | ||||||
| Status: | Closed Overcome By Events | ||||||||
| Severity: | Affects Many People | CC: | fabian, meta, mfechner, ml, ume, w.schwarzenfeld | ||||||
| Priority: | --- | Keywords: | needs-qa, regression | ||||||
| Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(knu) |
||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233901 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237421 |
||||||||
| Attachments: |
|
||||||||
|
Description
Marco Beishuizen
2019-04-20 10:44:41 UTC
CC committer of ports r499391 Created attachment 203826 [details]
Patch to fix build ruby-bdb with ruby25
How about this patch?
The patch did work on two of my systems with FreeBSD 11.2-RELEASE-p9 / amd64. (In reply to Hajimu UMEMOTO from comment #2) Let's ship it to upstream rather than patching in ports. The patch doesn't work here on 12.0-STABLE:
...
/usr/local/include/ruby-2.5/ruby/ruby.h:2206:6: note: expanded from macro 'rb_sc an_args_count_hash'
rb_scan_args_count_block(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2201:6: note: expanded from macro 'rb_sc an_args_count_block'
rb_scan_args_count_end(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2197:12: note: expanded from macro 'rb_s can_args_count_end'
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c:4227:12: warning: division by zero is undefined [-Wdivision-by-zero]
switch(rb_scan_args(argc, argv, "02", &iov, &flagv)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2182:9: note: expanded from macro 'rb_sc an_args'
rb_scan_args0(argc,argvp,fmt,\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2355:9: note: expanded from macro 'rb_sc an_args0'
(rb_scan_args_verify(fmt, varc), vars))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2240:11: note: expanded from macro 'rb_s can_args_verify'
verify = rb_scan_args_verify_count(fmt, varc); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/local/include/ruby-2.5/ruby/ruby.h:2206:6: note: expanded from macro 'rb_sc an_args_count_hash'
rb_scan_args_count_block(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2201:6: note: expanded from macro 'rb_sc an_args_count_block'
rb_scan_args_count_end(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2197:12: note: expanded from macro 'rb_s can_args_count_end'
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.c:4227:12: warning: division by zero is undefined [-Wdivision-by-zero]
switch(rb_scan_args(argc, argv, "02", &iov, &flagv)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2182:9: note: expanded from macro 'rb_sc an_args'
rb_scan_args0(argc,argvp,fmt,\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2355:9: note: expanded from macro 'rb_scan_args0'
(rb_scan_args_verify(fmt, varc), vars))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2240:11: note: expanded from macro 'rb_scan_args_verify'
verify = rb_scan_args_verify_count(fmt, varc); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/usr/local/include/ruby-2.5/ruby/ruby.h:2206:6: note: expanded from macro 'rb_scan_args_count_hash'
rb_scan_args_count_block(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2201:6: note: expanded from macro 'rb_scan_args_count_block'
rb_scan_args_count_end(fmt, ofs, varc, vari) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ruby-2.5/ruby/ruby.h:2197:12: note: expanded from macro 'rb_scan_args_count_end'
((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130 warnings and 8 errors generated.
*** [common.o] Error code 1
make[3]: stopped in /usr/ports/databases/ruby-bdb/work/bdb-0.6.6/src
2 errors
...
cannot imagine, I think there is something goin wrong to apply the patch.
Working fine here on 11.2 amd64 and there are the same header files.
Only exception, with DOCS=on
ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/lib/ruby/site_ruby/2.5/amd64-freebsd11/bdb.so
/bin/mkdir -p
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb/doc
(cd /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6 && install -m 0644
Changes README.en bdb.rd docs/*.rd
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb)
(cd /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6/docs/doc && /bin/sh
-c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1)
&& /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd
'\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c
'\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE .
/ram/usr/ports/databases/ruby-bdb/work/stage/usr/local/share/doc/ruby25/bdb/doc)
cd: /ram/usr/ports/databases/ruby-bdb/work/bdb-0.6.6/docs/doc: No such
file or directory
*** Error code 2
Stop.
make[1]: stopped in /usr/ports/databases/ruby-bdb
*** Error code 1
I think it is needed to change in the Makefile
68 (cd ${WRKSRC}/docs/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc)
to
68 (cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/doc)
(In reply to Koichiro Iwao from comment #4) Sure, it should be. However, the owner of the upstream is the port maintainer. :-) (In reply to Marco Beishuizen from comment #5) Unfortunately, I cannot reproduce your problem on my 13-CURRENT, 12-STABLE and 11-STABLE boxes. Perhaps, it is another issue. Created attachment 203833 [details] Patch to fix build ruby-bdb with ruby25 #2 (In reply to w.schwarzenfeld from comment #6) The work/bdb-0.6.6/docs/doc has to be made by rdoc through build. I suspect that it fails to make due to lack of /usr/local/bin/rdoc on your box. I think the following change to Makefile fixes your issue: Index: Makefile =================================================================== --- Makefile (revision 499424) +++ Makefile (working copy) @@ -23,5 +21,5 @@ USE_RUBY= yes USE_RUBY_EXTCONF= yes -MAKE_ENV+= RUBY_RDOC=${LOCALBASE}/bin/rdoc +USE_RUBY_RDOC= yes ALL_TARGET= all rdoc I remade a patch which includes this chunk. After deleting, reinstalling and cleaning all relevant ports, the patch works and ruby-bdb builds fine. Portupgrade too. So thanks for the help! Regards, Marco (In reply to Hajimu UMEMOTO from comment #9) Yes, this solves the "problem" with DOC. I just testbuild the patch. A commit references this bug: Author: mfechner Date: Sat Apr 20 19:55:09 UTC 2019 New revision: 499463 URL: https://svnweb.freebsd.org/changeset/ports/499463 Log: Fix build problem with ruby 2.5. This patch should be included upstream. PR: 237410 Submitted by: ume@ Reported by: mbeis@xs4all.nl Reviewed by: mbeis@xs4all.nl, w.schwarzenfeld@utanet.at Changes: head/databases/ruby-bdb/Makefile head/databases/ruby-bdb/files/patch-src-common.c head/databases/ruby-bdb/files/patch-src-cursor.c head/databases/ruby-bdb/files/patch-src-recnum.c Patch is fine, I committed it now to unbreak portupgrade users. Could you please try to get this upstream patched? Thanks a lot. maintainer is upstream developer. I hope he apply numbers of ports local patches to upstream. Maintainer reset. Builds fine now. |