Closed ghost closed 9 months ago
Are you running in an x86
machine or is it x86_64
?
I've found this: https://github.com/mesonbuild/meson/issues/6128
If the machine is x86_64
it might be the cause, try to upgrade the meson tool to the latest version.
The Meson
build helper that is used by the libepoxy
is not managing the "cross-building" at all, we introduced a new one more complete that will be eventually introduced in the recipes of conan center index. Anyway, it is weird that error and I would say it might be a Meson bug.
I am facing a similar problem, I am on a Windows 11 64-bit system and have a 64-bit Python (3.11.4) installation. However, meson detects my system as x86 instead of x86_64. This in turn prompts it to look for x86 python which I don't have installed. Any suggestions on how to fix it?
The Meson build system
Version: 1.3.0
Source dir: D:\Hetav_Documents\UofT\Academic Planning\ECE 444\OSS\matplotlib
Build dir: D:\Hetav_Documents\UofT\Academic Planning\ECE 444\OSS\matplotlib\build\cp311
Build type: native build
Project name: matplotlib
Project version: 3.9.0.dev0
C compiler for the host machine: cl (msvc 19.36.32537 "Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86")
C linker for the host machine: link link 14.36.32537.0
C++ compiler for the host machine: cl (msvc 19.36.32537 "Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86")
C++ linker for the host machine: link link 14.36.32537.0
Host machine cpu family: x86
Host machine cpu: x86
Program python found: YES (D:\Hetav_Documents\UofT\Academic Planning\ECE 444\OSS\matplotlib-env\Scripts\python.exe)
Need python for x86, but found x86_64
Run-time dependency python found: NO (tried sysconfig)
..\..\meson.build:24:14: ERROR: Python dependency not found
Hi @pandyah5
We would need more details about your current configuration:
It sounds like a Meson bug, but let's try to understand your case before concluding anything.
Hi, I am facing the same problem when I try to compile this package from the source. I am using Windows 11 and have no familiarity with meson or conan. Could you help me a bit in understanding how to retrieve the information you need to figure this problem? Thanks
Hi @franramirez688 thanks for the prompt reply, I sincerely apologize for posting it here. It has little to do with Conan. I have solved the issue on my end and the problem was I was using Developer Command Prompt for VS 2022 which is meant for x86 and not x86_64. That solved my issue 😄
@sbhasan if you are facing the same error please make sure you don't use Developer Command Prompt for VS 2022
instead use VS x64 Native Tools Command Prompt
.
Alternatively have a look at this issue, it also suggests using set VSLANG=1033
Conan has the capability, and it is actually recommended for many cases, to automatically activate the environment that is required. That is if you do conan install ... -s compiler=msvc -s compiler.version=192...
conan will generate conanbuild.bat
script that will automatically call the correct vcvars
to activate the correct VS version and architecture.
The recommendation could be run Conan from normal cmd
(Y use cmder
, for example), and if at some point is necessary to locally set the VS prompt, then just call conanbuild.bat
and it will activate it.
Hi @pandyah5
Thanks for reporting what solved your issue. I hope it helps @sbhasan too.
Closing the issue as there are no bugs related to Conan but Meson.
Don't hesitate to reopen it if any problems come up.
Environment Details
Steps to reproduce
I'm trying to build the
libepoxy
package. It internally uses Meson, I'm targettingx86_64
, but somehow Meson ignores this and builds the package asx86
which later leads to a linking error when building my project.Logs
Executing
conan install .. -s build_type=Debug --build=libepoxy
gives this: