Issue #9840 has been updated by Alexander Khryukin.


Same issue for me.

~~~

checking minix/config.h presence... no

checking for minix/config.h... no

checking whether it is safe to define __EXTENSIONS__... yes

checking for cd using physical directory... cd -P

checking whether CFLAGS is valid... no

configure: error: something wrong with CFLAGS="-O2 -Wa,--compress-debug-sections -gdwarf-4 -fvar-tracking-assignments -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC  -fweb -frename-registers -Wl,-O2,-z,combreloc,-z,relro,--enable-new-dtags,--hash-style=gnu "

~~~

Full buildlog here
http://file-store.rosalinux.ru/api/v1/file_stores/798c626eebafd0ffe3d945ebcba0f26e8b61ac09.log?show=true

~~~
part of config.log
configure:7019: result: yes
configure:7051: checking for cd using physical directory
configure:7066: result: cd -P
configure:7084: checking whether CFLAGS is valid
configure:7097: aarch64-openmandriva-linux-gnu-gcc -c -O2 -Wa,--compress-debug-sections -gdwarf-4 -fvar-tracking-assignments -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC  -fweb -frename-registers -Wl,-O2,-z,combreloc,-z,relro,--enable-new-dtags,--hash-style=gnu   conftest.c >&5
conftest.c:1:0: warning: -fstack-protector not supported for this target [enabled by default]
 /* confdefs.h */
~~~


Btw i found a way to trick ruby build
i removed -fstack-protector from my CFLAGS and build started.
But need a proper fix.




----------------------------------------
Bug #9840: [darwin] configure script fails if an empty file named `Info.plist` exists in the user's home directory
https://bugs.ruby-lang.org/issues/9840#change-46760

* Author: patrick ellis
* Status: Open
* Priority: Normal
* Assignee: cruby-mac
* Category: platform/darwin
* Target version: 
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
On OS X 10.9.2, the ruby-2.1.2 configure script fails if an empty file named `Info.plist` exists in the user's home directory.

**Steps to reproduce:**

~~~
#!/usr/bin/env bash

touch ~/Info.plist

[[ -f ruby-2.1.2.tar.gz ]] || curl --fail -o ruby-2.1.2.tar.gz -L http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
[[ -d ruby-2.1.2 ]]        || tar xfz ruby-2.1.2.tar.gz

cd ruby-2.1.2

./configure
~~~

The last lines it prints before failing are:

~~~
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS=""
~~~

The generated config.log has an error message from `dsymutil` when validating LDFLAGS:

~~~
configure:7100: checking whether LDFLAGS is valid
configure:7113: clang -o conftest -g -O2    conftest.c  >&5
2014-05-14 12:28:59.987 dsymutil[38379:303] There was an error parsing the Info.plist for the bundle at URL Info.plist -- file:///Users/pje/
 The operation couldn”Ēt be completed. (Cocoa error 3840.)
 <CFBasicHash 0x7fda79d013d0 [0x7fff70e21f00]>{type = immutable dict, count = 1,
entries =>
	0 : <CFString 0x7fff70e04e00 [0x7fff70e21f00]>{contents = "NSDebugDescription"} = <CFString 0x7fda79d01390 [0x7fff70e21f00]>{contents = "Cannotparse a NULL or zero-length data"}
}
configure:7113: $? = 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:7118: result: no
configure:7120: error: something wrong with LDFLAGS=""
~~~

It looks like `dsymutil` is trying to read this empty plist file and fails multiple times during the configure step. It prints an error message multiple times, but only causes `configure` to fail during the LDFLAGS step, making it hard to debug.

Attached is `config.log`, which was generated from running the above code on my system.

I was able to reproduce this bug for all major ruby versions > 2.0.0.

Just for completeness's sake, here is the output of `brew config` from the my system:

~~~
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 724a7f84d853e978b694555ee61198c75fe409b1
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
Clang: 5.1 build 503
X11: 2.7.5 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby
~~~


---Files--------------------------------
config.log (21.1 KB)


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