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

[Issue]: Headers missing in install #1713

Open
trixirt opened this issue Jan 8, 2025 · 3 comments
Open

[Issue]: Headers missing in install #1713

trixirt opened this issue Jan 8, 2025 · 3 comments
Assignees

Comments

@trixirt
Copy link
Contributor

trixirt commented Jan 8, 2025

Problem Description

I am packaging rocMLIR for fedora, here is a spec file https://github.com/trixirt/rocMLIR/blob/fedora/rocm-6.3.1/rocmlir.spec

I would expect for all the libraries to be installed, that headers would also to be installed.
There should be %{_includedir}/rocMLIR/*.h or something.

When using this package to build amdmigraphx, there is this error

/builddir/build/BUILD/amdmigraphx-6.3.1-build/AMDMIGraphX-rocm-6.3.1/src/targets/gpu/mlir.cpp:33:10: fatal error: 'mlir-c/Dialect/RockEnums.h' file not found
33 | #include <mlir-c/Dialect/RockEnums.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

which comes from mlir/include https://github.com/ROCm/rocMLIR/blob/develop/mlir/include/mlir-c/Dialect/RockEnums.h

Some looking in the cmake infra and I could not find where the headers get installed.

Operating System

Fedora Rawhide

CPU

ALL

GPU

ALL

ROCm Version

ROCm 6.3.0

ROCm Component

AMDMIGraphX

Steps to Reproduce

rpmbuild -ba rocmlir.spec

Look if headers got installed.

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@umangyadav
Copy link
Member

If you want to use rocMLIR with MIGraphX
you need to build FAT lib

https://github.com/trixirt/rocMLIR/blob/c16a7d3841e2f9207d9ae1d348b17bfb626324bd/rocmlir.spec#L73

This option should be turned on.

@trixirt
Copy link
Contributor Author

trixirt commented Jan 9, 2025

Yes.
But this causes a break, looking for libMLIRCAPIMIGraphX
And will be opened as a separate issue once i triage it a bit more.

@jnolck
Copy link

jnolck commented Jan 14, 2025

This is the error I get when trying to compile that spec file with fat lib enabled.

'''
/usr/lib64/rocm/llvm/bin/llvm-ar: error: script line 2: could not open library /home/jnolck/rpmbuild/BUILD/rocmlir-6.3.1-build/rocMLIR-rocm-6.3.1/redhat-linux-build/lib/libMLIRCAPIMIGraphX.a: No such file or directory
gmake[2]: *** [mlir/tools/rocmlir-lib/CMakeFiles/__generate_fat_library.dir/build.make:76: lib/librockCompiler.a] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:136377: mlir/tools/rocmlir-lib/CMakeFiles/__generate_fat_library.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:159: all] Error 2
'''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants