Opened 5 years ago

Closed 4 years ago

#60400 closed defect (fixed)

mysql56: error: #error "Unsupported platform"

Reported by: bryancn Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: leopard powerpc Cc: khepler, chrstphrchvz (Christopher Chavez)
Port: mysql56

Description

'sudo port upgrade outdated' fails on today's revision of mysql56-server:

Error: Failed to build mysql56: command execution failed

https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/25066

Attachments (2)

main.log (927.1 KB) - added by bryancn 5 years ago.
Log
patch-mysql56-version-change.diff (757 bytes) - added by kencu (Ken) 4 years ago.

Download all attachments as: .zip

Change History (15)

Changed 5 years ago by bryancn

Attachment: main.log added

Log

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mysql56 removed
Port: mysql56 added; mysql56-server removed
Summary: Revision of mysql56-server failed install-dependenciesmysql56: error: #error "Unsupported platform"

The relevant error from the 10.6 x86_64 buildbot log was:

cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/storage/myisam && /opt/local/bin/clang-mp-9.0 -DEMBEDDED_LIBRARY -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_TLSv13 -DMYSQL_SERVER -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/mysql-5.6.47/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/mysql-5.6.47/sql -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/mysql-5.6.47/regex -I/opt/local/include  -pipe -Os -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement -DNDEBUG -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.6   -o CMakeFiles/myisam_embedded.dir/mi_write.c.o   -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/myisam/mi_write.c
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/libmysql && /usr/bin/libtool -static -o /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/libmysql/libmysqlclient.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/libmysql/libclientlib.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/dbug/libdbug.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/strings/libstrings.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/vio/libvio.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/mysys/libmysys.a /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/mysys_ssl/libmysys_ssl.a /opt/local/lib/libssl.a /opt/local/lib/libcrypto.a
/usr/bin/libtool: object: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/libmysql/libclientlib.a(libmysql.c.o) malformed object (unknown load command 2)
/usr/bin/libtool: object: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/strings/libstrings.a(ctype-mb.c.o) malformed object (unknown load command 2)
/usr/bin/libtool: object: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/mysys/libmysys.a(my_bitmap.c.o) malformed object (unknown load command 2)
/usr/bin/libtool: object: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build/mysys_ssl/libmysys_ssl.a(my_default.cc.o) malformed object (unknown load command 2)
make[2]: *** [libmysql/libmysqlclient.a] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_databases_mysql56/mysql56/work/build'
make[1]: *** [libmysql/CMakeFiles/mysqlclient.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

This malformed object (unknown load command 2) is probably a result of the libtool port not being installed. Duplicate of #59072.


The relevant errors from the 10.5 ppc main.log attached to this ticket were:

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/ut0ut.h:44,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/univ.i:604,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/api/api0api.cc:35:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/os0sync.h:512:4: error: #error "Unsupported platform"
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/sync0sync.h:841,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/mem0mem.h:42,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/data0data.h:41,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/que0que.h:38,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/api0misc.h:40,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/api/api0api.cc:46:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/sync0sync.ic: In function ‘lock_word_t ib_mutex_test_and_set(ib_mutex_t*)’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/sync0sync.ic:91: error: ‘os_atomic_test_and_set’ was not declared in this scope
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/sync0sync.ic: In function ‘void mutex_reset_lock_word(ib_mutex_t*)’:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mysql56/mysql56/work/mysql-5.6.47/storage/innobase/include/sync0sync.ic:120: error: ‘os_atomic_clear’ was not declared in this scope

This error: #error "Unsupported platform" makes me think this will not be buildable on PowerPC, sorry. The port should use supported_archs i386 x86_64 to indicate this lack of PowerPC support.

comment:2 Changed 5 years ago by bryancn

Thanks

I successfully installed the previous build of mysql56-server yesterday…

Seems like this might a regression of a mysql bug that has been fixed at least once before:

https://bugs.mysql.com/bug.php?id=72539

I'll try reporting it.

comment:3 Changed 5 years ago by khepler

Cc: khepler added

comment:4 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

The PowerPC build problem had been reported at https://bugs.mysql.com/bug.php?id=78687 a few years ago (they were most recently awaiting someone to try again with the latest releases; I left a comment that the error is still observed for 5.6.47, but I don't seem to be able to reopen the ticket). Note that as of 2018-10-19, MySQL considers version 5.6 to be unsupported on macOS.

I would be curious if trying a more recent compiler helps.

comment:5 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:6 Changed 4 years ago by kencu (Ken)

On Tiger, I currently have these as the latest installed versions:

 mysql55 @5.5.62_3 (active) platform='darwin 8' archs='ppc' date='2019-10-10T00:13:47-0700'
 mysql56 @5.6.33_0 platform='darwin 8' archs='ppc' date='2016-09-22T18:12:27-0700'
 postgresql95 @9.5.22_0 (active) platform='darwin 8' archs='ppc' date='2020-05-24T18:36:10-0700'
 sqlite3 @3.32.0_0 (active) platform='darwin 8' archs='ppc' date='2020-05-24T14:48:37-0700'

It's been a long time since I tried something newer on Tiger, though.

I don't seem to have tried to install any of the big databases on Leopard PPC lately.

comment:7 Changed 4 years ago by kencu (Ken)

The libtool thing is because they hardcode /usr/bin/libtool -- it's a very easy fix for that <https://github.com/macports/macports-ports/commit/7e5b5898478da838a0f1373e48a650f9c06c0146> which I have done in some of the mysql/mariadb ports.

What system are we trying to build mysql on here? 10.6, or 10.5 PPC? 10.6 is likely doable. Let me run that.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 4 years ago by kencu (Ken)

10.6.8 was straightforward:

$ port -v installed mysql56
The following ports are currently installed:
  mysql56 @5.6.47_0 (active) platform='darwin 10' archs='x86_64' date='2020-06-07T23:22:42-0700'

most of the trouble came from clang-9.0 messing with the VERSION file.

so:

post-patch {
    move ${worksrcpath}/VERSION ${worksrcpath}/VERSION.txt
    move ${worksrcpath}/storage/ndb/VERSION ${worksrcpath}/storage/ndb/VERSION.txt

    reinplace "s|/usr/bin/libtool|libtool|g" \
            ${worksrcpath}/cmake/libutils.cmake
}

and one patchfile to fix up the name change from VERSION to VERSION.txt:

$ git diff --no-prefix cmake/mysql_version.cmake
diff --git cmake/mysql_version.cmake cmake/mysql_version.cmake
index 34ed6f4..89e238c 100644
--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -31,7 +31,7 @@ SET(DOT_FRM_VERSION "6")
 
 # Generate "something" to trigger cmake rerun when VERSION changes
 CONFIGURE_FILE(
-  ${CMAKE_SOURCE_DIR}/VERSION
+  ${CMAKE_SOURCE_DIR}/VERSION.txt
   ${CMAKE_BINARY_DIR}/VERSION.dep
 )
 
@@ -39,7 +39,7 @@ CONFIGURE_FILE(
 
 MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
  IF(NOT ${var})
-   FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
+   FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt str REGEX "^[ ]*${keyword}=")
    IF(str)
      STRING(REPLACE "${keyword}=" "" str ${str})
      STRING(REGEX REPLACE  "[ ].*" ""  str "${str}")

Looks like mysql56 is a no-maintainer port, so presumably nobody will complain if I go ahead and fix this.

Changed 4 years ago by kencu (Ken)

comment:9 Changed 4 years ago by bryancn

Just to clarify, you might not have picked up from the original ticket that I had 5.6.45 installed & running perfectly on Leopard PPC. It was the one step upgrade from 5.6.45 to 5.6.47 that killed it. From what I can see there were many changes from 5.6.45 to 5.6.46 (which there was no port for, I think) and few changes from 5.6.46 to 5.6.47.

comment:10 Changed 4 years ago by kencu (Ken)

In 44c085bfacc1d8163d7bcf57a3c499e0bef4ce1b/macports-ports (master):

mysql56: move VERSION files

there is a conflict with c++17, which
uses a header called version

see: #60400

comment:11 Changed 4 years ago by kencu (Ken)

OK. well there are the 10.6.8 etc fixes. mysql56 is dying soon it appears, but I'll see if I can build it for you on 10.5 next.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:12 Changed 4 years ago by kencu (Ken)

fixed. I'll send up a commit in a bit.

$ port -v installed mysql56
The following ports are currently installed:
  mysql56 @5.6.48_0 (active) platform='darwin 9' archs='ppc' date='2020-06-09T13:27:02-0700'

comment:13 Changed 4 years ago by kencu (Ken)

Owner: set to kencu
Resolution: fixed
Status: newclosed

In eb8cfe9ca653230a81bba06081930482412bc7ed/macports-ports (master):

mysql56: blacklist gcc 4.2 and ilk

gcc-4.2 failed the atomics requirements
to build this

closes: #60400

Note: See TracTickets for help on using tickets.