Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLDB won't build with standalone (non-Xcode) command-line tools installed #45535

Open
llvmbot opened this issue Jun 4, 2020 · 7 comments
Open
Labels
bugzilla Issues migrated from bugzilla build-problem cmake Build system in general and CMake in particular confirmed Verified by a second party lldb platform:macos

Comments

@llvmbot
Copy link
Member

llvmbot commented Jun 4, 2020

Bugzilla Link 46190
Version trunk
OS MacOS X
Blocks #51489
Reporter LLVM Bugzilla Contributor
CC @tstellar
@llvmbot
Copy link
Member Author

llvmbot commented Jun 4, 2020

Environment: macOS 10.15.5

Description: As of June 3-2020, building branch release/10.x or master files fails for project specification:
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lldb"
when having independent command-line tools installed, i.e. the tools installed in /Library/Developer/CommandLineTools.
This happens irrespective of whether Xcode command-line tools are also installed (/Applications/Xcode.app/Contents/Developer) or not, and also irrespective of path set by $ xcode-select -s

Cause: Having independent command-line tools installed adds
-I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
(or equivalent) to compilation paths.
This causes math.h to be included from this directory instead of directory
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1.
File cmath in the .../c++/v1 directory expects math.h from the same directory to be included, but since -I takes precedence of system paths, the wrong math.h is fetched.
This causes compilation of cmath to fail with errors:
c++/v1/cmath:line:col: error: no member named signbit in the global namespace; did you mean sigwait?
Other symbols are also missing: fpclassify, isfinite, isinf, isnan, isnormal, isgreater, ...

Temporary fix: When building LLVM with project lldb, only use Xcode command-line tools and make sure to remove independent command-line tools installations under /Library/Developer/CommandLineTools

@tstellar
Copy link
Collaborator

I also hit this bug trying to build lldb from the release/11.x on the Mac OS systems hosted in GitHub actions. Here is a failed build example:

https://github.com/tstellar/llvm-project/pull/208/checks?check_run_id=1299928678

@tstellar
Copy link
Collaborator

I also hit this bug trying to build lldb from the release/11.x on the Mac OS
systems hosted in GitHub actions. Here is a failed build example:

tstellar#208
checks?check_run_id=1299928678

Better link to the build logs: https://github.com/tstellar/llvm-project/runs/1299928678?check_suite_focus=true

This is the cmake invocation that fails:

cmake -DLLVM_INCLUDE_GO_TESTS=OFF -DLLVM_LIT_ARGS=-svj1 ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@asl asl added this to the LLVM 13.0.1 release milestone Dec 12, 2021
@tstellar
Copy link
Collaborator

The deadline for requesting fixes for the release has passed. This bug is being removed from the LLVM 13.0.1 release milestone. If you have a fix or think this bug is important enough to block the release, please explain why in a comment and add the bug back to the LLVM 13.0.1 release milestone.

@tstellar tstellar removed this from the LLVM 13.0.1 release milestone Dec 21, 2021
@llvmbot llvmbot added the confirmed Verified by a second party label Jan 26, 2022
@tstellar
Copy link
Collaborator

tstellar commented Jul 15, 2022

I will need to see your full cmake log to know if you are having the same issue, but I've found the root cause for this failure in the GitHub Actions runner: actions/runner-images#5900

@llvmbot
Copy link
Member Author

llvmbot commented Oct 8, 2023

@llvm/issue-subscribers-lldb

| | | | --- | --- | | Bugzilla Link | [46190](https://llvm.org/bz46190) | | Version | trunk | | OS | MacOS X | | Blocks | llvm/llvm-project#51489 | | Reporter | LLVM Bugzilla Contributor | | CC | @tstellar |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla build-problem cmake Build system in general and CMake in particular confirmed Verified by a second party lldb platform:macos
Projects
None yet
Development

No branches or pull requests

4 participants