Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Irssi broken build on ARM mac #68856

Closed
4 tasks done
676339784 opened this issue Jan 12, 2021 · 22 comments
Closed
4 tasks done

Irssi broken build on ARM mac #68856

676339784 opened this issue Jan 12, 2021 · 22 comments
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed

Comments

@676339784
Copy link

676339784 commented Jan 12, 2021

Irssi broken build on ARM mac

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
    • brew config
    • brew doctor: Your system is ready to brew.

What you were trying to do (and why)

Install irssi on ARM mac

What happened (include command output)

Installation is functional but there's something wrong with the build process: see related issue for irssi. To summarize, there's something wrong with the brew formula that causes irssi output to look janky, perhaps due to terminfo.

What you expected to happen

Functional irssi

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

brew install irssi
irssi

Results in broken irssi

@carlocab
Copy link
Member

carlocab commented Jan 12, 2021

irssi works just fine for me. At the very least, I can't seem to reproduce the problem you're having. Missed the subject line saying that this is on an ARM Mac.

ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

Please don't check the boxes without actually doing what they list.

@MikeMcQuaid
Copy link
Member

Closing until reproducible or at least providing logs.

@MikeMcQuaid
Copy link
Member

Reopening after reading edit 😅

@676339784
Copy link
Author

irssi works just fine for me. At the very least, I can't seem to reproduce the problem you're having. Missed the subject line saying that this is on an ARM Mac.

Right. irssi builds fine on my Intel Mac, not on the ARM one.

ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

Please don't check the boxes without actually doing what they list.

Sorry for not including this. The output of brew gist-logs is empty. Added brew config output in original post.

@carlocab
Copy link
Member

carlocab commented Jan 12, 2021

FYI, you still haven't done brew doctor. Please read the template more carefully.

That said, I think I already understand your problem (but please share brew doctor anyway in case I'm wrong):

Your core repo is broken. Same issue as Homebrew/brew#10275. Please do

brew uninstall irssi glib openssl@1.1
brew update
brew install irssi

and try again. If you have Homebrew git installed, do brew uninstall git pcre2 gettext before doing brew update. You can do brew install git again after.

@676339784
Copy link
Author

FYI, you still haven't done brew doctor. Please read the template more carefully.

Cool, updated, thank you. Hopefully that helps a lot!

That said, I think I already understand your problem (but please share brew doctor anyway in case I'm wrong):

Your core repo is broken. Same issue as Homebrew/brew#10275. Please do

brew uninstall irssi glib openssl@1.1
brew update
brew instal irssi

and try again. If you have Homebrew git installed, do brew uninstall git pcre2 gettext before doing brew update. You can do brew install git again after.

I ran into this issue earlier so thanks for filing that issue. I followed the steps you attached again in any case. Unfortunately they do not fix the irssi misalignment problem.

@carlocab
Copy link
Member

What does brew config say now after doing brew update?

@676339784
Copy link
Author

What does brew config say now after doing brew update?

HOMEBREW_VERSION: 2.7.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: a7d7b703696d6d01eda4d4716257ccb0dbe3ab5a
Last commit: 33 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 551a468fe99d598df80b386d511a9ff9470555b9
Core tap last commit: 8 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 12.0 build 1200
Git: 2.30.0 => /opt/homebrew/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.1-arm64
CLT: 12.3.0.0.1.1607026830
Xcode: N/A
Rosetta 2: false

@carlocab
Copy link
Member

carlocab commented Jan 12, 2021

Very strange. Ok. Try

brew uninstall irssi glib openssl@1.1
brew install -s irssi

This will install irssi from source, so may take a few minutes. Let me know if that helps.

@676339784
Copy link
Author

Very strange. Ok. Try

brew uninstall irssi glib openssl@1.1
brew install -s irssi

This will install irssi from source, so may take a few minutes. Let me know if that helps.

No luck unfortunately, really not sure why.

Separate from this, I tried compiling by source manually (steps here) but it wouldn't compile successfully, saying "configure: error: The OpenSSL library was not found."

@carlocab
Copy link
Member

Can you uninstall irssi again, then do

brew install -sv irssi

and put the full output of that into a gist to link back here.

@676339784
Copy link
Author

Can you uninstall irssi again, then do

brew install -sv irssi

and put the full output of that into a gist to link back here.

Yes, gist available here

@carlocab
Copy link
Member

carlocab commented Jan 12, 2021

Try setting

export CPPFLAGS=-I$(brew --prefix openssl)/include
export LDFLAGS=-L$(brew --prefix openssl)/lib
export PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig

before compiling manually so the configure script can find openssl. Please also put the output of compiling from source manually in a gist and link it here so I can compare it with the output from Homebrew.

@676339784
Copy link
Author

Output of ./configure
Output of make
Output of sudo make install

So this compiled but it still results in a misaligned irssi build, making it similar to the Homebrew build. But there's still a disparity between the end results of irssi builds on Intel vs Arm.

@carlocab
Copy link
Member

So this compiled but it still results in a misaligned irssi build, making it similar to the Homebrew build.

Sounds like it's not a Homebrew issue then. You'll need to report this back at irssi/irssi#1238.

@carlocab carlocab added the upstream issue An upstream issue report is needed label Jan 12, 2021
@676339784
Copy link
Author

Sounds good, will do. Thanks for your help!

@carlocab
Copy link
Member

However, I do have one final suggestion. Do

brew edit irssi

and change the uses_from_macos "ncurses" to depends_on "ncurses". Then, do

HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall -s irssi

and let me know if that helps at all. (You'll want to do cd $(brew --repo homebrew/core) && git restore . to undo your changes after this, to restore your core repo back to its original state.)

@lewis262626
Copy link

On a semi-related note why are we doing only one tests by shelling out? Irssi has unit tests?

See here:

test do
   IO.popen("#{bin}/irssi --connect=irc.freenode.net", "w") do |pipe|
     pipe.puts "/quit\n"
     pipe.close_write
   end

@676339784
Copy link
Author

However, I do have one final suggestion. Do

brew edit irssi

and change the uses_from_macos "ncurses" to depends_on "ncurses". Then, do

HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall -s irssi

and let me know if that helps at all. (You'll want to do cd $(brew --repo homebrew/core) && git restore . to undo your changes after this, to restore your core repo back to its original state.)

Thanks again for your help! However, doing brew edit irssi and then doing HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall -s irssi did not change anything on my side.

@carlocab
Copy link
Member

did not change anything on my side.

Hmm, ok. I was thinking maybe the built-in ncurses was just too old and not behaving properly. However, this test at least rules this out. I'm more confident now that there's something wrong with the irssi source code.

Irssi has unit tests?

We usually prefer simple functionality tests, rather than complete unit tests, just to catch build errors that weren't caught at build time.

@SMillerDev
Copy link
Member

Irssi has unit tests?

Unit tests are to verify the software works as expected. Homebrew tests are to verify we build it succesfully.

@carlocab
Copy link
Member

Given:

  1. this isn't an issue with Homebrew's packaging of irssi;
  2. we don't have any local workarounds that might fix the problem; and,
  3. the upstream issue seems to be underway,

there doesn't appear to be much need to keep this issue open. Closing it now, but let me know if circumstances change that necessitate reopening.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Feb 13, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

6 participants