Open gauteh opened 6 years ago
Could this be related to the order of the 'threads' component?
If you want to debug this a little bit further yourself you can add some mlog.log()
statements in the following function detect_lib_modules_nix()
:
https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/misc.py#L308
I don't have access to Mac OS so I can't help you further..
This bug was reported by another user, I don't have ready access to Mac OS either.
From the gist it looks like the boost dependency module picks the thread safe library of boost_thread
but not for any other libraries. I don't understand why by simply looking at the code though.. By default it really should pick the threadsafe (-mt
) versions of all boost libraries.
-L/usr/local/lib -lboost_filesystem -lboost_system -lboost_program_options -lboost_log_setup -lboost_log -lboost_thread-mt -lboost_date_time
Yeah - I couldn't immediately spot the issue either, I've recently got reports of the same issues with the boost thread
library as well (which were fixed by downgrading to meson 0.42.1). I've requested some more feedback.
Both boost and meson installed through homebrew.
Could it be that Mac OS has a system wide installation of Boost that gets precedence over an homebrew installation when it searches for libs? Maybe you could ask your users to set BOOST_ROOT
and/or BOOST_LIBDIR
Niklas Claesson writes on oktober 18, 2017 10:57:
Could it be that Mac OS has a system wide installation of Boost that gets precedence over an homebrew installation when it searches for libs? Maybe you could ask your users to set
BOOST_ROOT
and/orBOOST_LIBDIR
BOOST_ROOT is set according to: https://github.com/astroidmail/homebrew-astroid/blob/master/Formula/astroid.rb#L23-L24
(you can also see the boost_log hack there).
LabelAs: macos
Recently I got CI running and it failed I believe because boost did not exist on my mac (so I would doubt the precedence theory). Still working on a release for the CI. I'll see what happens as I climb out of my rabbit hole..
@gauteh Hi, I think this might be fixed now in master. Can you check?
@bredelings: Hi, sorry - but we are no longer using meson, and I don't have access to a Mac.
Hi,
the correct
-mt
version of boost_thread is chosen on mac, but not forboost_log
. Also re-arranging the boost components did not trigger a reconfiguration, but this changes if I clean out build and rebuild.Lib order: https://stackoverflow.com/questions/38121947/boost-log-linking-error-on-osx#answer-38122244
Apparently no non-mt version of log is present with homebrew. Manually editing build.ninja to use -mt makes it work.
Error: