Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.99k stars 9.62k forks source link

brew doctor -> undefined method `split' for nil:NilClass #13762

Closed black-snow closed 2 years ago

black-snow commented 2 years ago

brew config output

HOMEBREW_VERSION: 3.5.10-51-g7617109
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7617109d43060aa0225f774bad9971bcbd166e15
Last commit: 10 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 08444116f4472540d4738e1c85b338e534fa86f0
Core tap last commit: 10 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 16
Homebrew Ruby: 2.6.8 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: 16-core 64-bit zen3
Clang: 14.0.6
Git: 2.37.2 => /home/linuxbrew/.linuxbrew/bin/git
Curl: 7.81.0 => /bin/curl
Kernel: Linux 5.10.102.1-microsoft-standard-WSL2 x86_64 GNU/Linux
OS: Ubuntu 22.04.1 LTS (jammy)
Host glibc: 2.35
/usr/bin/gcc: 11.2.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@5: N/A
xorg: N/A

brew doctor output

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /home/xxx/.local/bin/ansible-config

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  six
Error: undefined method `split' for nil:NilClass
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/diagnostic.rb:156:in `block (2 levels) in check_gcc_dependent_linkage'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/diagnostic.rb:155:in `any?'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/diagnostic.rb:155:in `block in check_gcc_dependent_linkage'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/diagnostic.rb:153:in `select'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/diagnostic.rb:153:in `check_gcc_dependent_linkage'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/doctor.rb:64:in `block in doctor'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/doctor.rb:57:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/doctor.rb:57:in `doctor'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:93:in `<main>'

Verification

What were you trying to do (and why)?

I always run brew doctor after my upgrades and for a couple of days now it's been throwing above mentioned error.

What happened (include all command output)?

brew doctor

