Giter Site home page Giter Site logo

Comments (3)

ygrabit avatar ygrabit commented on June 10, 2024

we have such multiple locations check for Windows with Arm64EC and x64... where a Arm64EC host could load Arm64EC and x64 plugin binaries..
#if SMTG_CPU_ARM_64EC
if (instance == nullptr)
instance = loadAsPackage (inPath, architectureArm64XString);
if (instance == nullptr)
instance = loadAsPackage (inPath, architectureX64String);
#endif
maybe you could propose a way to do it for Linux?

from vst3sdk.

attilammagyar avatar attilammagyar commented on June 10, 2024

Unfortunately my knowledge about the internals of Linux are enough to tell that there's a problem here, but insufficient to confidently propose a solution that is both future-proof and backward compatible.

At the end of the day, the information returned by uname() comes from the init_uts_ns structure from the Linux kernel in init/version-timestamp.c. The UTS_MACHINE string macro here comes from a makefile variable with the same name which gets written into include/generated/compile.h when you run make (see scripts/mkcompile_h).

The problem is that this makefile variable can have a lot of different values (someone on StackOverflow dug up a few), and I have no idea which is compatible with which, if any. And to make things worse, future versions of the kernel may drop some of these values or introduce new ones.

My best bet would be an algorithm like this, but this would only solve the 64 bit vs. 32 bit case:

  1. Let A be the architecture that uname() returned.
  2. Try to load the plugin from the A + "-linux" directory.
  3. If step 1 failed and A != "i686" then try i686-linux.
  4. If we still haven't successfully loaded anything, and A != "i386" then try i386-linux.

I'm not sure if similar problems can occur between 64 bit architectures, and if yes, how to resolve them. :-(

from vst3sdk.

attilammagyar avatar attilammagyar commented on June 10, 2024

I made a PR from the proposed solution: steinbergmedia/vst3_public_sdk#57

I compiled the validator application for 32 bits, and sucessfully validated my plugin bundle with it on a 64 bit Linux.

from vst3sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.