mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.6k stars 1.63k forks source link

AttributeError on generating xcode project #1957

Open Framstag opened 7 years ago

Framstag commented 7 years ago

I get the following error while triggering the xcode backend:

meson --backend xcode xcode

Traceback (most recent call last):
  File "/usr/local/Cellar/meson/0.41.0/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 307, in run
    app.generate()
  File "/usr/local/Cellar/meson/0.41.0/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 182, in generate
    g.generate(intr)
  File "/usr/local/Cellar/meson/0.41.0/lib/python3.6/site-packages/mesonbuild/backend/xcodebackend.py", line 71, in generate
    self.generate_filemap()
  File "/usr/local/Cellar/meson/0.41.0/lib/python3.6/site-packages/mesonbuild/backend/xcodebackend.py", line 118, in generate_filemap
    for o in t.objects:
AttributeError: 'CustomTarget' object has no attribute 'objects'

Complete build files can be found at https://github.com/Framstag/libosmscout

The ninja build works without problems.

jpakkane commented 7 years ago

Sadly the XCode backend is a bit derelict and no-one has stepped up to maintain it. :(

nirbheek commented 7 years ago

Since none of the xcode backend code is run on our CI, the state of the backend is going to keep getting worse. As a first step, we need to make a list of tests that do pass on macOS and run exactly those on the CI so we at least don't regress constantly.

drsog commented 6 years ago

I have a fix, but I am currently looking for a CI ticket...

nirbheek commented 6 years ago

@drsog were you able to make progress on this?

ylipacbio commented 6 years ago

I am wondering if there is any progress on this bug? Or alternative, which version of meson is compatible with xcode? I could downgrade meson to the desired version

asartori86 commented 5 years ago

any improvements? I know meson itself doesn't want to depend on any dependencies, but maybe a workaround could be use something else (like the meson-cmake-wrapper) written in the documentation. Maybe (if it is not already done) we might output a suitable json file for a tool like this https://github.com/yonaskolb/XcodeGen. I don't have a mac but I am pushing forward to remove cmake from a project where we have many xcode users...

gizahNL commented 4 years ago

This bug is still present today in meson installed via pip3 on MacOS