Opened 12 years ago

Closed 12 years ago

#34123 closed defect (fixed)

libdbi-drivers: error: invalid value '4' in '-O20'

Reported by: jrojas@… Owned by: mtalexander (Mike Alexander)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: clang Cc:
Port: libdbi-drivers

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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''' -D__NO_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 -D__NO_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 :)

Change History (2)

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

Cc: clang removed
Description: modified (diff)
Keywords: libdbi removed
Owner: changed from macports-tickets@… to mta@…
Summary: libdbi-drivers incorrect compiler parameter on mysql fails to compilelibdbi-drivers: error: invalid value '4' in '-O20'

Same problem was reported for the libdbi port in #33354.

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.