Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDFLAGS, dependency('boost'), and werror=true cause build failures in objcpp on mac #6768

Open
dankegel opened this issue Mar 11, 2020 · 0 comments
Labels

Comments

@dankegel
Copy link
Contributor

A meson.build that uses both LDFLAGS=-L/some/place (in my case, to find something with cc.find_library()) and dependency('boost') causes build errors because get_external_args() suddenly starts returning -L/some/place, which annoys clang greatly. Really, that should only show up in get_external_link_args()...

To reproduce:
On a mac os system, install homebrew, then:

$ brew install boost meson ninja
$ export LDFLAGS=-L/bogus/lib
$ echo "int main(int argc, char **argv) { return 0; }" > bug.mm
$ meson . btmp
$ cd btmp
$ ninja
clang: error: argument unused during compilation: '-L/bogus/lib' [-Werror,-Wunused-command-line-argument]

where meson.build is

project('g-speak', 'objcpp', 'cpp', default_options : [ 'werror=true'])
dependency('boost', modules : ['system'])
executable('bug', 'bug.mm')

system parameters

  • plain native build
  • OS is Mac OS 10.12 or 10.15, probably others as well
  • Python is homebrew's 3.7.6
  • meson --version 0.53.2
  • ninja --version 1.10.0

Judging by https://github.com/Homebrew/homebrew-core/blob/master/Formula/meson.rb, homebrew just installs meson unpatched.

@dankegel dankegel changed the title LDFLAGS, BOOST_ROOT, and werror=true cause build failures in objcpp on mac LDFLAGS, dependency('boost'), and werror=true cause build failures in objcpp on mac Mar 11, 2020
@dcbaker dcbaker added the bug label Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants