mistydemeo / tigerbrew

Experimental fork of homebrew for PPC Macs on Tiger
Other
535 stars 128 forks source link

mariadb won't build on 10.5.8; cmake logs don't exist at given location #183

Open deutrino opened 10 years ago

deutrino commented 10 years ago

Installing MariaDB blows up on PPC7450 with the following error, but the cmake output doesn't exist at the location given.

See https://gist.github.com/gordon-morehouse/10681770 for output of 'brew doctor' and 'brew --config'. While I presume maybe the python thing in 'brew --config' isn't great, I suspect it's not related.

$ brew install mariadb
==> Downloading http://ftp.osuosl.org/pub/mariadb/mariadb-10.0.10/kvm-tarbake-ja
Already downloaded: /Library/Caches/Homebrew/mariadb-10.0.10.tar.gz
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/10.0.10 -DCMAKE_FIN

-- Configuring incomplete, errors occurred!
See also "/tmp/mariadb-DDmA/mariadb-10.0.10/CMakeFiles/CMakeOutput.log".
See also "/tmp/mariadb-DDmA/mariadb-10.0.10/CMakeFiles/CMakeError.log".

READ THIS: https://github.com/mistydemeo/tigerbrew/wiki/troubleshooting
mistydemeo commented 10 years ago

Can you post the contents of ~/Library/Logs/Homebrew/mariadb?

mistydemeo commented 10 years ago

Ping!

deutrino commented 10 years ago

Sorry about that! Busy weekend. Please see https://www.dropbox.com/s/gegdeswgy1sdhr5/mariadb_logs.tar.gz

deutrino commented 10 years ago

I forgot I'd tried to do this before and did it again after several 'brew update's. Here's the thing that looks relevant, digging thru the logs you asked for:

-- Performing Test WNO_WRITE_STRING
-- Performing Test WNO_WRITE_STRING - Success
CMake Error at storage/xtradb/CMakeLists.txt:419 (MESSAGE):
  Percona XtraDB is not supported on this platform

-- Configuring incomplete, errors occurred!
See also "/tmp/mariadb-JUlj/mariadb-10.0.10/CMakeFiles/CMakeOutput.log".
See also "/tmp/mariadb-JUlj/mariadb-10.0.10/CMakeFiles/CMakeError.log".

HOMEBREW_VERSION: 0.9.5
HEAD: 64ed1f6dfaaf82a4a1b035a797ac6e6aaabaf178
CPU: single-core 32-bit g4e
OS X: 10.5.8-Power Macintosh
Xcode: 3.1.4
X11: 2.1.6 => /usr/X11
mistydemeo commented 10 years ago

mariadb is trying to build this test program:

  int main()
  {
    long    x;
    long    y;
    long    res;
    char    c;

    x = 10;
    y = 123;
    res = __sync_bool_compare_and_swap(&x, x, y);
    if (!res || x != y) {
      return(1);
    }

    x = 10;
    y = 123;
    res = __sync_bool_compare_and_swap(&x, x + 1, y);
    if (res || x != 10) {
      return(1);
    }
    x = 10;
    y = 123;
    res = __sync_add_and_fetch(&x, y);
    if (res != 123 + 10 || x != 123 + 10) {
      return(1);
    }

    c = 10;
    res = __sync_lock_test_and_set(&c, 123);
    if (res != 10 || c != 123) {
      return(1);
    }
    return(0);
  }

It fails with GCC 4.0, but succeeds with GCC 4.2. Possibly it's picking up the wrong compiler somehow, and thus concluding that it's incompatible?

deutrino commented 10 years ago

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

I'm curious if whatever you had me do (or I did on my own) a couple weeks ago, using a different compiler, "stuck" somehow. How can I tell?

Misty De Meo:

mariadb is trying to build this test program:



x = 10; y = 123; res = __sync_bool_compare_and_swap(&x, x, y); if
(!res || x != y) { return(1); }

x = 10; y = 123; res = __sync_bool_compare_and_swap(&x, x + 1, y); 
if (res || x != 10) { return(1); } x = 10; y = 123; res =
__sync_add_and_fetch(&x, y); if (res != 123 + 10 || x != 123 + 10)
{ return(1); }

c = 10; res = __sync_lock_test_and_set(&c, 123); if (res != 10 || c
!= 123) { return(1); } return(0); } ```

It fails with GCC 4.0, but succeeds with GCC 4.2. Possibly it's
picking up the wrong compiler somehow, and thus concluding that
it's incompatible?

--- Reply to this email directly or view it on GitHub: 
https://github.com/mistydemeo/tigerbrew/issues/183#issuecomment-43397622

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJTdyJWAAoJED/jpRoe7/uj8dYH/0NVX/U4ZxCJyAbRxm43OLrc MHeae+VijkVQJSc3O/DN/dSLBI3/3SZcShlaejjJe9tdcJW/KZo+zZi3YLQ/LOKk 0BRNq41JkA6mH8vvAGD1FtEAkMeWRYmb4HKWH5f7wpc8htsN4YK/vbyM4vOM/aJX gfhkrn0lgT1Fl0O92pC3sqp1LJftej3LoJp3RgFBiGm0pC2K02Wp4FjuJ1RN7bRl gkoEna2Q9g61vGMztcDLlL2vGxNrXmjqCvJJ7G+NX8eaFSfMOAU2Ur+jNjKnbaB1 z/drhgKCWrsLA2VEEC1K7ysWqnkxEgRA+QxSpW28vvKvxrCL34YxhDEsmaqQO78= =SJ9A -----END PGP SIGNATURE-----

mistydemeo commented 10 years ago

After further testing, it does appear that GCC 4.2 is incompatible. I'm going to test with apple-gcc42 on modern OS Xs.

What I'm most likely to do is disable XtraDB when building with GCC 4.0 or 4.2, while allowing it to be build with newer FSF GCCs and (on Intel) clang.

mistydemeo commented 10 years ago

I can't repro this on Intel Leopard, so this looks like a PPC-only issue.

mistydemeo commented 10 years ago

Looks like it's the __sync_lock_test_and_set atomic builtin, which doesn't work as MariaDB expects on PowerPC in this version of GCC. The PowerPC implementation was improved in later GCC versions - looks like anything from 4.3 onward should work fine. (Hint: GCC 4.8 is bottled in homebrew-dupes. :D)

Marked as failing with GCC 4.0 and 4.2 on PowerPC.

mistydemeo commented 10 years ago

Hm, still encountering a different compile bug. Looks like an easy fix though.

mistydemeo commented 10 years ago

The first bug is just that a few places only check for __powerpc__, which isn't defined on OS X. (__ppc__ and __POWERPC__ are.)

Now I'm facing the following in jemalloc.c:

/tmp/mariadb-xnAZ/mariadb-10.0.11/extra/jemalloc/src/jemalloc.c: In function 'malloc_ncpus':
/tmp/mariadb-xnAZ/mariadb-10.0.11/extra/jemalloc/src/jemalloc.c:263:19: error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function)
  result = sysconf(_SC_NPROCESSORS_ONLN);
                   ^
/tmp/mariadb-xnAZ/mariadb-10.0.11/extra/jemalloc/src/jemalloc.c:263:19: note: each undeclared identifier is reported only once for each function it appears in

This seems a bit strange, since sysconf does (according to the manpage) define _SC_NPROCESSORS_ONLN on 10.4.

deutrino commented 10 years ago

Let me know if you need any independent build testing of mariadb on my G4. I installed MySQL in the meantime but I'd like to avoid Oracle software wherever possible, so I'll switch whenever. :)

deutrino commented 10 years ago

Still happy to help - I ran into some weirdities today testing a web app on my ancient hardware - could be because I'm using MySQL there and MariaDB elsewhere. So happy to put a few minutes in. :)

n8chz commented 10 years ago

Don't know if it's a relevant data point, but trying to compile MariaDB 10.0.12 on UbuntuStudio 12.04LTS I get the following:

josie@dignity:~/Downloads/mariadb-10.0.12$ sudo cmake -D CURSES_LIBRARY=/usr/lib/i386-linux-gnu/libcurses.so -D CURSES_INCLUDE_PATH=/usr/include .
-- Running cmake version 2.8.7
-- MariaDB 10.0.12
-- Packaging as: mariadb-10.0.12-Linux-i686
-- suffixes <.so;.a>
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARIES = /usr/lib/i386-linux-gnu/libssl.so
-- CRYPTO_LIBRARY = /usr/lib/i386-linux-gnu/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- SSL_LIBRARIES = /usr/lib/i386-linux-gnu/libssl.so;/usr/lib/i386-linux-gnu/libcrypto.so;dl
-- CONNECT: GCC: Some warnings disabled
CMake Error at storage/xtradb/CMakeLists.txt:409 (MESSAGE):
  Percona XtraDB is not supported on this platform

-- Configuring incomplete, errors occurred!
josie@dignity:~/Downloads/mariadb-10.0.12$ 
mistydemeo commented 10 years ago

A few changes have gone into mariadb; do you mind retrying?

n8chz commented 10 years ago

I kind of gave up and downloaded the binary, but yes, at some point I'll try again to compile it.

rwoody commented 9 years ago

Bump.

Similar errors when trying to install on Yosemite.

==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mariadb/10.0.14 -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -DMYSQL

-- Configuring incomplete, errors occurred!
See also "/tmp/mariadb-AMF2f8/mariadb-10.0.14/CMakeFiles/CMakeOutput.log".
See also "/tmp/mariadb-AMF2f8/mariadb-10.0.14/CMakeFiles/CMakeError.log".

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

These open issues may also help:
Packages with --with-mysql option not satisfied by mariadb (https://github.com/Homebrew/homebrew/issues/32973)
mariadb: missing /usr/local/etc/my.cnf.d, removed by brew prune (https://github.com/Homebrew/homebrew/issues/31760)
mistydemeo commented 9 years ago

Wrong repository! Tigerbrew doesn't support OS X versions newer than 10.5, sorry.