[MacPorts] #65100: weechat @3.5_0+ruby: error: invalid arch name '-arch -lx86_64'
MacPorts
noreply at macports.org
Mon Jul 4 02:48:24 UTC 2022
#65100: weechat @3.5_0+ruby: error: invalid arch name '-arch -lx86_64'
---------------------------+----------------------
Reporter: hexadecagram | Owner: cardi
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords:
Port: weechat |
---------------------------+----------------------
Comment (by cardi):
Replying to [comment:4 cardi]:
> Re: the other issues (`-lx86_64` and `-L/usr/local/opt/ruby/lib`), I'll
have to debug the build to see if I have these issues on my side as well.
I've been working on a patch to `FindRuby.cmake` to remove the hard-coded
paths, and I'm now running into the same issue of "invalid arch name",
except on an `arm64` platform.
This particular command fails when specifying the `+ruby` variant (added
linebreaks to make it easier to read):
{{{
/usr/bin/clang -pipe -Os -DNDEBUG -I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
-fsigned-char -fms-extensions -Wall -Wextra -Werror-implicit-function-
declaration -arch arm64
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-
version-min=12.0 -bundle
-Wl,-headerpad_max_install_names -L/opt/local/lib
-Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -o
ruby.so
"CMakeFiles/ruby.dir/weechat-ruby.c.o" "CMakeFiles/ruby.dir/weechat-ruby-
api.c.o"
-L/opt/local/libexec/openssl11/lib -L/opt/local/lib
-Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch
-larm64
-Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -lruby.3.0
../libweechat_plugins_scripts.a
}}}
What's interesting is that the architecture is correctly specified on the
second line `-arch arm64`
but somehow mangled in a repeated invocation on the third line from the
bottom `-arch -larm64`.
Poking around in the build directory, the command being executed above is
in the file
`src/plugins/ruby/CMakeFiles/ruby.dir/link.txt`.
I'm not familiar enough with CMake to understand what's creating that
file, and it isn't obvious to me how all those options are strung together
(e.g., why are various parameters, like `-L/opt/local/lib` or
`-Wl,-headerpad_max_install_names` repeated multiple times?).
Any help in pinpointing where this `-arch -l{arm64,x86_64}` is added would
be appreciated–I can follow up with adding updated ruby variants after.
--
Ticket URL: <https://trac.macports.org/ticket/65100#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list