Error: undefined method `split' for nil:NilClass

What did you expect to happen?

Some warnings but no errors.

Step-by-step reproduction instructions (by running brew commands)

`brew doctor`
carlocab commented 2 years ago

Thanks for the report. What's the output of

brew uses --recursive gcc

?

carlocab commented 2 years ago

The problem seems to be here:

https://github.com/Homebrew/brew/blob/7617109d43060aa0225f774bad9971bcbd166e15/Library/Homebrew/extend/os/linux/diagnostic.rb#L156

We can make the problem go away with something like

diff --git a/Library/Homebrew/extend/os/linux/diagnostic.rb b/Library/Homebrew/extend/os/linux/diagnostic.rb
index d3d46cd79..2616e87a6 100644
--- a/Library/Homebrew/extend/os/linux/diagnostic.rb
+++ b/Library/Homebrew/extend/os/linux/diagnostic.rb
@@ -153,7 +153,7 @@ module Homebrew
         badly_linked = gcc_dependents.select do |dependent|
           keg = Keg.new(dependent.prefix)
           keg.binary_executable_or_library_files.any? do |binary|
-            paths = binary.rpath.split(":")
+            paths = binary.rpaths
             versioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/\d+$}) }
             unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }

diff --git a/Library/Homebrew/os/linux/elf.rb b/Library/Homebrew/os/linux/elf.rb
index 73dd1b016..67589cf6a 100644
--- a/Library/Homebrew/os/linux/elf.rb
+++ b/Library/Homebrew/os/linux/elf.rb
@@ -97,7 +97,7 @@ module ELFShim
   # An array of runtime search path entries, such as:
   # ["/lib", "/usr/lib", "/usr/local/lib"]
   def rpaths
-    rpath.split(":")
+    rpath&.split(":").to_a
   end

   def interpreter

But I'm not convinced this is the right fix. I'm really suspicious about #rpath returning nil here. This smells like a bug elsewhere, and we want to fix that instead of papering over it.

@Homebrew/linux, am I mistaken about thinking #rpath should not be returning nil on Linux?

black-snow commented 2 years ago

Thanks for the report. What's the output of

brew uses --recursive gcc

?

brew uses --recursive gcc
Error: Failed to import: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-xorg/Formula/xorg-fonts.rb
xorg-fonts: wrong number of arguments (given 1, expected 0)
Error: Failed to import: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-xorg/Formula/xorg-apps.rb
xorg-apps: wrong number of arguments (given 1, expected 0)

... lists a a huge amount of things, example:
abcl                             clickhouse-cpp                   freeglut                         irrlicht                         mesa-glu                         pktanon                          sql-lint
abricate                         clickhouse-odbc                  freerdp                          ispc                             mesalib-glw                      planck                           sqlancer
carlocab commented 2 years ago
... lists a a huge amount of things

That's expected. I need the complete version of this list to track down the bug I mention in my last comment.

carlocab commented 2 years ago

Alternatively, you could try applying this patch so I can have a look at what exactly is missing an RPATH:

diff --git a/Library/Homebrew/extend/os/linux/diagnostic.rb b/Library/Homebrew/extend/os/linux/diagnostic.rb
index d3d46cd79..86c3fcb68 100644
--- a/Library/Homebrew/extend/os/linux/diagnostic.rb
+++ b/Library/Homebrew/extend/os/linux/diagnostic.rb
@@ -158,6 +158,8 @@ module Homebrew
             unversioned_linkage = paths.any? { |path| path.match?(%r{lib/gcc/current$}) }

             versioned_linkage && !unversioned_linkage
+          rescue NoMethodError
+            odie "#{binary} has no RPATH!"
           end
         end
         return if badly_linked.empty?
black-snow commented 2 years ago

Here you go

brew uses --recursive gcc
Error: Failed to import: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-xorg/Formula/xorg-fonts.rb
xorg-fonts: wrong number of arguments (given 1, expected 0)
Error: Failed to import: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/linuxbrew/homebrew-xorg/Formula/xorg-apps.rb
xorg-apps: wrong number of arguments (given 1, expected 0)
abcl                             clickhouse-cpp                   freeglut                         irrlicht                         mesa-glu                         pktanon                          sql-lint
abricate                         clickhouse-odbc                  freerdp                          ispc                             mesalib-glw                      planck                           sqlancer
abseil                           clinfo                           freeswitch                       itk                              metabase                         plantuml                         sqoop
abuse                            clip                             frege                            itpp                             metaproxy                        plowshare                        sratoolkit
abyss                            clojure                          frege-repl                       ivy                              mgba                             plplot                           standardese
activemq                         clojurescript                    fs-uae                           jadx                             micronaut                        pmd                              stanford-corenlp
adios2                           closure-compiler                 ftgl                             jags                             mikutter                         pnetcdf                          stanford-ner
akka                             closure-stylesheets              fuseki                           jasmin                           mill                             poac                             stanford-parser
alda                             cloud-watch                      gabedit                          javacc                           minetest                         pocl                             stella
alembic                          clp                              galen                            jbake                            minidlna                         podman                           stellar-core
alexjs                           clutter                          gambit                           jboss-forge                      minimodem                        podman-compose                   stockfish
allegro                          clutter-gst                      gammaray                         jdnssec-tools                    minizinc                         points2grid                      stone-soup
allure                           clutter-gtk                      ganglia                          jdtls                            mkvdts2ac3                       polynote                         storm
alpscore                         cmus                             gatsby-cli                       jena                             mkvtomp4                         poppler                          structurizr-cli
ammonite-repl                    code-server                      gcviewer                         jenkins                          mkvtoolnix                       poppler-qt5                      suil
amtk                             codequery                        gdal                             jetty                            mlpack                           postgis                          suite-sparse
amtterm                          coffeescript                     gdb                              jetty-runner                     mlt                              postgraphile                     sundials
angular-cli                      cogl                             gdbgui                           jflex                            moc                              pow                              superlu
anime-downloader                 coin3d                           gdcm                             jhipster                         mockserver                       pprint                           supermodel
anjuta                           coinutils                        gdl                              jinx                             moco                             ppsspp                           supertux
ansible-language-server          colima                           gecode                           jmeter                           mold                             pqiv                             svgo
ant                              color-code                       gedit                            jmxterm                          mongodb-atlas-cli                predictionio                     symengine
ant-contrib                      conjure-up                       geeqie                           jolie                            mongosh                          prefixsuffix                     synergy-core
ant@1.9                          contentful-cli                   generate-json-schema             jooby-bootstrap                  monika                           prettier                         synfig
antlr                            corepack                         geocode-glib                     joplin-cli                       mpd                              procyon-decompiler               syntaxerl
antlr4-cpp-runtime               corsixth                         geogram                          joshua                           mpdviz                           proguard                         sysbench
antlr@2                          couchdb                          geomview                         jpdfbookmarks                    mpi4py                           projectm                         sysdig
anttweakbar                      couchdb-lucene                   get_iplayer                      jpeg-xl                          mpich                            proper                           t-rec
apache-archiva                   coursier                         ghex                             jruby                            mpv                              proteinortho                     tailor
apache-arrow                     cp2k                             ghostscript                      jsawk                            mrbayes                          ps2eps                           tarsnap-gui
apache-arrow-glib                cpi                              gifcap                           jsdoc3                           msc-generator                    pstoedit                         task
apache-ctakes                    cpl                              gifify                           jslint4java                      mu                               pulp                             tasksh
apache-forrest                   cqlkit                           gifski                           json-fortran                     mupdf                            purescript-language-server       taskwarrior-tui
apache-opennlp                   cquery                           git-cola                         json5                            mupen64plus                      pushpin                          tcpflow
apache-pulsar                    cromwell                         git-credential-manager           jsonlint                         mvnvm                            puzzles                          tdkjs
apache-spark                     crowdin                          git-tf                           jsonschema2pojo                  mvtools                          pyenv-ccache                     tee-clc
apgdiff                          cryfs                            gitbucket                        jsvc                             mydumper                         pympress                         teku
apidoc                           cryptol                          gitg                             julia                            mysql                            pymupdf                          tepl
apktool                          crystal                          gitlab-ci-local                  jupyterlab                       mysql++                          pyqt                             terminalimageviewer
apngasm                          crystal-icr                      gitmoji                          jython                           mysql-client                     pyqt@5                           terminator
apollo                           csfml                            gitter-cli                       kafka                            mysql-connector-c++              pyright                          terraform
apollo-cli                       csound                           giza                             kahip                            mytop                            pyside                           terraform-provider-libvirt
appium                           ctemplate                        gjs                              kaitai-struct-compiler           nativefier                       pyside@2                         terraform-rover
apt                              cubejs-cli                       gl2ps                            kakoune                          ncc                              pythran                          terragrunt
aqbanking                        curaengine                       glade                            kallisto                         ncmpc                            pytouhou                         terrahub
arangodb                         cypher-shell                     glbinding                        karchive                         ncmpcpp                          qalculate-gtk                    tesseract
aravis                           czg                              gleam                            kawa                             nco                              qbs                              tesseract-lang
arcade-learning-environment      dartsim                          glew                             kdoctools                        ncview                           qca                              texlive
argus-clients                    datetime-fortran                 glfw                             kettle                           negfix8                          qcachegrind                      textidote
armadillo                        davmail                          glibmm                           khiva                            neovim-qt                        qcli                             tgui
arpack                           dbml-cli                         globjects                        ki18n                            nest                             qd                               thors-serializer
arrayfire                        deno                             glslviewer                       kim-api                          nestopia-ue                      qemu                             thrax
arss                             denominator                      glui                             kitchen-sync                     netcdf                           qjackctl                         threadweaver
artifactory                      dependency-check                 gmic                             klavaro                          netlify-cli                      qjson                            tiger-vnc
artillery                        derby                            gmsh                             klee                             networkit                        qmmp                             tika
arturo                           detekt                           gmt                              kotlin                           newman                           qrupdate                         timewarrior
arx-libertatis                   dex2jar                          gmt@5                            kumo                             ngspice                          qscintilla2                      timg
asciidoctorj                     diesel                           gnome-autoar                     lammps                           nicotine-plus                    qsoas                            titan-server
ask-cli                          diff-pdf                         gnome-latex                      lanraragi                        nifi-registry                    qt                               tomcat
aspectj                          difftastic                       gnome-recipes                    lapack                           node                             qt-libiodbc                      tomcat-native
assimp                           dita-ot                          gnumeric                         latex2html                       node-sass                        qt-mariadb                       tomcat@7
astrometry-net                   ditaa                            gnuplot                          launch4j                         node@16                          qt-mysql                         tomcat@8
asymptote                        djl-serving                      gnuradio                         lc0                              notcurses                        qt-percona-server                tomcat@9
asyncapi                         djview4                          goffice                          lcm                              ns-3                             qt-postgresql                    tomee-plume
atkmm                            djvu2pdf                         goocanvas                        ldc                              ntopng                           qt-unixodbc                      tomee-plus
atlantis                         dlib                             google-java-format               leakcanary-shark                 numpy                            qt@5                             tomee-webprofile
atomist-cli                      dmtx-utils                       google-sql-tool                  lean                             numpy@1.16                       qtads                            trafficserver
aubio                            dnsdist                          gource                           leapp-cli                        nuxeo                            qtkeychain                       treefrog
audacious                        dosbox-staging                   gpredict                         ledger                           nvc                              quazip                           tremor-runtime
autocannon                       dosbox-x                         gpsbabel                         leela-zero                       nwchem                           quick-lint-js                    trimage
autocode                         doxygen                          grace                            leiningen                        objfw                            quicktype                        trino
autodiff                         doxymacs                         gradio                           lerna                            oclgrind                         quill                            triton
autopsy                          dpp                              gradle                           lfe                              ocrmypdf                         qwt                              truffle
autorest                         dsda-doom                        graph-tool                       libadwaita                       octave                           qwt-qt5                          tsung
avro-tools                       dspdfviewer                      graphql-cli                      libbi                            odin                             qxmpp                            ttygif
awf                              duc                              graphqurl                        libchamplain                     ola                              r                                typescript
aws-auth                         duck                             groestlcoin                      libdazzle                        ompl                             rabbitmq                         uhd
aws-cdk                          dungeon                          groff                            libepoxy                         onnxruntime                      range-v3                         umlet
aws-cfn-tools                    dvc                              grokj2k                          libgdata                         open-mpi                         ratfor                           umple
aws-sdk-cpp                      dynare                           gromacs                          libgosu                          open-scene-graph                 raxml-ng                         uncrustify
aws/tap/container-tools          easy-tag                         groovy                           libgr                            openalpr                         raylib                           ungit
aws/tap/k8s-tools                easyrpg-player                   groovysdk                        libgrape-lite                    openapi-generator                rdkit                            unpaper
awscli                           ec2-ami-tools                    groovyserv                       libgweather                      openblas                         rds-command-line-tools           upscaledb
awscli@1                         ec2-api-tools                    grpc                             libgxps                          opencascade                      react-native-cli                 urh
babel                            eccodes                          grsync                           libhandy                         openclonk                        rebar                            v8
baobab                           ecflow-ui                        grunt-cli                        libmatio                         opencoarrays                     rebar3                           vapoursynth
basex                            echoprint-codegen                gsmartcontrol                    libmwaw                          opencsg                          release-it                       vapoursynth-imwri
bash-language-server             efl                              gspell                           libnetworkit                     opencv                           reproc                           vapoursynth-ocr
batik                            eigenpy                          gst-libav                        libopenmpt                       opencv@2                         riemann                          vapoursynth-sub
bbtools                          ejabberd                         gst-plugins-good                 liboqs                           opencv@3                         rocksdb                          vault-cli
bcoin                            elasticsearch                    gst-plugins-rs                   libpeas                          opendht                          rollup                           vcpkg
bcpp                             elasticsearch@6                  gtk+3                            libphonenumber                   openfast                         rom-tools                        vcs
bear                             elb-tools                        gtk-mac-integration              libpqxx                          openfst                          root                             veclibfort
bee                              eleventy                         gtk-vnc                          libqalculate                     openimageio                      rosa-cli                         verapdf
bfg                              elixir                           gtk4                             libreadline-java                 openjdk                          rrdtool                          vercel-cli
bigloo                           elixir-ls                        gtkdatabox                       librealsense                     openjdk@17                       rtags                            verilator
binaryen                         elvis                            gtkglext                         libsigc++                        openkim-models                   rubberband                       vert.x
binwalk                          emacs-clang-complete-async       gtkmm3                           libsigrok                        openliberty-jakartaee8           s2geometry                       vgmstream
biosig                           emscripten                       gtkmm4                           libspectre                       openliberty-jakartaee9           savana                           vice
bit                              enex2notion                      gtksourceview3                   libtcod                          openliberty-microprofile4        saxon                            viennacl
bitcoin                          ensmallen                        gtksourceview4                   libvirt                          openliberty-webprofile8          sbt                              vips
bitwarden-cli                    enzyme                           gtksourceview5                   libvirt-glib                     openliberty-webprofile9          sbuild                           virt-manager
blast                            epstool                          gtksourceviewmm3                 libxc                            openmodelica                     scala                            virtualpg
blastem                          epubcheck                        gtkspell3                        libxml++@4                       openmsx                          scala@2.12                       visp
blaze                            erlang                           gtop                             libzdb                           openrct2                         scalapack                        vit
blockhash                        erlang@21                        gtranslator                      lilypond                         opensearch                       scalariform                      vite
bltool                           erlang@22                        gucharmap                        lima                             opensubdiv                       scalastyle                       vnu
bnd                              erlang@23                        guichan                          lincity-ng                       opentelemetry-cpp                scipy                            volk
boost-mpi                        erlang@24                        gulp-cli                         linuxbrew/xorg/libvdpau-va-gl    opentsdb                         scm-manager                      vroom
boot-clj                         esbuild                          gupnp-tools                      linuxbrew/xorg/xdriinfo          openttd                          scotch                           vsce
botan                            eslint                           gwenhywfar                       linuxbrew/xorg/xrdb              openvdb                          scrcpy                           vte3
bower                            etcd-cpp-apiv3                   gwt                              liquibase                        or-tools                         scry                             vtk
briss                            ettercap                         gwyddion                         liquid-dsp                       orc-tools                        scs                              vtk@8.2
bsponmpi                         evince                           h2                               litani                           orientdb                         scummvm-tools                    vue-cli
btop                             excel-compare                    hackrf                           llnode                           osi                              sdedit                           wabt
bundletool                       exiftran                         halide                           llvm                             osm-gps-map                      seal                             waffle
byteman                          f3d                              hamlib                           lnav                             osm2pgrouting                    selenium-server                  walkmod
bzt                              fabric-installer                 hapi-fhir-cli                    localtunnel                      osmcoastline                     semgrep                          wangle
c2rust                           faiss                            hashcat                          log4cxx                          osmosis                          sentencepiece                    waon
caf                              fantom                           hashlink                         logstalgia                       otf2                             serverless                       wartremover
caffe                            fanyi                            hdf5                             logstash                         packmol                          sextractor                       watchman
caire                            fastbit                          hdf5-mpi                         lsix                             pacmc                            sfcgal                           webkitgtk
cairomm                          fastnetmon                       hdf5@1.10                        ltex-ls                          pagmo                            sfml                             webpack
calabash                         fastqc                           hdf5@1.8                         lua-language-server              pangomm                          shivavg                          webtorrent-cli
calceph                          fauna-shell                      helib                            luaradio                         parquet-cli                      shogun                           whistle
carla                            faust                            helix                            luau                             parquet-tools                    shtools                          widelands
carrot2                          fb303                            hexgui                           lucky-commit                     partio                           signal-cli                       wildfly-as
cash-cli                         fbthrift                         hexo                             magic_enum                       patchelf                         sigrok-cli                       wiremock-standalone
castxml                          fceux                            highlight                        mallet                           pax-construct                    simdjson                         wrangler
catch2                           fdroidserver                     highs                            mame                             pc6001vx                         simgrid                          write-good
cava                             feedgnuplot                      homebank                         man-db                           pcb                              simple-mtpfs                     wxmaxima
cbc                              ffmpeg                           homeworlds                       manticoresearch                  pcb2gcode                        simple-scan                      wxpython
cbmc                             ffmpeg2theora                    hsd                              mapnik                           pcl                              simple-tiles                     wxwidgets
ccache                           ffmpeg@4                         htmlcleaner                      mapserver                        pdal                             simutrans                        wxwidgets@3.0
ccextractor                      ffmpegthumbnailer                htmlcompressor                   mariadb                          pdf-redact-tools                 siril                            xdot
ccls                             ffms2                            http-server                      mariadb@10.2                     pdf2djvu                         sjk                              xfig
cdk8s                            fftw                             httpyac                          mariadb@10.3                     pdf2image                        skinny                           xgboost
cdktf                            fheroes2                         huexpress                        mariadb@10.4                     pdf2svg                          skymaker                         xmlsectool
cdo                              field3d                          hydra                            mariadb@10.5                     pdfgrep                          sleuthkit                        xpdf
cdogs-sdl                        fifechan                         hypre                            mariadb@10.6                     pdfpc                            sloc                             yacas
ceres-solver                     fig2dev                          i2p                              mariadb@10.7                     pdfsandwich                      smali                            yaml-language-server
cf4ocl                           file-roller                      iamy                             markdown-toc                     pdftoipe                         snakemake                        yaws
cfr-decompiler                   firebase-cli                     icemon                           markdownlint-cli                 pdns                             snapcraft                        yelp-tools
cgal                             fits                             iconsur                          marked                           pdnsrec                          snort                            yle-dl
cgl                              fizz                             igraph                           marp-cli                         pegtl                            snowpack                         yuicompressor
cgns                             flamebearer                      igv                              mat2                             percona-server                   solarus                          z3
chalk-cli                        flank                            imagemagick                      matplotplusplus                  percona-toolkit                  solidity                         zbar
chapel                           flann                            imagemagick@6                    maven                            percona-xtrabackup               solr                             zeek
charge                           flix                             imgproxy                         maven@3.2                        petsc                            sophus                           zelda-roth-se
checkstyle                       fltk                             include-what-you-use             maven@3.3                        petsc-complex                    spaceman-diff                    zenity
cherrytree                       flyway                           innotop                          maven@3.5                        pgrouting                        sparse                           zim
chromaprint                      fmpp                             insect                           mavsdk                           pianobar                         spatialite-gui                   zita-convolver
cimg                             fobis                            inspectrum                       maxima                           pianod                           spdlog                           zookeeper
ciphey                           folderify                        inspircd                         mdds                             picard-tools                     spice-gtk                        zsdx
civl                             folly                            install-peerdeps                 mdk                              pict                             spidermonkey                     zsxd
clazy                            fop                              instead                          mednafen                         pig                              spidermonkey@78                  zurl
clblas                           forge                            ioke                             mercury                          pinot                            spirv-llvm-translator            zx
clblast                          fox                              ios-sim                          mermaid-cli                      pioneer                          spot
clearlooks-phenix                freeciv                          ipopt                            mesa                             pioneers                         spotbugs

Thanks for looking into this.

black-snow commented 2 years ago
+          rescue NoMethodError
+            odie "#{binary} has no RPATH!"

Interesting, applying the patch:

Error: /home/linuxbrew/.linuxbrew/Cellar/dive/0.10.0/bin/dive has no RPATH!
carlocab commented 2 years ago

Thanks. If you change the odie to ofail, do any other error messages show up, other than the one for dive?

carlocab commented 2 years ago

And, sorry, I missed a flag for brew uses, it actually should've been

brew uses --installed --recursive gcc

Could you also show the output of that?

black-snow commented 2 years ago
brew uses --installed --recursive gcc
abseil               awscli               fftw                 gradle               llvm                 mesa                 numpy                openblas             ripgrep-all          terraform            x264
apache-arrow         dvc                  freeglut             groff                lnav                 mesa-glu             open-mpi             openjdk              rubberband           tesseract
aws-sdk-cpp          ffmpeg               ghostscript          grpc                 maven                node                 openapi-generator    patchelf             semgrep              vamp-plugin-sdk
black-snow commented 2 years ago

ofail yields some new outputs:

Error: /home/linuxbrew/.linuxbrew/Cellar/dive/0.10.0/bin/dive has no RPATH!
Error: /home/linuxbrew/.linuxbrew/Cellar/terraform/1.2.8/bin/terraform has no RPATH!

Warning: Formulae which link to GCC through a versioned path were found. These formulae
are prone to breaking when GCC is updated. You should `brew reinstall` these formulae:
  dive
  ffmpeg
  terraform

Reinstalled all three but the error remains.

carlocab commented 2 years ago

Great; thanks. This has been very helpful. I'll have a fix up shortly.

carlocab commented 2 years ago

I've opened #13765, which is essentially the patch from https://github.com/Homebrew/brew/issues/13762#issuecomment-1228270110. If you have the time to test it, I'd appreciate it.

black-snow commented 2 years ago

@carlocab applying both lines successfully mutes the error 👍

I'll close this even though it's not yet merged. Thanks a lot for the quick fix.