Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot install irssi #15389

Closed
brtdv opened this Issue · 25 comments

4 participants

@brtdv

Hi,

I'm currently having issues installing irssi on OS X 10.6. I have the latest version of homebrew and Xcode installed (4.2)

You can find all output, inlcuding the brew update and brew doctor command here

@adamv
Owner

I don't see brew doctor or brew --config output in that gist.

@brtdv

brew doctor is located at the top in the gist. brew --config wasn't and I've added it here. Sorry about that!

@mxcl
Collaborator

irssi wants to use gcc-4.2 but that doesn't exist with Xcode 4.2.

superenv would fix this, but superenv currently is not configured to work on Xcodes this old.

@2bits

@brtdv please gist your ~/Library/Logs/Homebrew/config.log after trying to install this. Something in your system was compiled with gcc-4.2, and that is being queried and picked up somehow. Evidence of this is that it tries to link on your system with -arch ppc but that doesn't happen on my 10.8.2 box. An possible solution could be to tap homebrew/dupes and install gcc-4.2, then brew this with --env=std --use-gcc. I can't test it for you though. So I don't know if that works.

@brtdv

Hi, @2bits. I tried re-installing the irssi with HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install irssi but after the failed make, no ~/Library/Logs/Homebrew/config.log file was created.

When I run the command with office:~ fileserver$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install irssi --env=std --use-gcc, I get the following error even before the ./configure: Error: GCC could not be found

@brtdv

gcc is available. I'm not an export but considering this output I think it is.

@brtdv

On a sidenote: maybe it's also important noting that I'm trying this on an OS X 10.6.8 Server installation. Not a Mac OS X 10.6.8 Client. I'm not sure if this is important but maybe it could.

@2bits

To get your config.log do this

brew install -vd irssi
cat config.log | pbcopy
exit 1

Then surf to github and paste that into a new gist. We possibly can find a permanent fix by examining that. So it's important.

Your point about gcc being available yields a temporary solution that will get this installed! On most systems these days, gcc is a symlink to llvm-gcc, which you can see by

ls -l `which gcc`

llvm-gcc is a moderately different program than a pure gcc, but it acts very similarly. It may actually work well enough for this to build for you if we alias that program with the name gcc-4.2.

ln -s /usr/bin/llvm-gcc-4.2 /usr/local/bin/gcc-4.2
ls -l /usr/local/bin/gcc-4.2
brew prune
brew rm -f irssi
brew install -vd --env=std --use-llvm irssi

Let us know how it goes.

  • That creates the alias (a soft link)
  • It lists the alias it created so you can see it's there
  • Prunes any unused links and directories floating around /usr/local
  • It does a force removal of any possible cruft left over from broken irssi installs
  • It installs irssi finally:
    • in verbose mode using standard env so it retains /usr/local/bin in its path and can find gcc-4.2
    • also using llvm-gcc as the main compiler to attempt a consistent set of variables
@brtdv

@2bits, thanks for the help so far.

I executed the brew install -vd irssi to create the config.log file. This is the output.

I'm going to try the option with the symlink later today and let you know how that worked out!

@2bits

Dang there was nothing in your config.log to indicate where it's picking up gcc-4.2. It's probably a perl thing, but regardless the symlink trick should work.

@2bits

I'm about to crash for the night, but the INSTALL file mentioned this is a common problem with perl when it's built with a different compiler. It mentions editing Makefiles, or we can turn the perl part off by default. So there is a permanent solution I suppose.

@brtdv

I symlinked llvm-gcc-4.2 to gcc-4.2, but the build still fails. It seems like it's trying to build for ppc. I pasted the output in a new gist here.

@2bits

Bummer. I noticed that in your output earlier. I was hoping to find ppc in your config.log so I could alter that variable. I'm guess perl was built that way, and it's trying to use that. I'm not sure how useful this software is without the perl parts, but we can try to build it that way and see how it works for you.

Use brew edit irssi and change this:

                          "--with-perl=yes",
                          "--with-perl-lib=#{lib}/perl5/site_perl",

so that it becomes this:

                          "--with-perl=no",

and tell us how it goes. I'll try to experiment with that too.

@2bits

It looks like Homebrew already patches configure to remove all the archs for perl. I'm still trying to figure why the archs are still getting through some other way. The patch does work. To prove that, if you run the command that spits out the perl cflags before and after patching, you will see what happens:

Before patching it calls perl like this:

$ perl -MExtUtils::Embed -e ccopts
 -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include  -I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE

After patching that command, Homebrew makes it instead do this, stripping out the archs:

$ perl -MExtUtils::Embed -e ccopts | sed -e 's/-arch [^ ]\{1,\}//g'
   -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include  -I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE 

So we can see how there was a previous attempt to solve the -arch ppc issue. Inspecting your config.log, I can see that the archs are indeed stripped out of that. So I can't figure just yet, where those flags and compiler are coming from. This is what your config.log listed, just like it should:

PERL_CFLAGS='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE'

(Admin note, the patches succeed offset by 14,000 lines atm, is that a record? kek)

@2bits

@brtdv I need you to brew this again so that it has the build error, brew install -vd irssi
When it errors out and drops you to a shell prompt, paste the result of this command into a gist

cat src/perl/Makefile | pbcopy

Also paste the result of this into a gist:

find . -type f -exec grep -H -n gcc-4.2 '{}' \;

Thanks man.

@brtdv

This is the content of src/perl/Makefile after I run brew install -vd irssi, and this is the output of the find command.

I guess I could try installing with the "--with-perl=no" option, but I have my doubts if irssi will run correctly. I guess it wouldn't try to install perl if it doesn't need it.

I'm not an expert but here's a suggestion: could we make irssi use the 'builtin' perl? It seems to be available on the system?

@brtdv

FYI

Using brew edit irssi and changing

                      "--with-perl=yes",
                      "--with-perl-lib=#{lib}/perl5/site_perl",

to:

                      "--with-perl=no",

works to get irssi installed. It also seems to run succesfully, but I haven't tested everything out completely.

@2bits

I'm not an expert but here's a suggestion: could we make irssi use the 'builtin' perl? It seems to be available on the system?

It is trying to use the system perl. The problem is that your system perl was compiled with gcc-4.2 and for ppc, i386, x86_64 universal build. What we need to do is remove the -arch ppc and it will be work. I'll investigate your log files today while you test it out.

@2bits

@brtdv Did you get a chance to test whether irssi is functional when built without perl?

@brtdv

For how I use it, it seems to be functional. I'm not an irssi power user though, so I can't really tell if everything works.

@2bits

We will probably have to disable perl for 10.6 by default.

@adamv
Owner

I might add a patch to disable perl on Snow Leopard, if that's what's needed to close this out.

@adamv
Owner

So is the issue here Xcode 4.2 on Snow Leopard? Because this definitely builds with Xcode 3.2.6 on Snow Leopard, as that still provides the requested compiler. What OS/Xcode combinations are failing here?

@brtdv

Yeah, Xcode 4.2

@adamv
Owner

I'm going to add a "without-per" option, though that is probably not satisfying if you want perl support. But unless someone with 4.x on Snow Leopard wants to figure this out, it's the best we can do. We only half-heartedly support compilers above 3.2.6 on Snow Leopard.

@adamv adamv closed this in e5a1a52
@cooljeanius cooljeanius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@cooljeanius cooljeanius referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@erbmicha erbmicha referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@phatblat phatblat referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@jpscharf jpscharf referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@rajeeja rajeeja referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.