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

Missing lvm-c headers #6

Closed
dslm4515 opened this issue May 25, 2021 · 7 comments
Closed

Missing lvm-c headers #6

dslm4515 opened this issue May 25, 2021 · 7 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@dslm4515
Copy link
Owner

When building mesa, build fails due to missing llvm-c headers:

In file included from ../src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c:44:
../src/amd/llvm/ac_llvm_util.h:31:10: fatal error: 'llvm-c/TargetMachine.h' file not found
#include <llvm-c/TargetMachine.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

If I check that directory on the system:

/usr/include/llvm-c
├── Remarks.h
└── lto.h

... and compare it to the LLVM built in MLFS:

usr/
└── include
    └── llvm-c
        ├── Analysis.h
        ├── BitReader.h
        ├── BitWriter.h
        ├── Comdat.h
        ├── Core.h
        ├── DataTypes.h
        ├── DebugInfo.h
        ├── Disassembler.h
        ├── DisassemblerTypes.h
        ├── Error.h
        ├── ErrorHandling.h
        ├── ExecutionEngine.h
        ├── ExternC.h
        ├── IRReader.h
        ├── Initialization.h
        ├── LinkTimeOptimizer.h
        ├── Linker.h
        ├── Object.h
        ├── Orc.h
        ├── OrcBindings.h
        ├── Remarks.h
        ├── Support.h
        ├── Target.h
        ├── TargetMachine.h
        ├── Transforms
        │   ├── AggressiveInstCombine.h
        │   ├── Coroutines.h
        │   ├── IPO.h
        │   ├── InstCombine.h
        │   ├── PassManagerBuilder.h
        │   ├── Scalar.h
        │   ├── Utils.h
        │   └── Vectorize.h
        ├── Types.h
        └── lto.h

Looks like when the system LLVM was built, some headers were not copied/generated. I will compare builds between CMLFS and BMLFS, as both should be identical (assuming both were compiled by the same patches and source)

@dslm4515 dslm4515 added the invalid This doesn't seem right label May 25, 2021
@dslm4515 dslm4515 self-assigned this May 25, 2021
@dslm4515 dslm4515 changed the title MIssing lvm-c headers Missing lvm-c headers May 25, 2021
@dslm4515 dslm4515 added this to In progress in Goals & Features May 25, 2021
@dslm4515
Copy link
Owner Author

dslm4515 commented May 26, 2021

Looks like these header directories are missing, as compared to a LLVM build from BMLFS:

/usr/include/clang
/usr/include/lld
/usr/include/llvm
/usr/include/llvm-c

@dslm4515
Copy link
Owner Author

Also lots of missing static libraries like libLLVMX86Disassembler.a

@andzai1995
Copy link

andzai1995 commented Jun 19, 2021

Try to copy includes from $LLVMSRC/include or from $LLVMSRC/build/include, or try to make a Release build of LLVM/Clang. CMLFS now uses MinSizeRel by default.

@dslm4515
Copy link
Owner Author

I forgot about that.

Yes, when i compile llvm for like MLFS, its built as Release and not MinSizeRel

@dslm4515
Copy link
Owner Author

Made the change with 00ffe39

@andzai1995
Copy link

andzai1995 commented Jun 22, 2021

Made the change with 00ffe39

Bug wasn't fixed. Removal of cmake option -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON fixes it. Make a patch, please. Thank you.

@dslm4515
Copy link
Owner Author

Bug wasn't fixed. Removal of cmake option -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON fixes it. Make a patch, please. Thank you.

Applied via commit fe18c5a

@dslm4515 dslm4515 moved this from In progress to Done in Goals & Features Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
Development

No branches or pull requests

2 participants