From: "mame (Yusuke Endoh) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "mame (Yusuke Endoh)" <noreply@ruby-lang.org>
Subject: [ruby-core:117960] [Ruby master Bug#20500] Non-system directories are not searched when checking for jemalloc headers and libs, and building `enc`
Date: Tue, 21 May 2024 19:14:30 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-108377.20240521191429.53336@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20500.20240521155348.53336@ruby-lang.org>
Issue #20500 has been updated by mame (Yusuke Endoh).
Assignee set to nobu (Nobuyoshi Nakada)
----------------------------------------
Bug #20500: Non-system directories are not searched when checking for jemalloc headers and libs, and building `enc`
https://bugs.ruby-lang.org/issues/20500#change-108377
* Author: lish82 (Hiroki Katagiri)
* Status: Open
* Assignee: nobu (Nobuyoshi Nakada)
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I found a problem similar to #20494 on jemalloc
It's similar to #20494, but it has a few more issues
Problems:
- Non-system directories (specified by `--with-opt-dir`) are not searched when checking jemalloc headers (almost the same as #20494)
- Non-system directories are not searched when checking jemalloc libs
- Non-system directories are not searched when building the `enc` directory sources
I have confirmed that this problem can be fixed by applying the following patch:
```patch
diff --git a/configure.ac b/configure.ac
index 169662c..b2dce70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1392,6 +1392,8 @@ AC_ARG_WITH([jemalloc],
[with_jemalloc=$withval], [with_jemalloc=no])
AS_IF([test "x$with_jemalloc" != xno],[
# find jemalloc header first
+ save_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${INCFLAGS} ${CPPFLAGS}"
malloc_header=
AC_CHECK_HEADER(jemalloc/jemalloc.h, [malloc_header=jemalloc/jemalloc.h], [
AC_CHECK_HEADER(jemalloc.h, [malloc_header=jemalloc.h])
@@ -1423,6 +1425,8 @@ AS_IF([test "x$with_jemalloc" != xno],[
done
done
])
+ CPPFLAGS="${save_CPPFLAGS}"
+ unset save_CPPFLAGS
with_jemalloc=${rb_cv_jemalloc_library}
AS_CASE(["$with_jemalloc"],
[no],
diff --git a/enc/Makefile.in b/enc/Makefile.in
index 6920bc9..ce93fdd 100644
--- a/enc/Makefile.in
+++ b/enc/Makefile.in
@@ -52,7 +52,7 @@ optflags = @optflags@
debugflags = @debugflags@
warnflags = @warnflags@
CCDLFLAGS = @CCDLFLAGS@
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir) @incflags@
DEFS = @DEFS@
CPPFLAGS = @CPPFLAGS@ -DONIG_ENC_REGISTER=rb_enc_register
LDFLAGS = @LDFLAGS@
```
---
On a side note, I think there might be other parts affected by the changes bellow:
https://github.com/ruby/ruby/pull/8449
I thought it might be a good idea to review everything thoroughly
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
next prev parent reply other threads:[~2024-05-22 1:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-21 15:53 [ruby-core:117957] " lish82 (Hiroki Katagiri) via ruby-core
2024-05-21 19:14 ` mame (Yusuke Endoh) via ruby-core [this message]
2024-05-22 5:43 ` [ruby-core:117964] " nobu (Nobuyoshi Nakada) via ruby-core
2024-05-22 9:20 ` [ruby-core:117965] " lish82 (Hiroki Katagiri) via ruby-core
2024-05-22 9:28 ` [ruby-core:117967] " lish82 (Hiroki Katagiri) via ruby-core
2024-05-23 3:13 ` [ruby-core:117973] " nobu (Nobuyoshi Nakada) via ruby-core
2024-05-29 23:53 ` [ruby-core:118085] " k0kubun (Takashi Kokubun) via ruby-core
2024-07-15 13:02 ` [ruby-core:118605] " nagachika (Tomoyuki Chikanaga) via ruby-core
2024-07-15 13:11 ` [ruby-core:118608] " nagachika (Tomoyuki Chikanaga) via ruby-core
2024-10-21 8:50 ` [ruby-core:119554] " nagachika (Tomoyuki Chikanaga) via ruby-core
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-108377.20240521191429.53336@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).