facebook / hermes

A JavaScript engine optimized for running React Native.
https://hermesengine.dev/
MIT License
9.91k stars 641 forks source link

Urgent warnings when running ninja against source #18

Closed jacklaurencegaray closed 5 years ago

jacklaurencegaray commented 5 years ago
Linking CXX executable bin/hermes
ld: warning: URGENT: building for OSX, but linking against dylib (/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libicucore.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libcurses.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libm.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libc++.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libSystem.dylib) built for (unknown). Note: This will be an error in the future.
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib/libz.dylib) built for (unknown). Note: This will be an error in the future.

Running ninja seems to trigger the above warnings. Not sure if this matters.

OS version: macOS Mojave 10.14.6 Ninja version: 1.9.0

dulinriley commented 5 years ago

I'm on the same OS and ninja versions, and I haven't encountered this error. This might actually be a difference in C++ compilers/linkers. Can you run

~ $ c++ --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode_10.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

If you're either using an older clang, or a newer clang, it might be due to that. In general, we recommend using the latest stable Xcode C++ compiler for MacOS builds (which is 10.2.1 right now).

willholen commented 5 years ago

@jacklaurencegaray What's the output of ld -v and c++ --version?

jacklaurencegaray commented 5 years ago

@willholen

ld -v

@(#)PROGRAM:ld PROJECT:ld64-351.8 configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS) LTO support using: LLVM version 9.1.0, (clang-902.0.39.2) (static support for 21, runtime is 21) TAPI support using: Apple TAPI version 9.1.0 (tapi-902.0.9)

c++ --version

Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

willholen commented 5 years ago

From what I can gather from web searches, this is more related to the currently installed libraries than to the build process itself. I was not able to reproduce it on Mojave 10.14.6 with Apple LLVM version 10.0.1 (clang-1001.0.46.4), and I think it shouldn't matter.

I'll be sure to keep an eye on it, though. Thanks for reporting!