Opened 8 months ago

Closed 8 months ago

#68147 closed defect (invalid)

meson uses wrong arguments with nm

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: catap (Kirill A. Korinsky), mascguy (Christopher Nielsen), ryandesign (Ryan Carsten Schmidt)
Port: meson

Description

I have seen this multiple times with different ports which use meson-build. Obviously, nm in fact works – something is broken in meson. This is on 10.6.8:

WARNING: ['nm'] does not work. Relinking will always happen on source changes.
error: nm: invalid argument --
Usage: nm [-agnopruUmxjlfAPL[s segname sectname] [-] [-t format] [[-arch <arch_flag>] ...] [file ...]

This does not break the build, however, arguably, should still rather be fixed.

Change History (5)

comment:1 Changed 8 months ago by kencu (Ken)

output = call_tool('nm', ['--extern-only', '--defined-only',
                              '--format=posix', libfilename])

can you check which of these arguments nm on 10.6 doesn’t accept?

comment:2 Changed 8 months ago by ryandesign (Ryan Carsten Schmidt)

The error message already says: it doesn't know any argument starting with --.

comment:3 Changed 8 months ago by kencu (Ken)

The ancient /usr/bin/nm on 10.6 won't accept any of those arguments, one dash or two. The default nm for cctools on 10.6 which is +llvm34 also accepts none of them. A newer nm from cctools that uses +llvm90 on 10.6 will accept all of them.

The message is irrelevant to macports builds as they don't use source changes anyway, and it's just noise. It would be simple enough to make a small hack meson to not show the error.

If you want meson to really work as it should (ie you are using it on 10.6 for actual development using meson and not relinking on source changes actually matters to you) you can install cctools +llvm90.

comment:4 in reply to:  3 ; Changed 8 months ago by barracuda156

Replying to kencu:

The ancient /usr/bin/nm on 10.6 won't accept any of those arguments, one dash or two. The default nm for cctools on 10.6 which is +llvm34 also accepts none of them. A newer nm from cctools that uses +llvm90 on 10.6 will accept all of them.

Does nm actually need llvm? Or we can backport a newer version all the way through Tiger?

The message is irrelevant to macports builds as they don't use source changes anyway, and it's just noise. It would be simple enough to make a small hack meson to not show the error.

Thank you, then not really important, as far as meson goes.

comment:5 in reply to:  4 Changed 8 months ago by mascguy (Christopher Nielsen)

Resolution: invalid
Status: newclosed

Replying to barracuda156:

Replying to kencu:

The message is irrelevant to macports builds as they don't use source changes anyway, and it's just noise. It would be simple enough to make a small hack meson to not show the error.

Thank you, then not really important, as far as meson goes.

Great, closing.

Note: See TracTickets for help on using tickets.