Skip to content

add explanatory page about environment types#2738

Draft
h-vetinari wants to merge 16 commits intoconda-forge:mainfrom
h-vetinari:env_types
Draft

add explanatory page about environment types#2738
h-vetinari wants to merge 16 commits intoconda-forge:mainfrom
h-vetinari:env_types

Conversation

@h-vetinari
Copy link
Copy Markdown
Member

In #2701 I had asked to break out the discussion about environments into a separate page. This is a first draft of what I had been thinking about. It's not yet hooked up to the rest of the documentation, which should refer to this in a couple of places (and deduplicate existing shorter explanations).

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 3, 2026

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 873cc8a
🔍 Latest deploy log https://app.netlify.com/projects/conda-forge-previews/deploys/698485da3704510007e31d07
😎 Deploy Preview https://deploy-preview-2738--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 67
Accessibility: 96
Best Practices: 100
SEO: 89
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@h-vetinari
Copy link
Copy Markdown
Member Author

pre-commit.ci autofix

@h-vetinari h-vetinari force-pushed the env_types branch 2 times, most recently from b90ff88 to c0b4740 Compare February 3, 2026 03:32
Copy link
Copy Markdown
Member

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice explanation! I added some comments that helped me understand the text in a clearer way. Thanks!

Copy link
Copy Markdown
Contributor

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you probably know, I'm not an expert at English, but I think it makes sense to aim at non-native speakers being able to read it clearly. Also, in general I'd suggest avoid deeply nested sentences, they can easily get confusing.

h-vetinari and others added 4 commits February 4, 2026 11:48
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@h-vetinari
Copy link
Copy Markdown
Member Author

Thanks a lot for the thorough reviews! I think I've incorporated basically everything, and have resolved the corresponding comments. I still need to do a pass through the docs for other places where this should be referenced.

### Native builds

When the architectures between `build:` and `host:` match, the situation is simpler, because in that
case, both environments are able to execute code on the machine. Do not be confused by this additional
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry, the old comment got disconnected.)

To be honest, I still think "confused" is confusing here; it suggests that the reader would be confused by being able to execute programs, but why would they be? I think the meaning you want to convey is that this is a pitfall.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm trying to express is the fact that, for build: == host:, being able to execute stuff from both environments is the main reason it's confusing in the first place, i.e. having to ask "do I put that in build: or host:?".

I'm trying to say that people should not get stuck in trying to fit a square peg (native compilation) into a round hole (the build: / host: separation).

But happy to find ways to improve the formulation here.

it is _not_ assumed to depend on the ABI of `baz` (and would not be rebuilt if `baz` releases a new
ABI-changing version; only `bar` would be rebuilt in that case).

This is why the link check at the end of the build has an essential role. It will warn if the package
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should include an example output here, since someone who doesn't have a build log handy may have a hard time figuring out what you're talking about. And my understanding is that the "Understanding" part should be readable without having a particular example at hand.

Copy link
Copy Markdown
Member Author

@h-vetinari h-vetinari Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent an embarrassingly large amount of time on finding an appropriate example (neither trivial, nor overwhelming, etc.). Best I got so far would be

<RecipeTabs>

```
   INFO: sysroot: '/home/conda/feedstock_root/build_artifacts/mujoco_1749065357629/_build_env/x86_64-conda-linux-gnu/sysroot/' files: '['usr/share/zoneinfo', 'usr/share/locale/zh_TW/LC_MESSAGES/libc.mo', 'usr/share/locale/zh_CN/LC_MESSAGES/libc.mo', 'usr/share/locale/vi/LC_MESSAGES/libc.mo']'
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO lib/libmujoco.so.3.3.2 found in local/linux-64::libmujoco==3.3.2=hebd7970_1
WARNING (mujoco-simulate,bin/mujoco-simulate): Needed DSO lib/liblodepng.so found in ['conda-forge/linux-64::lodepng==20220109=h924138e_0']
WARNING (mujoco-simulate,bin/mujoco-simulate): .. but ['conda-forge/linux-64::lodepng==20220109=h924138e_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO lib/libglfw.so.3 found in conda-forge/linux-64::glfw==3.4=hd590300_0
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO x86_64-conda-linux-gnu/sysroot/lib64/libpthread.so.0 found in CDT/compiler package conda-forge/noarch::sysroot_linux-64==2.17=h0157908_18
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO lib/libstdc++.so.6 found in conda-forge/linux-64::libstdcxx==15.1.0=h8f9b012_2
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO x86_64-conda-linux-gnu/sysroot/lib64/libm.so.6 found in CDT/compiler package conda-forge/noarch::sysroot_linux-64==2.17=h0157908_18
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO lib/libgcc_s.so.1 found in conda-forge/linux-64::libgcc==15.1.0=h767d61c_2
   INFO (mujoco-simulate,bin/mujoco-simulate): Needed DSO x86_64-conda-linux-gnu/sysroot/lib64/libc.so.6 found in CDT/compiler package conda-forge/noarch::sysroot_linux-64==2.17=h0157908_18
WARNING (mujoco-simulate): dso library package conda-forge/linux-64::libgl==1.7.0=ha4b6fd6_2 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
```

```
 │ │ [bin/mujoco-simulate] links against:
 │ │  ├─ lib/liblodepng.so (lodepng)
 │ │  ├─ lib/libmujoco.so.3.3.6 (libmujoco)
 │ │  ├─ lib/libgcc_s.so.1 (libgcc)
 │ │  ├─ lib/libstdc++.so.6.0.34 (libstdcxx)
 │ │  ├─ libc.so.6 (system)
 │ │  ├─ libpthread.so.0 (system)
 │ │  ├─ lib/libglfw.so.3.4 (glfw)
 │ │  └─ libm.so.6 (system)
 │ │  ⚠ warning Overdepending against libgl
```

</RecipeTabs>

However, I cannot manage to get rattler-build to produce a correct overlinking warning. There's quite a bit more divergence w.r.t. overdepending warnings too.

I think run-exports will eventually have to be broken out into a separate article... Not necessarily now, but it looks inevitable 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just please use plain <Tabs/> with conda-build / rattler-build rather than abusing RecipeTabs, see e.g. docs/how-to/basics/populate-dependencies.mdx.

```yaml
requirements:
build: # [build time] `linux-64`; where compilers and other tools get executed
- ${{ stdlib("c") }} # - translates to `sysroot_linux-aarch64`; mostly the C standard library
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more general comment: the discussion below doesn't really hint that sysroots — which pretty much fall into the category of headers/libraries you need — end up in build: rather than host:.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's true. I've left out discussion of most of the compiler bits, which I think are more appropriate for a separate page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree with that, but perhaps leave a hint that there are special cases not covered in this doc.

Co-authored-by: Michał Górny <mgorny@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants