From 3985e1031925d12606382c2d9a1bd5f9712294d7 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 19 May 2020 10:44:59 +0200 Subject: [PATCH] Add search paths for 32-bit Boost on Fedora This will also cause the 64-bit version of the library to be picked up on any distro that's not based on Fedora, which may cause some confusing problems. Is there a right way to do this? Meson doesn't allow you to override the library search path for part of the build, and it also can't differentiate between 32-bit and 64-bit libraries by default. --- meson.build | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 360fab2e..83da7c3a 100644 --- a/meson.build +++ b/meson.build @@ -136,17 +136,27 @@ executable( if get_option('use-bitbridge') message('Bitbridge enabled, configuring a 32-bit host application') - # I honestly have no idea what the correct way to have `find_dependency()` use - # `/usr/lib32` instead of `/usr/lib` is. If anyone does know, please tell me! + # I honestly have no idea what the correct way is to have `dependency()` or + # `compiler.find_dependency()` search for 32-bit versions of libraries when + # cross-compiling. Meson also doesn't seem to respect the default linker + # search path set by the system in `find_library()`. If anyone does know how + # to properly do this, please let me know! winegcc = meson.get_compiler('cpp', native : false) boost_filesystem_dep = winegcc.find_library( 'boost_filesystem', static : true, dirs : [ - '/usr/lib32', - '/usr/lib/i386-linux-gnu', + # Used by Arch based distros '/usr/local/lib32', - '/usr/local/lib/i386-linux-gnu' + '/usr/lib32', + # Used by Debian based distros + '/usr/local/lib/i386-linux-gnu', + '/usr/lib/i386-linux-gnu', + # Used by Red Hat based distros, could cause issues though since Meson + # cannot differentiate between the 32-bit version and the regular 64-bit + # version that would normally be in /lib + '/usr/local/lib', + '/usr/lib', ] ) xcb_dep = winegcc.find_library('xcb')