ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90964] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing
       [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
@ 2019-01-10  4:03 ` mistydemeo
  2019-01-10  7:53 ` [ruby-core:90975] " shevegen
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: mistydemeo @ 2019-01-10  4:03 UTC (permalink / raw)
  To: ruby-core

Issue #15520 has been reported by mistydemeo (Misty De Meo).

----------------------------------------
Bug #15520: [patch] configure should refuse to build with jemalloc when headers are missing
https://bugs.ruby-lang.org/issues/15520

* Author: mistydemeo (Misty De Meo)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-01-10 fix_jemalloc_i.. 66768) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When the `--with-jemalloc` option is passed, the configure script will correctly fail with an error if the library is missing. However, if the library is present and headers are missing, configure will succeed and allow the build to proceed. The actual build is unlikely to succeed in this case since the functions won't be defined.

Steps to reproduce:
1. Install jemalloc.
2. Delete jemalloc's headers.
3. Run ./configure --with-jemalloc &&is  make

Expected behaviour:
configure fails because the requested jemalloc's headers are missing

Actual behaviour:
configure succeeds. On macOS, the build then fails with the following:

~~~
compiling gc.c
gc.c:7955:12: error: implicit declaration of function 'malloc_usable_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    return malloc_usable_size(ptr);
           ^
gc.c:7955:12: note: did you mean 'malloc_good_size'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/malloc/malloc.h:134:15: note:
      'malloc_good_size' declared here
extern size_t malloc_good_size(size_t size);
              ^
1 error generated.
make: *** [gc.o] Error 1
~~~

The attached patch fixes this by ensuring that configure fails if `--with-jemalloc` is passed but the headers are missing in the same way that it will fail if the library is missing.

This patch is against trunk. I've also reproduced it in several previous versions of Ruby.

---Files--------------------------------
0001-configure-refuse-to-build-with-jemalloc-when-header-.patch (933 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:90975] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing
       [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
  2019-01-10  4:03 ` [ruby-core:90964] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing mistydemeo
@ 2019-01-10  7:53 ` shevegen
  2019-01-10 23:40 ` [ruby-core:91008] " mistydemeo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: shevegen @ 2019-01-10  7:53 UTC (permalink / raw)
  To: ruby-core

Issue #15520 has been updated by shevegen (Robert A. Heiler).


>  The actual build is unlikely to succeed in this case since the functions won't be defined.

Agreed, makes sense to me. I remember that I may run into similar situations every now
and then when I e. g. wish to upgrade some program manually on my own but may have 
forgotten to remove all old parts of that program (e. g. under the /usr/ hierarchy). I don't
know if this applies to Mac but on Linux I remember similar situations here and there.

----------------------------------------
Bug #15520: [patch] configure should refuse to build with jemalloc when headers are missing
https://bugs.ruby-lang.org/issues/15520#change-76188

* Author: mistydemeo (Misty De Meo)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-01-10 fix_jemalloc_i.. 66768) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When the `--with-jemalloc` option is passed, the configure script will correctly fail with an error if the library is missing. However, if the library is present and headers are missing, configure will succeed and allow the build to proceed. The actual build is unlikely to succeed in this case since the functions won't be defined.

Steps to reproduce:
1. Install jemalloc.
2. Delete jemalloc's headers.
3. Run ./configure --with-jemalloc &&is  make

Expected behaviour:
configure fails because the requested jemalloc's headers are missing

Actual behaviour:
configure succeeds. On macOS, the build then fails with the following:

~~~
compiling gc.c
gc.c:7955:12: error: implicit declaration of function 'malloc_usable_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    return malloc_usable_size(ptr);
           ^
gc.c:7955:12: note: did you mean 'malloc_good_size'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/malloc/malloc.h:134:15: note:
      'malloc_good_size' declared here
extern size_t malloc_good_size(size_t size);
              ^
1 error generated.
make: *** [gc.o] Error 1
~~~

The attached patch fixes this by ensuring that configure fails if `--with-jemalloc` is passed but the headers are missing in the same way that it will fail if the library is missing.

This patch is against trunk. I've also reproduced it in several previous versions of Ruby.

---Files--------------------------------
0001-configure-refuse-to-build-with-jemalloc-when-header-.patch (933 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:91008] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing
       [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
  2019-01-10  4:03 ` [ruby-core:90964] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing mistydemeo
  2019-01-10  7:53 ` [ruby-core:90975] " shevegen
@ 2019-01-10 23:40 ` mistydemeo
  2019-01-17 22:08 ` [ruby-core:91149] " naruse
  2019-03-13  0:06 ` [ruby-core:91803] " nagachika00
  4 siblings, 0 replies; 5+ messages in thread
From: mistydemeo @ 2019-01-10 23:40 UTC (permalink / raw)
  To: ruby-core

Issue #15520 has been updated by mistydemeo (Misty De Meo).


Thanks for the quick response! Could you backport this to the active backport branches, too?

----------------------------------------
Bug #15520: [patch] configure should refuse to build with jemalloc when headers are missing
https://bugs.ruby-lang.org/issues/15520#change-76229

* Author: mistydemeo (Misty De Meo)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-01-10 fix_jemalloc_i.. 66768) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When the `--with-jemalloc` option is passed, the configure script will correctly fail with an error if the library is missing. However, if the library is present and headers are missing, configure will succeed and allow the build to proceed. The actual build is unlikely to succeed in this case since the functions won't be defined.

Steps to reproduce:
1. Install jemalloc.
2. Delete jemalloc's headers.
3. Run ./configure --with-jemalloc &&is  make

Expected behaviour:
configure fails because the requested jemalloc's headers are missing

Actual behaviour:
configure succeeds. On macOS, the build then fails with the following:

~~~
compiling gc.c
gc.c:7955:12: error: implicit declaration of function 'malloc_usable_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    return malloc_usable_size(ptr);
           ^
gc.c:7955:12: note: did you mean 'malloc_good_size'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/malloc/malloc.h:134:15: note:
      'malloc_good_size' declared here
extern size_t malloc_good_size(size_t size);
              ^
1 error generated.
make: *** [gc.o] Error 1
~~~

The attached patch fixes this by ensuring that configure fails if `--with-jemalloc` is passed but the headers are missing in the same way that it will fail if the library is missing.

This patch is against trunk. I've also reproduced it in several previous versions of Ruby.

---Files--------------------------------
0001-configure-refuse-to-build-with-jemalloc-when-header-.patch (933 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:91149] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing
       [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-10 23:40 ` [ruby-core:91008] " mistydemeo
@ 2019-01-17 22:08 ` naruse
  2019-03-13  0:06 ` [ruby-core:91803] " nagachika00
  4 siblings, 0 replies; 5+ messages in thread
From: naruse @ 2019-01-17 22:08 UTC (permalink / raw)
  To: ruby-core

Issue #15520 has been updated by naruse (Yui NARUSE).

Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE

ruby_2_6 r66852 merged revision(s) 66779.

----------------------------------------
Bug #15520: [patch] configure should refuse to build with jemalloc when headers are missing
https://bugs.ruby-lang.org/issues/15520#change-76380

* Author: mistydemeo (Misty De Meo)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-01-10 fix_jemalloc_i.. 66768) [x86_64-darwin18]
* Backport: 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
When the `--with-jemalloc` option is passed, the configure script will correctly fail with an error if the library is missing. However, if the library is present and headers are missing, configure will succeed and allow the build to proceed. The actual build is unlikely to succeed in this case since the functions won't be defined.

Steps to reproduce:
1. Install jemalloc.
2. Delete jemalloc's headers.
3. Run ./configure --with-jemalloc &&is  make

Expected behaviour:
configure fails because the requested jemalloc's headers are missing

Actual behaviour:
configure succeeds. On macOS, the build then fails with the following:

~~~
compiling gc.c
gc.c:7955:12: error: implicit declaration of function 'malloc_usable_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    return malloc_usable_size(ptr);
           ^
gc.c:7955:12: note: did you mean 'malloc_good_size'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/malloc/malloc.h:134:15: note:
      'malloc_good_size' declared here
extern size_t malloc_good_size(size_t size);
              ^
1 error generated.
make: *** [gc.o] Error 1
~~~

The attached patch fixes this by ensuring that configure fails if `--with-jemalloc` is passed but the headers are missing in the same way that it will fail if the library is missing.

This patch is against trunk. I've also reproduced it in several previous versions of Ruby.

---Files--------------------------------
0001-configure-refuse-to-build-with-jemalloc-when-header-.patch (933 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:91803] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing
       [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-01-17 22:08 ` [ruby-core:91149] " naruse
@ 2019-03-13  0:06 ` nagachika00
  4 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2019-03-13  0:06 UTC (permalink / raw)
  To: ruby-core

Issue #15520 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE to 2.4: REQUIRED, 2.5: DONE, 2.6: DONE

ruby_2_5 r67240 merged revision(s) 66779.

----------------------------------------
Bug #15520: [patch] configure should refuse to build with jemalloc when headers are missing
https://bugs.ruby-lang.org/issues/15520#change-77077

* Author: mistydemeo (Misty De Meo)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-01-10 fix_jemalloc_i.. 66768) [x86_64-darwin18]
* Backport: 2.4: REQUIRED, 2.5: DONE, 2.6: DONE
----------------------------------------
When the `--with-jemalloc` option is passed, the configure script will correctly fail with an error if the library is missing. However, if the library is present and headers are missing, configure will succeed and allow the build to proceed. The actual build is unlikely to succeed in this case since the functions won't be defined.

Steps to reproduce:
1. Install jemalloc.
2. Delete jemalloc's headers.
3. Run ./configure --with-jemalloc &&is  make

Expected behaviour:
configure fails because the requested jemalloc's headers are missing

Actual behaviour:
configure succeeds. On macOS, the build then fails with the following:

~~~
compiling gc.c
gc.c:7955:12: error: implicit declaration of function 'malloc_usable_size' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    return malloc_usable_size(ptr);
           ^
gc.c:7955:12: note: did you mean 'malloc_good_size'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/malloc/malloc.h:134:15: note:
      'malloc_good_size' declared here
extern size_t malloc_good_size(size_t size);
              ^
1 error generated.
make: *** [gc.o] Error 1
~~~

The attached patch fixes this by ensuring that configure fails if `--with-jemalloc` is passed but the headers are missing in the same way that it will fail if the library is missing.

This patch is against trunk. I've also reproduced it in several previous versions of Ruby.

---Files--------------------------------
0001-configure-refuse-to-build-with-jemalloc-when-header-.patch (933 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-13  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15520.20190110040311@ruby-lang.org>
2019-01-10  4:03 ` [ruby-core:90964] [Ruby trunk Bug#15520] [patch] configure should refuse to build with jemalloc when headers are missing mistydemeo
2019-01-10  7:53 ` [ruby-core:90975] " shevegen
2019-01-10 23:40 ` [ruby-core:91008] " mistydemeo
2019-01-17 22:08 ` [ruby-core:91149] " naruse
2019-03-13  0:06 ` [ruby-core:91803] " nagachika00

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 read-only IMAP folder(s) and NNTP newsgroup(s).