Comments (6)
Hi @IanCollins
Thanks for your report.
It would be necessary a bit more of detail: the exact profile file that you are using, for example, and a basic command or conanfile to reproduce. For example, it would be necessary to use the new [buildenv]
in the profile, not the legacy [env]
. Could you please provide these details? Thanks!
from conan.
Hi @IanCollins
Please let us know if you can provide those details. Thanks!
from conan.
Sure, sorry I missed the first message.
Yes, the profile does use [buildenv]. One example:
default.jinja:
`[conf]
tools.env.virtualenv:auto_use = True
[buildenv]
AR = ar
AS = as
RANLIB = ranlib
CC = clang
CXX = clang++
STRIP = strip
CFLAGS = -w
CXXFLAGS = -w
[settings]
os = Linux
arch = x86_64
compiler = clang
compiler.version = 16
compiler.cppstd = 17
compiler.libcxx = libstdc++11
build_type = Release
[options]
*:shared = False`
native_linux_clang_release_static.jinja:
`include(default.jinja)
[settings]
build_type=Release
os.platform_name="None"
[options]
*:shared=False`
After running a conan install, we have a generated conanbuildenv-release-x86_64.sh with the following exports:
`export CXXFLAGS=" -w"
export CFLAGS=" -w"
export STRIP=" strip"
export CXX=" clang++"
export CC=" clang"
export RANLIB=" ranlib"
export AS=" as"
export AR=" ar"`
from conan.
Thanks for the details.
I have been checking this, the code internals, etc.
Check the PR #10343
And issue: #10334
There is even a comment in code:
# values are not strip() unless they are a path, to preserve potential whitespaces
name = name.strip()
It seems that this is mostly expected. The definition of environment variables values can accept any arbitrary value, including strings with leading spaces. We could argue that users could define quotes, but it happens that some users also want strings with literal quotes for values, and that further complicate things.
Please note that in the documentation spaces are not used around "=" in profiles: https://docs.conan.io/2/reference/config_files/profiles.html
So the leading space in env-vars values is not being automatically removed, please make sure to not include that leading space, unless you explicitly want it.
from conan.
Okay, thank you for checking.
This is somewhat counterintuitive, but I'm sure I can fight my programmer's urge to line up my variables!
from conan.
This is somewhat counterintuitive, but I'm sure I can fight my programmer's urge to line up my variables!
Yep, I know, but sometimes it is complicated to cover all edge cases, and some ergonomics might be lost there.
from conan.
Related Issues (20)
- [question] conan info --graph replacement? HOT 2
- [question] Conan1 vs Conan2 package id compatibility + possibility of Artifactory hash collision? HOT 2
- Conan2 Config Uninstall HOT 3
- [question] test_package does not respect dependency includes/libs HOT 2
- [question] How to pass resource file path to consumer? HOT 3
- [feature] Extend revision_mode 'scm_folder' to allow for multiple folders HOT 5
- [bug] Large conan package gets downloaded to a wrong subfolder in windows HOT 5
- [question] Is Python inheritance allowed or not? HOT 2
- [question] core.cache:storage_path + Docker HOT 2
- [question] How to implement a validation in the best way? HOT 4
- [question] LD_LIBRARY_PATH and DYLD_LIBRARY_PATH are not added in CMakePresets.json HOT 4
- [suggestion] Access properties of profile's tool requirements in [conf] section HOT 7
- [question] Is IMPORTED_LOCATION missing for conan_package_library_targets? HOT 2
- [bug] yasm/1.3.0 doesn't compile with MSVC in release HOT 2
- [question] How to support conanfile.py in a subdirectory, using Bazel
- [bug] generated BUILD.bazel file does not import dll when shared=True for some packages
- [question] Access Resource file in cmake module HOT 1
- [bug] Conan install/graph explain don't find package because they don't filter based on settings/options before selecting package candidate HOT 1
- [question] Header library automatic downstream header propagation HOT 4
- [bug] `conan.tools.files.copy()` fails silently. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.