Skip to contentSkip to conversation

should the same recipe have two different WORKDIRs?

DISCUSSION Robert P. J. Day 3 participants 3 messages Jun 16, 2021

lore
Share & tools
lore
#0 lore raw

perhaps i've just never noticed before, but a colleague asked me to
debug some strangeness with his WRLinux build, and what i noticed was that the recipe that generated a package with a single (aarch64) executable created WORKDIRs under both directories:

* cortexa53...
* acme-coyote [actual target board]

this surprises me ... i thought that, based on the attributes of any recipe, it would have only one WORKDIR in the appropriate place. what does the above mean? i'm not sure what to make of it.

rday

#1 lore raw

Part of the WORKDIR component is the target (package) architecture. If the recipe or one of it's inherits sets PACKAGE_ARCH = "${MACHINE_ARCH}" it will move the component.

Where I've seen both directories used is when someone is building for multiple target boards.. and some of the targets use the default PACKAGE_ARCH, and some use MACHINE_ARCH. This is very common with OpenGL and hardware acceleration. Mesa for instance becomes machine dependent on some systems, but generic for others.

--Mark

Quoted 19 lines · Robert P. J. Day

perhaps i've just never noticed before, but a colleague asked me to
debug some strangeness with his WRLinux build, and what i noticed was that the recipe that generated a package with a single (aarch64) executable created WORKDIRs under both directories:

* cortexa53...
* acme-coyote [actual target board]

this surprises me ... i thought that, based on the attributes of any recipe, it would have only one WORKDIR in the appropriate place. what does the above mean? i'm not sure what to make of it.

rday

#2 lore raw
In reply to Robert P. J. Day
Quoted 11 lines · Robert P. J. Day

perhaps i've just never noticed before, but a colleague asked me to
debug some strangeness with his WRLinux build, and what i noticed was that the recipe that generated a package with a single (aarch64) executable created WORKDIRs under both directories:

* cortexa53...
* acme-coyote [actual target board]

this surprises me ... i thought that, based on the attributes of any recipe, it would have only one WORKDIR in the appropriate place. what does the above mean? i'm not sure what to make of it.

Have you built the recipe for two different machines in the same build directory?

If you completely remove tmp and then build again for a single machine you should see only one WORKDIR created (which could be under either the generic cortexa53 or the machine specific acme-coyote depending on whether the recipe sets PACKAGE_ARCH or applies any patches or sets config option etc using a machine specific override).