Linuxbrew / legacy-linuxbrew

:skull: This repository is defunct, because it has been split into https://github.com/Linuxbrew/brew and https://github.com/Linuxbrew/homebrew-core
http://linuxbrew.sh
Other
2.23k stars 296 forks source link

re2: Fix for Linuxbrew #1028

Closed rwhogg closed 8 years ago

rwhogg commented 8 years ago

There were two problems with re2:

  1. It was installing libraries with the suffix ".dylib" instead of ".so".
  2. It needs C++ 11. (On OS X it gets used by default).

From https://gist.github.com/rwhogg/83095a698e0ce3289c557c02ca1c0eb8#file-01-make-L11 :

In file included from util/hash.cc:41:
In file included from ./util/util.h:33:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/atomic:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the \
rwhogg commented 8 years ago

Error: The selected compiler doesn't support C++11: gcc

Travis is complaining that gcc doesn't support C++11. It's using Ubuntu 12.04, which means GCC should be 4.6, which supports some C++ 11 features.

Will have to dig into this further.

sjackman commented 8 years ago

I'm okay ignoring the Travis (Ubuntu 12) failure if it builds on LinuxbrewTestBot (Ubuntu 14).

sjackman commented 8 years ago

LinuxbrewTestBot says…

==> brew install --verbose --build-bottle re2
==> Downloading https://github.com/google/re2/archive/2016-03-01.tar.gz
Already downloaded: /home/travis/.cache/Homebrew/re2-20160301.tar.gz
==> Verifying re2-20160301.tar.gz checksum
tar xf /home/travis/.cache/Homebrew/re2-20160301.tar.gz
Error: The selected compiler doesn't support C++11: gcc
==> FAILED

The compiler gcc refers to GCC 4.2 in Mac Homebrew land, which is why it thinks that it doesn't support C++11. Ubuntu 14 has GCC 4.8.4, which I believe does support C++11. So, it should know that the selected compiler supports C++11. I don't know why it's complaining.

In any case, this PR can be merged as is. We'll solve the C++11 issue another day. Merge it! :+1: