Comments (4)
I'm currently trying to repack libraries from oneMKL installers that are provided by Intel on Windows/Linux. oneMKL seems to be using circular dependencies and conan doesn't support it
conan-io/conan#4928
conan-io/conan#6530
conan-io/conan#10935
from conan-center-index.
@Nekto89 Thanks for looking into it! That circular dependencies issue might be a pretty hard blocker for now. 😐
I started experimenting with a oneMKL recipe (the non-interfaces one) as well, here: https://github.com/valgur/conan-center-index/blob/new/onemkl/recipes/onemkl/all/conanfile.py
Sounds like you have something much more complete in the works. I would gladly collaborate on it, if you can share your current state.
from conan-center-index.
@Nekto89 Thanks for looking into it! That circular dependencies issue might be a pretty hard blocker for now. 😐
I started experimenting with a oneMKL recipe (the non-interfaces one) as well, here: https://github.com/valgur/conan-center-index/blob/new/onemkl/recipes/onemkl/all/conanfile.py
Sounds like you have something much more complete in the works. I would gladly collaborate on it, if you can share your current state.
My version is worse than yours.
I need small subset of functionality so my recipe solves only my problem. I didn't find fast way to unpack files from installers so I installed them on my machine before running conan.
conan export-pkg -nr -of "C:\Program Files (x86)\Intel\oneAPI\mkl\2024.1" -pr:b ... -pr:h ... --name onemkl --version 2021.4.0 -s os=Windows -s build_type=Release C:/.../recipes/onemkl/all/conanfile.py
conan export-pkg -nr -of "~/intel/oneapi/mkl/2024.1" -pr:b ... -pr:h ... --name onemkl --version 2021.4.0 "$recipe_dir/conanfile.py"
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
from conan.tools.files import copy
import os
required_conan_version = ">=2.0.17"
class onemklConan(ConanFile):
name = "onemkl"
description = "The fastest and most-used math library for Intel®-based systems."
homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html"
license = "Intel Simplified Software License"
topics = ("intel")
package_type = "static-library"
settings = "os", "arch", "compiler", "build_type"
build_policy = "never"
def layout(self):
pass
def requirements(self):
self.requires("onetbb/2021.9.0")
def package_id(self):
if self.info.settings.os == "Windows":
self.info.settings.build_type = "Debug" if self.info.settings.build_type == "Debug" else "Release"
else:
del self.info.settings.build_type
self.info.requires.unrelated_mode()
del self.info.settings.compiler
def validate(self):
if self.settings.arch != "x86_64":
raise ConanInvalidConfiguration(f"{self.ref} supports only x86_64")
if not self.settings.os in ["Windows", "Linux"]:
raise ConanInvalidConfiguration(f"{self.ref} supports only Windows and Linux")
def source(self):
pass
def generate(self):
VirtualBuildEnv(self)
VirtualRunEnv(self)
def build(self):
pass
def package(self):
lib_suffix = "lib" if self.settings.os == "Windows" else "a"
lib_prefix = "" if self.settings.os == "Windows" else "lib"
debug_suffix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else ""
source_lib_folder = os.path.join(self.build_folder, "lib")
target_lib_folder = os.path.join(self.package_folder, "lib")
copy(self, f"{lib_prefix}mkl_intel_ilp64.{lib_suffix}", source_lib_folder, target_lib_folder)
copy(self, f"{lib_prefix}mkl_core.{lib_suffix}", source_lib_folder, target_lib_folder)
copy(self, f"{lib_prefix}mkl_tbb_thread{debug_suffix}.{lib_suffix}", source_lib_folder, target_lib_folder)
source_include_folder = os.path.join(self.build_folder, "include")
target_include_folder = os.path.join(self.package_folder, "include")
copy(self, "*", source_include_folder, target_include_folder)
source_license_folder = os.path.join(self.build_folder, "share", "doc", "mkl", "licensing")
target_license_folder = os.path.join(self.package_folder, "licenses")
copy(self, "*", source_license_folder, target_license_folder)
#ugly workaround. conan doesn't support circular dependencies
if self.settings.os == "Linux":
os.symlink("libmkl_core.a", os.path.join(self.package_folder, "lib", "libmkl_core2.a"))
os.symlink("libmkl_core.a", os.path.join(self.package_folder, "lib", "libmkl_core3.a"))
os.symlink("libmkl_tbb_thread.a", os.path.join(self.package_folder, "lib", "libmkl_tbb_thread2.a"))
def package_info(self):
debug_suffix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else ""
self.cpp_info.libs = ["mkl_intel_ilp64", "mkl_core", f"mkl_tbb_thread{debug_suffix}"]
if self.settings.os == "Linux":
#ugly workaround. conan doesn't support circular dependencies
self.cpp_info.libs.extend(["mkl_core2", "mkl_tbb_thread2", "mkl_core3"])
self.cpp_info.set_property("cmake_file_name", "MKL")
self.cpp_info.set_property("cmake_target_name", "MKL::MKL")
self.cpp_info.defines.append("MKL_ILP64")
from conan-center-index.
FYI, upstream just dropped Conan
oneapi-src/oneMKL#267
oneapi-src/oneMKL@8c907b4
But was broken for 3 years anyway: oneapi-src/oneMKL#117
from conan-center-index.
Related Issues (20)
- [package] qt/6.7.0: CMakeDeps does not include ProtobufTools macros HOT 1
- [package] qt/6.7.0: qt_import_plugins() CMake macro won't work as intended HOT 1
- [package] qwt/6.2.0 with qt/6.5.3: Library 'qmng' not found in package.
- [package] onetbb/2020.3: Fails to compile with gcc-13 HOT 1
- [request] libnetpbm/10.86.41
- [package] poco/1.13.3: sha256sum mismatch HOT 1
- [package] <wolfssl>/<5.6.6>: Cross compiling requires --host
- [question] Shared building issues when linking on Linux (due to runpath/LD_LIBRARY_PATH issue)? HOT 8
- [question] Is libcxx necessary in LasLib/LasZip? HOT 3
- libjpeg/9e: Package fails to build correctly for Windows x86
- [package] gsoap/2.8.132: Sources NotFoundException
- [package] opentelemetry-cpp/1.12.0: ERROR: opentelemetry-cpp/1.12.0: Required package 'prometheus-cpp' not in component 'requires'
- some autotools recipes override --host and --build on windows and it might be unnecessary
- [question][simdjson]: why block gcc 9 with libstdc++11 when they work just fine? HOT 1
- [package] arrow/15.0.0: required component package 'protobuf::' not in dependencies HOT 4
- [package] capnproto/1.0.1: Build of 1.0.1 fails with Visual Studio 2022 and C++20 HOT 1
- PROJ 9.4.0
- [conan.io/center] Error libx264 package install for OpenCV cross-compilation to arm64
- libpq recipe server header files missing HOT 1
- [openmpi] <openmpi>/<5.0.3>: Has not been updated to conan2.0 format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan-center-index.