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] libjpeg/*: whole program optimization on msvc
- [question] ffmpeg/6.1 : try to build with CUVID support
- [package] cpython/3.12.2: not possible to cross-compile cpython on linux HOT 4
- [package] qt/6.7.1: fatal error LNK1181 on simple hello world project HOT 1
- [package] openimageio/*: openexr version conflict with opencolorio
- [request] parallel-hashmap/1.3.12 HOT 1
- [package] <boost>/<1.85.0>: can not build with option: without_cobalt=False HOT 2
- How to pass arguments for Qt configure in Qt build using conan recipe?
- How to use redis plus plus with tls HOT 1
- [package] geographiclib/2.3: Run unitests on GeographicLib Builds
- [package] fltk/1.3.9: MSVC static runtime not respected
- [question] Pr review is so slow HOT 1
- [package] drogon/1.9.4: cmake files are not exported
- [request] cmaes/0.10.0 HOT 1
- [package] qt/6.7.0 Error when building `qtwebengine`
- [package] libpq/15.4: Error building with option "with_openssl" HOT 1
- [FFMpeg: 4.4 OpenSSL: 1.1.1p OpenH264: 2.1.1
- Building boost with C++20 fails for gcc < 11 and clang < 14 because these don't support necessary features to build cobalt HOT 8
- [request] opencv/4.10.0
- [request] mongo-c-driver/1.27.2
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.