Opened 12 years ago
Last modified 12 years ago
#34123 closed defect
libdbi-drivers incorrect compiler parameter on mysql fails to compile — at Initial Version
Reported by: | jrojas@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | clang | Cc: | clang |
Port: | libdbi-drivers |
Description
I was installing gnucash and tried to add mysql support, upgrading libdbi-drivers.
Default compile (+sqlite3 driver) works
mysql (+mysql5) fails because of -O20 parameter; it's for gcc, not clang.
My solution: After editing [Makefile] & [configure] on msql directory, removing the offending parameter ([-O20], I retried and compiled/installed fine. I think just removing the parameter from configure (cflags=..., profile=...) will do it.
Note: Postgress driver fails with same error. Others may too.
OSX 10.7, spanish, xcode 4.3.2
Detail of log (note wrong [-O20]):
sudo port install libdbi-drivers +mysql5 +sqlite3
... :info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_libdbi-drivers/libdbi-drivers/work/libdbi-drivers-0.8.3-1/drivers/sqlite3' :info:build if /bin/sh ../../libtool --tag=CC --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I/opt/local/include -I/opt/local/include -I/opt/local/include -O20 -DNO_MATH_INLINES -fsigned-char -MT dbd_sqlite3.lo -MD -MP -MF ".deps/dbd_sqlite3.Tpo" -c -o dbd_sqlite3.lo dbd_sqlite3.c; \ :info:build then mv -f ".deps/dbd_sqlite3.Tpo" ".deps/dbd_sqlite3.Plo"; else rm -f ".deps/dbd_sqlite3.Tpo"; exit 1; fi :info:build /usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I/opt/local/include -I/opt/local/include -I/opt/local/include -O20 -DNO_MATH_INLINES -fsigned-char -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c -fno-common -DPIC -o .libs/dbd_sqlite3.o :info:build error: invalid value '4' in '-O20' :info:build make[3]: * [dbd_sqlite3.lo] Error 1
Keep up the good work :)