ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:88836] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
       [not found] <redmine.issue-15070.20180904162253@ruby-lang.org>
@ 2018-09-04 16:22 ` david.moles
  2018-09-04 16:49 ` [ruby-core:88837] " david.moles
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: david.moles @ 2018-09-04 16:22 UTC (permalink / raw
  To: ruby-core

Issue #15070 has been reported by dmolesuc3 (David Moles).

----------------------------------------
Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
https://bugs.ruby-lang.org/issues/15070

* Author: dmolesuc3 (David Moles)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
## Description

`./configure` fails for Ruby 2.5.1 on macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2).

(**Note:** I've seen the same error trying to install 2.4.1 and 2.4.4 with rvm, but haven't bothered downloading a source tarball to test upstream.)

## Steps to reproduce

1. On a Mac running macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2), download and unpack `ruby-2.5.1.tar.gz`.
2. In `ruby-2.5.1`, run `./configure`.

## Expected behavior

`./configure` succeeds.

## Actual behavior

- `./configure` fails with
   ```
   configure: error: something wrong with CFLAGS="-g -O2 "
   ```
- [config.log](https://gist.github.com/dmolesUC3/75354e60812b7b9429261ed5994527df)

Examining `config.log`, I see:

```
configure:7249: checking whether CFLAGS is valid
configure:7262: gcc -c -g -O2  -L /usr/local/opt/mysql@5.7/include conftest.c >&5
clang: warning: argument unused during compilation: '-L/usr/local/opt/mysql@5.7/include' [-Wunused-command-line-argument]
configure:7262: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:7267: result: no
configure:7269: error: something wrong with CFLAGS="-g -O2 "
```

If I create a file with that source, and compile it with that command line, it succeeds; and if I comment out the check (lines 7262-7272) from `./configure` and re-execute it with the arguments given in the `rvm install` output, it succeeds.

My bash skills aren't up to debugging the `ac_fn_c_try_compile()` function to see exactly why it thinks the test is failing, but it looks to me like the failure is spurious, i.e., there's nothing wrong with these flags and this check should not prevent ruby from being configured or compiled.





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

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

* [ruby-core:88837] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
       [not found] <redmine.issue-15070.20180904162253@ruby-lang.org>
  2018-09-04 16:22 ` [ruby-core:88836] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra david.moles
@ 2018-09-04 16:49 ` david.moles
  2018-09-04 23:29 ` [ruby-core:88840] [Ruby trunk Bug#15070][Feedback] " nobu
  2018-09-05 17:17 ` [ruby-core:88871] [Ruby trunk Bug#15070] " david.moles
  3 siblings, 0 replies; 4+ messages in thread
From: david.moles @ 2018-09-04 16:49 UTC (permalink / raw
  To: ruby-core

Issue #15070 has been updated by dmolesuc3 (David Moles).


Oops, the `config.log` I linked there was from the rvm attempt. But the tarball version [here](https://gist.github.com/dmolesUC3/97f2e20514a68de099d1b23db2b6a5e0) is basically identical.

----------------------------------------
Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
https://bugs.ruby-lang.org/issues/15070#change-73879

* Author: dmolesuc3 (David Moles)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
## Description

`./configure` fails for Ruby 2.5.1 on macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2).

(**Note:** I've seen the same error trying to install 2.4.1 and 2.4.4 with rvm, but haven't bothered downloading a source tarball to test upstream.)

## Steps to reproduce

1. On a Mac running macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2), download and unpack `ruby-2.5.1.tar.gz`.
2. In `ruby-2.5.1`, run `./configure`.

## Expected behavior

`./configure` succeeds.

## Actual behavior

- `./configure` fails with
   ```
   configure: error: something wrong with CFLAGS="-g -O2 "
   ```
- [config.log](https://gist.github.com/dmolesUC3/75354e60812b7b9429261ed5994527df)

Examining `config.log`, I see:

```
configure:7249: checking whether CFLAGS is valid
configure:7262: gcc -c -g -O2  -L /usr/local/opt/mysql@5.7/include conftest.c >&5
clang: warning: argument unused during compilation: '-L/usr/local/opt/mysql@5.7/include' [-Wunused-command-line-argument]
configure:7262: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:7267: result: no
configure:7269: error: something wrong with CFLAGS="-g -O2 "
```

If I create a file with that source, and compile it with that command line, it succeeds; and if I comment out the check (lines 7262-7272) from `./configure` and re-execute it with the arguments given in the `rvm install` output, it succeeds.

My bash skills aren't up to debugging the `ac_fn_c_try_compile()` function to see exactly why it thinks the test is failing, but it looks to me like the failure is spurious, i.e., there's nothing wrong with these flags and this check should not prevent ruby from being configured or compiled.





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

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

* [ruby-core:88840] [Ruby trunk Bug#15070][Feedback] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
       [not found] <redmine.issue-15070.20180904162253@ruby-lang.org>
  2018-09-04 16:22 ` [ruby-core:88836] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra david.moles
  2018-09-04 16:49 ` [ruby-core:88837] " david.moles
@ 2018-09-04 23:29 ` nobu
  2018-09-05 17:17 ` [ruby-core:88871] [Ruby trunk Bug#15070] " david.moles
  3 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2018-09-04 23:29 UTC (permalink / raw
  To: ruby-core

Issue #15070 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Feedback

dmolesuc3 (David Moles) wrote:
> ```
> configure:7249: checking whether CFLAGS is valid
> configure:7262: gcc -c -g -O2  -L /usr/local/opt/mysql@5.7/include conftest.c >&5
> clang: warning: argument unused during compilation: '-L/usr/local/opt/mysql@5.7/include' [-Wunused-command-line-argument]

From where does this `-L` option come?
It is a linker option and doesn't need to be in `CFLAGS`.
(and `include` path doesn't seem a library directory).

----------------------------------------
Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
https://bugs.ruby-lang.org/issues/15070#change-73882

* Author: dmolesuc3 (David Moles)
* Status: Feedback
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
## Description

`./configure` fails for Ruby 2.5.1 on macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2).

(**Note:** I've seen the same error trying to install 2.4.1 and 2.4.4 with rvm, but haven't bothered downloading a source tarball to test upstream.)

## Steps to reproduce

1. On a Mac running macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2), download and unpack `ruby-2.5.1.tar.gz`.
2. In `ruby-2.5.1`, run `./configure`.

## Expected behavior

`./configure` succeeds.

## Actual behavior

- `./configure` fails with
   ```
   configure: error: something wrong with CFLAGS="-g -O2 "
   ```
- [config.log](https://gist.github.com/dmolesUC3/75354e60812b7b9429261ed5994527df)

Examining `config.log`, I see:

```
configure:7249: checking whether CFLAGS is valid
configure:7262: gcc -c -g -O2  -L /usr/local/opt/mysql@5.7/include conftest.c >&5
clang: warning: argument unused during compilation: '-L/usr/local/opt/mysql@5.7/include' [-Wunused-command-line-argument]
configure:7262: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:7267: result: no
configure:7269: error: something wrong with CFLAGS="-g -O2 "
```

If I create a file with that source, and compile it with that command line, it succeeds; and if I comment out the check (lines 7262-7272) from `./configure` and re-execute it with the arguments given in the `rvm install` output, it succeeds.

My bash skills aren't up to debugging the `ac_fn_c_try_compile()` function to see exactly why it thinks the test is failing, but it looks to me like the failure is spurious, i.e., there's nothing wrong with these flags and this check should not prevent ruby from being configured or compiled.





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

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

* [ruby-core:88871] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
       [not found] <redmine.issue-15070.20180904162253@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2018-09-04 23:29 ` [ruby-core:88840] [Ruby trunk Bug#15070][Feedback] " nobu
@ 2018-09-05 17:17 ` david.moles
  3 siblings, 0 replies; 4+ messages in thread
From: david.moles @ 2018-09-05 17:17 UTC (permalink / raw
  To: ruby-core

Issue #15070 has been updated by dmolesuc3 (David Moles).


Thanks for the clue -- it looks like I had `CPPFLAGS=-L /usr/local/opt/mysql@5.7/include` set globally for some reason (probably having to do with building the mysql gem). Removing that allows `configure` to succeed.

That said, it seems as though maybe the check is still too sensitive, since this warning isn't related to CFLAGS, and is only a warning? Also, I believe I've had that environment variable set for some time, and it probably only started causing this problem with a more recent version of clang.

----------------------------------------
Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
https://bugs.ruby-lang.org/issues/15070#change-73914

* Author: dmolesuc3 (David Moles)
* Status: Feedback
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
## Description

`./configure` fails for Ruby 2.5.1 on macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2).

(**Note:** I've seen the same error trying to install 2.4.1 and 2.4.4 with rvm, but haven't bothered downloading a source tarball to test upstream.)

## Steps to reproduce

1. On a Mac running macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2), download and unpack `ruby-2.5.1.tar.gz`.
2. In `ruby-2.5.1`, run `./configure`.

## Expected behavior

`./configure` succeeds.

## Actual behavior

- `./configure` fails with
   ```
   configure: error: something wrong with CFLAGS="-g -O2 "
   ```
- [config.log](https://gist.github.com/dmolesUC3/75354e60812b7b9429261ed5994527df)

Examining `config.log`, I see:

```
configure:7249: checking whether CFLAGS is valid
configure:7262: gcc -c -g -O2  -L /usr/local/opt/mysql@5.7/include conftest.c >&5
clang: warning: argument unused during compilation: '-L/usr/local/opt/mysql@5.7/include' [-Wunused-command-line-argument]
configure:7262: $? = 0
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CANONICALIZATION_FOR_MATHN 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:7267: result: no
configure:7269: error: something wrong with CFLAGS="-g -O2 "
```

If I create a file with that source, and compile it with that command line, it succeeds; and if I comment out the check (lines 7262-7272) from `./configure` and re-execute it with the arguments given in the `rvm install` output, it succeeds.

My bash skills aren't up to debugging the `ac_fn_c_try_compile()` function to see exactly why it thinks the test is failing, but it looks to me like the failure is spurious, i.e., there's nothing wrong with these flags and this check should not prevent ruby from being configured or compiled.





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

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

end of thread, other threads:[~2018-09-05 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-15070.20180904162253@ruby-lang.org>
2018-09-04 16:22 ` [ruby-core:88836] [Ruby trunk Bug#15070] configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra david.moles
2018-09-04 16:49 ` [ruby-core:88837] " david.moles
2018-09-04 23:29 ` [ruby-core:88840] [Ruby trunk Bug#15070][Feedback] " nobu
2018-09-05 17:17 ` [ruby-core:88871] [Ruby trunk Bug#15070] " david.moles

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).