Opened 6 years ago
Closed 6 years ago
#58271 closed defect (fixed)
mariadb @5.5.63: malformed object (unknown load command 2)
Reported by: | kencu (Ken) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | snowleopard leopard tiger | Cc: | |
Port: | mariadb |
Description
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.
Change History (4)
comment:1 Changed 6 years ago by michaelld (Michael Dickens)
comment:2 Changed 6 years ago by kencu (Ken)
I should put up a full log. This was on 10.6.8 building w clang 5.0.
Can’t seem to spec the libtool.
comment:3 Changed 6 years ago by michaelld (Michael Dickens)
It's on my queue to try building MariaDB X.Y on my various build computers & various OSX & see what happens. Try to fix obvious issues, hopefully via simple & known code such as what you provided here.
comment:4 Changed 6 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Hmmm ... so is this just on PPC, or is the same on older OSX Intel too?