Building openjdk 8u on OS X 10.11 fails

Alex Wang aw1621107 at gmail.com
Fri Oct 16 16:59:55 UTC 2015


Hi Dennis,

Sorry for not seeing this until now; looks like this got caught up in a filter that I just got around to looking at today.

But in any case, thank you for the solution! Wasn't expecting it to be that simple.

-Alex

> On Sep 17, 2015, at 9:04 AM, Denis Fokin <denis.fokin at gmail.com> wrote:
> 
> Hi Alex,
> 
> I have just updated to 10.11 and experienced the same problem.
> 
> The solution is "export MACOSX_DEPLOYMENT_TARGET=10.9"
> 
> Thank you,
>     Denis
> 
> 
> On Fri, Jul 17, 2015 at 7:56 AM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote:
> Edit for formatting. Forgot that soft wraps were a thing. My apologies.
> 
> I’m not really sure if this is something for the jdk developers or an upstream
> issue, since the error doesn’t seem to be strictly under idk control (the error
> looks to me to be something g++ does); I just thought to check in case there’s
> an easy solution (and I’m not really sure if reporting a problem for Xcode 4
> would really accomplish anything). If I’m in the wrong place please let me know.
> 
> Running OS X 10.11, JAVA_HOME is set to a 1.7 install, xcode-select is pointing
> at the right application, and I *think* the Xcode 4 command line tools were
> installed. Ran xcode-select —install after switching, and it prompted for an
> install, at least.
> 
> ./configure —with-xcode-path=<path> fails with this in config.log:
> 
> configure:28891: checking for stdio.h
> configure:28891: result: yes
> configure:28919: checking size of int *
> configure:28924: /usr/bin/g++ -o conftest    conftest.cpp  >&5
> couldn't understand kern.osversion `15.0.0'
> ld: library not found for -lgcc_s.10.4
> collect2: ld returned 1 exit status
> configure:28924: $? = 1
> configure: program exited with status 1
> configure: failed program was:
> | /* confdefs.h */
> <snip>
> configure:28938: result: 0
> configure:28960: The tested number of bits in the target (0) differs from the
> number of bits expected to be found in the target (64).
> configure:28962: I'll retry after setting the platforms compiler target bits
> flag to -m64
> configure:28993: checking size of int *
> configure:28998: /usr/bin/g++ -o conftest  -m64   -m64 conftest.cpp  >&5
> couldn't understand kern.osversion `15.0.0'
> ld: library not found for -lgcc_s.10.4
> collect2: ld returned 1 exit status
> configure:28998: $? = 1
> configure: program exited with status 1
> configure: failed program was:
> | /* confdefs.h */
> <snip>
> configure:29012: result: 0
> configure:29026: error: The tested number of bits in the target (0) differs from
> the number of bits expected to be found in the target (64)
> 
> I looked around for a solution for the missing library, nothing I found really
> helped. One suggestion was to symlink it to the OS-provided one (l
> Unfortunately, 10.11’s new rootless feature means that I can’t write to that
> folder, and I don’t know if disabling that feature just for a build is the best
> idea. Another was to change the library in the build scripts. I took a look
> around, but the closest thing I could find in the config scripts were -lgcc
> flags, so I figured something else was the cause.
> 
> I also tried messing with symlinking bits and pieces of Xcode 7’s toolchain into
> Xcode 4 to try and replace the offending binary, but nothing seemed to change.
> Using Xcode 4’s gcc sometimes worked, and sometimes produced the same error. I’m
> not really sure what about the programs I threw at it caused it to fail or not,
> but at least it seemed consistent for any particular program.
> 
> If I can provide more info that would be helpful, I’ll be happy to do so.
> 
> 




More information about the build-dev mailing list