Re: [Mesa-dev] [EXTERNAL] Cross-compile from Linux to Windows
You can build for x86 or x86_64, just open the appropriate command prompt, meson should properly detect whether you're using an x86 or an x86_64 toolchain. Quoting Jesse Natalie (2020-11-09 07:06:31) > Have you tried using Meson on Windows, instead of cross-compiling? If you run > it from a Visual Studio command prompt, it should just work out of the box, > at least for x86. I believe you'll need to use a cross file for amd64, but > the only thing you'd need to specify is the host architecture. > > Though I guess if you're building LLVMPipe you'll need to point it to LLVM. > In my experience, adding "--cmake-prefix-path" to the Meson command line > should work well. > > -Jesse > > -Original Message- > From: mesa-dev On Behalf Of Federico > Dossena > Sent: Saturday, November 7, 2020 4:14 AM > To: mesa-dev@lists.freedesktop.org > Subject: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows > > I'm sorry to bother you in the dev list but it seems to be the only one with > activity so it seems like the best place to ask. > > I maintain some Mesa builds for Windows. These are builds of libgl-gdi with > llvmpipe, for both x86 and x86_64; in other words, they're opengl32.dll files > that users can drop into their game/application to have software rendering > for OpenGL as a workaround for broken drivers or as a fallback for older > systems. > I've always used scons on Windows and msvc as a compiler to make these > builds, but now that scons is being deprecated I've been trying to use meson > and ninja to cross-compile from Linux (amd64) to Windows (both x86 and > x86_64) without much success. I can get regular Linux builds without issues > though. > > I tried reading the Mesa documentation on cross-compiling but it's very > minimal and it's partially obsolete so I thought it would be best to ask you > directly: how do I make these builds? Explain like I'm 5, basically. > > Thanks, > > Federico > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-devdata=04%7C01%7Cjenatali%40microsoft.com%7C7ed90f213a9a4204b25108d8848e0ef1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637405092966689938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=A%2BvRfw0Y4C4NufTtNWOwo4COLOOJAw%2F3H9rttkk5jA4%3Dreserved=0 > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [EXTERNAL] Cross-compile from Linux to Windows
cmake_prefix_path isn't like pkg_config_path, it expects to find an installed prefix, on linux it expects to see something like path_to_prefix/usr/{lib,bin}. Dylan Quoting Federico Dossena (2020-11-09 07:33:58) > Thank you for your reply. > > That's where I got stuck on Windows, I can't get it to find LLVM. > > I built LLVM without problems for both x86 and x86_64 in 2 separate > folders, but when I try to build mesa, even with --cmake-prefix-path, it > doesn't find it, it always say "Neither a subproject directory nor a > llvm.wrap file was found". > > I tried moving my LLVM files in the subprojects/llvm folder and that > didn't fix it, I don't know what to do. > > Any suggestion? > > On 2020-11-09 16:06, Jesse Natalie wrote: > > Have you tried using Meson on Windows, instead of cross-compiling? If you > > run it from a Visual Studio command prompt, it should just work out of the > > box, at least for x86. I believe you'll need to use a cross file for amd64, > > but the only thing you'd need to specify is the host architecture. > > > > Though I guess if you're building LLVMPipe you'll need to point it to LLVM. > > In my experience, adding "--cmake-prefix-path" to the Meson command line > > should work well. > > > > -Jesse > > > > -Original Message- > > From: mesa-dev On Behalf Of > > Federico Dossena > > Sent: Saturday, November 7, 2020 4:14 AM > > To: mesa-dev@lists.freedesktop.org > > Subject: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows > > > > I'm sorry to bother you in the dev list but it seems to be the only one > > with activity so it seems like the best place to ask. > > > > I maintain some Mesa builds for Windows. These are builds of libgl-gdi with > > llvmpipe, for both x86 and x86_64; in other words, they're opengl32.dll > > files that users can drop into their game/application to have software > > rendering for OpenGL as a workaround for broken drivers or as a fallback > > for older systems. > > I've always used scons on Windows and msvc as a compiler to make these > > builds, but now that scons is being deprecated I've been trying to use > > meson and ninja to cross-compile from Linux (amd64) to Windows (both x86 > > and x86_64) without much success. I can get regular Linux builds without > > issues though. > > > > I tried reading the Mesa documentation on cross-compiling but it's very > > minimal and it's partially obsolete so I thought it would be best to ask > > you directly: how do I make these builds? Explain like I'm 5, basically. > > > > Thanks, > > > > Federico > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-devdata=04%7C01%7Cjenatali%40microsoft.com%7C7ed90f213a9a4204b25108d8848e0ef1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637405092966689938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=A%2BvRfw0Y4C4NufTtNWOwo4COLOOJAw%2F3H9rttkk5jA4%3Dreserved=0 > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [EXTERNAL] Cross-compile from Linux to Windows
Thank you for your reply. That's where I got stuck on Windows, I can't get it to find LLVM. I built LLVM without problems for both x86 and x86_64 in 2 separate folders, but when I try to build mesa, even with --cmake-prefix-path, it doesn't find it, it always say "Neither a subproject directory nor a llvm.wrap file was found". I tried moving my LLVM files in the subprojects/llvm folder and that didn't fix it, I don't know what to do. Any suggestion? On 2020-11-09 16:06, Jesse Natalie wrote: Have you tried using Meson on Windows, instead of cross-compiling? If you run it from a Visual Studio command prompt, it should just work out of the box, at least for x86. I believe you'll need to use a cross file for amd64, but the only thing you'd need to specify is the host architecture. Though I guess if you're building LLVMPipe you'll need to point it to LLVM. In my experience, adding "--cmake-prefix-path" to the Meson command line should work well. -Jesse -Original Message- From: mesa-dev On Behalf Of Federico Dossena Sent: Saturday, November 7, 2020 4:14 AM To: mesa-dev@lists.freedesktop.org Subject: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows I'm sorry to bother you in the dev list but it seems to be the only one with activity so it seems like the best place to ask. I maintain some Mesa builds for Windows. These are builds of libgl-gdi with llvmpipe, for both x86 and x86_64; in other words, they're opengl32.dll files that users can drop into their game/application to have software rendering for OpenGL as a workaround for broken drivers or as a fallback for older systems. I've always used scons on Windows and msvc as a compiler to make these builds, but now that scons is being deprecated I've been trying to use meson and ninja to cross-compile from Linux (amd64) to Windows (both x86 and x86_64) without much success. I can get regular Linux builds without issues though. I tried reading the Mesa documentation on cross-compiling but it's very minimal and it's partially obsolete so I thought it would be best to ask you directly: how do I make these builds? Explain like I'm 5, basically. Thanks, Federico ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-devdata=04%7C01%7Cjenatali%40microsoft.com%7C7ed90f213a9a4204b25108d8848e0ef1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637405092966689938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=A%2BvRfw0Y4C4NufTtNWOwo4COLOOJAw%2F3H9rttkk5jA4%3Dreserved=0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [EXTERNAL] Cross-compile from Linux to Windows
What version of Mesa are you trying to build? Assuming you're using a version newer than 19.3 (with this change https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/986), the default LLVM discovery should be to use CMake. That means it looks for an installed LLVM in the CMake search dirs. If you don't have https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4555, you will also need to explicitly request a static version of LLVM (-Dshared-llvm=false). -Jesse -Original Message- From: Federico Dossena Sent: Monday, November 9, 2020 7:34 AM To: Jesse Natalie ; mesa-dev@lists.freedesktop.org Subject: Re: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows Thank you for your reply. That's where I got stuck on Windows, I can't get it to find LLVM. I built LLVM without problems for both x86 and x86_64 in 2 separate folders, but when I try to build mesa, even with --cmake-prefix-path, it doesn't find it, it always say "Neither a subproject directory nor a llvm.wrap file was found". I tried moving my LLVM files in the subprojects/llvm folder and that didn't fix it, I don't know what to do. Any suggestion? On 2020-11-09 16:06, Jesse Natalie wrote: > Have you tried using Meson on Windows, instead of cross-compiling? If you run > it from a Visual Studio command prompt, it should just work out of the box, > at least for x86. I believe you'll need to use a cross file for amd64, but > the only thing you'd need to specify is the host architecture. > > Though I guess if you're building LLVMPipe you'll need to point it to LLVM. > In my experience, adding "--cmake-prefix-path" to the Meson command line > should work well. > > -Jesse > > -Original Message- > From: mesa-dev On Behalf Of > Federico Dossena > Sent: Saturday, November 7, 2020 4:14 AM > To: mesa-dev@lists.freedesktop.org > Subject: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows > > I'm sorry to bother you in the dev list but it seems to be the only one with > activity so it seems like the best place to ask. > > I maintain some Mesa builds for Windows. These are builds of libgl-gdi with > llvmpipe, for both x86 and x86_64; in other words, they're opengl32.dll files > that users can drop into their game/application to have software rendering > for OpenGL as a workaround for broken drivers or as a fallback for older > systems. > I've always used scons on Windows and msvc as a compiler to make these > builds, but now that scons is being deprecated I've been trying to use meson > and ninja to cross-compile from Linux (amd64) to Windows (both x86 and > x86_64) without much success. I can get regular Linux builds without issues > though. > > I tried reading the Mesa documentation on cross-compiling but it's very > minimal and it's partially obsolete so I thought it would be best to ask you > directly: how do I make these builds? Explain like I'm 5, basically. > > Thanks, > > Federico > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-devdata=04%7C01%7Cj > enatali%40microsoft.com%7Cb5f74e617d8f41709c6008d884c52096%7C72f988bf8 > 6f141af91ab2d7cd011db47%7C1%7C1%7C637405330339535954%7CUnknown%7CTWFpb > GZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0 > %3D%7C3000sdata=Bff7tju87yGZyyCuqmOB%2BFaKPkBphxCEmLNw2X8E%2FFg%3 > Dreserved=0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [EXTERNAL] Cross-compile from Linux to Windows
Have you tried using Meson on Windows, instead of cross-compiling? If you run it from a Visual Studio command prompt, it should just work out of the box, at least for x86. I believe you'll need to use a cross file for amd64, but the only thing you'd need to specify is the host architecture. Though I guess if you're building LLVMPipe you'll need to point it to LLVM. In my experience, adding "--cmake-prefix-path" to the Meson command line should work well. -Jesse -Original Message- From: mesa-dev On Behalf Of Federico Dossena Sent: Saturday, November 7, 2020 4:14 AM To: mesa-dev@lists.freedesktop.org Subject: [EXTERNAL] [Mesa-dev] Cross-compile from Linux to Windows I'm sorry to bother you in the dev list but it seems to be the only one with activity so it seems like the best place to ask. I maintain some Mesa builds for Windows. These are builds of libgl-gdi with llvmpipe, for both x86 and x86_64; in other words, they're opengl32.dll files that users can drop into their game/application to have software rendering for OpenGL as a workaround for broken drivers or as a fallback for older systems. I've always used scons on Windows and msvc as a compiler to make these builds, but now that scons is being deprecated I've been trying to use meson and ninja to cross-compile from Linux (amd64) to Windows (both x86 and x86_64) without much success. I can get regular Linux builds without issues though. I tried reading the Mesa documentation on cross-compiling but it's very minimal and it's partially obsolete so I thought it would be best to ask you directly: how do I make these builds? Explain like I'm 5, basically. Thanks, Federico ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-devdata=04%7C01%7Cjenatali%40microsoft.com%7C7ed90f213a9a4204b25108d8848e0ef1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637405092966689938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=A%2BvRfw0Y4C4NufTtNWOwo4COLOOJAw%2F3H9rttkk5jA4%3Dreserved=0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev