[MacPorts] #58271: mariadb @5.5.63: malformed object (unknown load command 2)

MacPorts noreply at macports.org
Fri Mar 29 20:16:41 UTC 2019


#58271: mariadb @5.5.63: malformed object (unknown load command 2)
---------------------------------------+-----------------------
 Reporter:  kencu                      |      Owner:  michaelld
     Type:  defect                     |     Status:  assigned
 Priority:  Normal                     |  Milestone:
Component:  ports                      |    Version:
 Keywords:  snowleopard leopard tiger  |       Port:  mariadb
---------------------------------------+-----------------------
 building mariadb with newer compilers on older systems leads to objects
 that the built-in libtool can't handle:

 {{{
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/libmysql
 && /usr/bin/libtool -static -o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/libmysql/libmysqlclient.a
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/libmysql/libclientlib.a
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/dbug/libdbug.a
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/strings/libstrings.a
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/vio/libvio.a
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/mysys/libmysys.a
 /usr/bin/libtool: object:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/libmysql/libclientlib.a(libmysql.c.o)
 malformed object (unknown load command 2)
 /usr/bin/libtool: object:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/strings/libstrings.a
 (ctype-big5.c.o) malformed object (unknown load command 2)
 [ 57%] Built target libmysql
 /usr/bin/libtool: object:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/build/mysys/libmysys.a(default.c.o)
 malformed object (unknown load command 2)
 /usr/bin/make -f sql/CMakeFiles/sql.dir/build.make
 sql/CMakeFiles/sql.dir/depend
 make[2]: *** [libmysql/libmysqlclient.a] Error 1
 }}}
 We've seen this many times before, and usually the trick is to make CMAKE
 use the newer libtool from cctools, like this:
 {{{

 if {[vercmp $xcodeversion "6.0.0"] < 0} {
         depends_build-append port:cctools
         depends_run-append port:cctools
         depends_skip_archcheck-append cctools
         configure.args-append \
                 -DCMAKE_LIBTOOL=${prefix}/bin/libtool
 }
 }}}
 Unfortunately, for `mariadb` at least, CMAKE ignores this.

 A quick fix is to make a symlink to `/usr/bin/libtool` from
 `/opt/local/bin/libtool` but this is a hack (but worked).

 Perhaps using the cmake 1.1 PG might help, or maybe the `mariadb` build
 scripts need to be edited a bit to allow you to pass in the libtool you
 want to use.

-- 
Ticket URL: <https://trac.macports.org/ticket/58271>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list