Skip to contentSkip to conversation

environment-setup.d usage in SDKs and eSDK

DISCUSSION Richard Purdie 2 participants 2 messages Aug 7, 2020

lore
Share & tools
lore
#0 lore raw

I've just spent far too long staring at this so I'm going to write down what I found out. I may as well share it publicly.

An eSDK can be used like a normal SDK with an environment file that can be sourced. The challenge is that an eSDK contains native binaries rather than the nativesdk variants in the SDK.

This means that where an SDK has nativesdk environment.d files, an eSDK ends up using "native" environment.d files which are not used in any other context.

Some recipes like cmake implement both. Some others like icecc or openssl only have nativesdk variants. This probably needs cleaning up to be consistent.

It gets worse when you find that buildtools is included in eSDK and its environment file is sourced. This means you get a mix of nativesdk and native. If you set OECORE_NATIVE_SYSROOT in buildtools, it corrupts the eSDK's variable of the same name. This why buildtools has a hardcoded list of variables it puts in the enrivonment rather than using environment.d.

It would be better if the two sets of environment files (native and nativesdk) referenced different variables as currently the two can't coexist. This also really needs to be fixed.

Cheers,

Richard

#1 lore raw
Quoted 26 lines

Am 07.08.2020 um 17:17 schrieb Richard Purdie <[email protected]>:

I've just spent far too long staring at this so I'm going to write down what I found out. I may as well share it publicly.

An eSDK can be used like a normal SDK with an environment file that can be sourced. The challenge is that an eSDK contains native binaries rather than the nativesdk variants in the SDK.

This means that where an SDK has nativesdk environment.d files, an eSDK ends up using "native" environment.d files which are not used in any other context.

Some recipes like cmake implement both. Some others like icecc or openssl only have nativesdk variants. This probably needs cleaning up to be consistent.

It gets worse when you find that buildtools is included in eSDK and its environment file is sourced. This means you get a mix of nativesdk and native. If you set OECORE_NATIVE_SYSROOT in buildtools, it corrupts the eSDK's variable of the same name. This why buildtools has a hardcoded list of variables it puts in the enrivonment rather than using environment.d.

Quoted 7 lines

It would be better if the two sets of environment files (native and nativesdk) referenced different variables as currently the two can't coexist. This also really needs to be fixed.

Cheers,

Richard

Thank you very much for your patience and time digging deeper into this. Maybe I'm getting the chance to help something - I forwarded this information to the team and look if we can use both, SDK and eSDK so we would need those fixups (and thus do them then ^^).

Cheers
--
Jens Rehsack - [email protected]