[MacPorts] #65100: weechat @3.5_0+ruby: error: invalid arch name '-arch -lx86_64' (was: weechat @3.5_0: ruby variant is not detected correctly)

MacPorts noreply at macports.org
Mon May 2 10:11:36 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 ryandesign):

 The log shows the error is:

 {{{
 :info:build /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 x86_64 -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
 -lx86_64 -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress
 -lruby.3.0 -L/usr/local/opt/ruby/lib ../libweechat_plugins_scripts.a
 :info:build clang: error: invalid arch name '-arch -lx86_64'
 }}}

 Indeed, `-lx86_64` is not a valid architecture. It should say `x86_64` not
 `-lx86_64`. I wonder how that is getting in there.

 The mention of `-L/usr/local/opt/ruby/lib` is also distressing, since we
 would not want anything you [wiki:FAQ#usrlocal may have installed in
 /usr/local] to be found. If you do have anything in /usr/local, it could
 be interfering with this build. I also see `-lruby.3.0` in the log,
 suggesting it has found ruby 3.0 somewhere and is trying to use it, which
 is wrong since that's not the ruby it declares a dependency on.

 If the maintainer wishes to change weechat to depend on a newer ruby
 that's of course fine, but is orthogonal to the other issues which still
 need to be addressed.

 There is no "problem with the ruby package": the ruby port provides ruby
 version 1.8.x. Other ports provide other versions of ruby. If that's not
 how you expected or want it to work, you could file another ticket for the
 ruby port.

-- 
Ticket URL: <https://trac.macports.org/ticket/65100#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list