How to set UseIPP global compiler setting on a build agent in a devops pipeline?
-
I know that this configuration property is saved in compilerSettings.xml under the users Application Support folder.
Is there a good way to set this when running HISE from the command line as part of a CI script?
-
Run HISE from the command line with
--help
and you'll see all the CLI options available. -
The thing is, I'm not passing -ipp on the command line but the build is failing with this error on the build agent:
/Users/runner/work/1/s/HISE/hi_tools/../hi_streaming/hi_streaming.h:74:10: 'ipp.h' file not found
I'm assuming it's because the script is installing HISE fresh on the agent and the UseIPP setting is defaulted to on?
-
@jmannix said in How to set UseIPP global compiler setting on a build agent in a devops pipeline?:
UseIPP setting is defaulted to on?
Maybe, try setting it to 0
-
@d-healey this is a remote MacOS build agent which is installing from the base OS for each run, so I can't set it via the UI.
I tried appending -D:USE_IPP=0 to the export_ci command line options, which allowed the compile to complete, but now the linker is failing with the following:
clang: error: no such file or directory: '/opt/intel/ipp/lib/libippi.a'
clang: error: no such file or directory: '/opt/intel/ipp/lib/libipps.a'
clang: error: no such file or directory: '/opt/intel/ipp/lib/libippvm.a'
clang: error: no such file or directory: '/opt/intel/ipp/lib/libippcore.a'
-
@jmannix I don't think IPP is enabled by default from the CLI. At least I'm not mentioning it in my build scripts. The linker error suggests that there are some linker paths in the juicer file. Are you building the develop branch?
-
@d-healey My build pipeline is downloading the latest stable release from https://github.com/christophhart/HISE/releases/download/4.0.0/HISE.4.0.0.dmg and extracting it to a subfolder in the HISE source path rather than building the development branch. I thought that would be quicker and simpler than running the whole HISE build every time. Is that a problem?
-
@jmannix You want to make sure the source code version you are using matches the binary version.
My script does these steps:
Remove old HISE source folder
Git clone HISE source
cd into HISE source
checkout develop branch
extract SDKs (I also copy in the AAX SDK from a folder on my system)
Build HISEThen for my project it's the same process essentially:
Remove old project folder
Download project from git repo
Run HISE to build the projectI have arguments to my script so I can choose if I always want to rebuild HISE - if I'm doing a lot of tests then I don't want to be rebuilding HISE each time, only if there is a new version. Another more complex approach would be to check the git hash and only rebuild if it's changed.
-
@d-healey it sounds like your script is running on the same box each time? I'm using Azure devops pipelines, so it is a fresh Mac agent for each run.
I got it working by manipulating the projucer file before running the build script - to set USE_IPP=0 and remove the extraLinkerFlags, but it's not particularly elegant. Would be better if I could figure out how to set the export_ci command line to disable IPP in the first place.
-
@jmannix said in How to set UseIPP global compiler setting on a build agent in a devops pipeline?:
it sounds like your script is running on the same box each time?
Yes but it will work on a fresh system just the same - after installing needed dependencies of course.
-
@d-healey looking at the code, I see that the command line export_ci reads the UseIPP setting from HiseSettings, and according to this https://github.com/christophhart/HISE/blob/cd51dc7bc8d5f539184a4308b41c6b5cabc2aaaa/hi_core/hi_core/HiseSettings.cpp#L1191 it defaults to enabled.
The only place I can see to override that is in the compilerSettings.xml file under /Users/<username>/Library/Application Support, which is the file that is updated when you change the setting in the UI. I don't see a way to override it from the command line.
So my guess is, you have disabled it on your build machine and that works because you use the same machine each time. Whereas in the devops pipeline it starts from a fresh install with no compilerSettings.xml file, and therefore defaults to enabled.
-
@jmannix
-D:USE_IPP=0
should override that, but I don't know why you're still seeing the linker errors. It's possible you need to compile HISE yourself from source with IPP disabled.If you still can't get it to work you can fork HISE and remove the offending line, but I don't think it's necessary.
Another solution is when you create your instance you could copy over a settings.xml file that is setup the way you like.