Thread: Can't compile psqlodbc on Solaris 8
When I try to compile psqlodbc on Solaris 8, it fails. I'm not sure what I'm doing wrong. gcc version 3.4.0 GNU libtool 1.4.2 GNU Make 3.80 solaris 8 linker on Solaris 8 sparc. configured with the options - --enable-shared --with-iodbc --with-odbcinst=/usr/local/etc errors look like this - source='environ.c' object='environ.lo' libtool=yes \ depfile='.deps/environ.Plo' tmpdepfile='.deps/environ.TPlo' \ depmode=gcc3 /bin/sh ./depcomp \ /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o environ.lo `test -f 'environ.c' || echo './'`environ.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c environ.c -MT environ.lo -MD -MP -MF .deps/environ.TPlo -fPIC -DPIC -o environ.lo environ.c:233: error: conflicting types for 'PGAPI_StmtError' pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here environ.c:233: error: conflicting types for 'PGAPI_StmtError' pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here environ.c:465: error: conflicting types for 'PGAPI_ConnectError' pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here environ.c:465: error: conflicting types for 'PGAPI_ConnectError' pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here environ.c:598: error: conflicting types for 'PGAPI_EnvError' pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here environ.c:598: error: conflicting types for 'PGAPI_EnvError' pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here environ.c:660: error: conflicting types for 'PGAPI_Error' pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here environ.c:660: error: conflicting types for 'PGAPI_Error' pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here gmake[1]: *** [environ.lo] Error 1 gmake[1]: Leaving directory `/tools/database/PostgreSQL/psqlodbc' gmake: *** [all] Error 2 Celeste Suliin Burris Systems Administrator Tacoma Economic Development Department Phone - 253-591-5093 Email - csburris@ci.tacoma.wa.us
--- "Celeste Suliin Burris" <csburris@ci.tacoma.wa.us> wrote: > When I try to compile psqlodbc on Solaris 8, it fails. I'm not sure > what I'm doing wrong. gcc version 3.4.0 GNU libtool 1.4.2 > GNU Make 3.80 > solaris 8 linker on Solaris 8 sparc. > > configured with the options - --enable-shared --with-iodbc > --with-odbcinst=/usr/local/etc > > errors look like this - > > source='environ.c' object='environ.lo' libtool=yes \ > depfile='.deps/environ.Plo' tmpdepfile='.deps/environ.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ /bin/sh ./libtool --mode=compile gcc > -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o environ.lo `test -f > 'environ.c' || echo './'`environ.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g > -O2 -c environ.c -MT environ.lo -MD -MP -MF .deps/environ.TPlo -fPIC -DPIC -o environ.lo > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > gmake[1]: *** [environ.lo] Error 1 > gmake[1]: Leaving directory `/tools/database/PostgreSQL/psqlodbc' > gmake: *** [all] Error 2 I'm relatively new to the PostgreSQL ODBC driver so take this for what it's worth... On Solaris 9 (SPARC) with a similar configuration, I received the same errors you did using iODBC 3.52.1. After seeing some of the same errors when compiling OpenLDAP (using iODBC), I switched to iODBC 3.51.2 and PostgreSQL ODBC compiled just fine. I haven't fully tested yet so please let us know how it goes! Regards, Michael Laws
--- "Celeste Suliin Burris" <csburris@ci.tacoma.wa.us> wrote: > When I try to compile psqlodbc on Solaris 8, it fails. I'm not sure what I'm doing wrong. > gcc version 3.4.0 > GNU libtool 1.4.2 > GNU Make 3.80 > solaris 8 linker on Solaris 8 sparc. > > configured with the options - --enable-shared --with-iodbc --with-odbcinst=/usr/local/etc > > errors look like this - > > source='environ.c' object='environ.lo' libtool=yes \ > depfile='.deps/environ.Plo' tmpdepfile='.deps/environ.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ > /bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o environ.lo `test -f 'environ.c' || echo './'`environ.c > gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c environ.c -MT environ.lo -MD -MP -MF .deps/environ.TPlo -fPIC -DPIC -o environ.lo > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > gmake[1]: *** [environ.lo] Error 1 > gmake[1]: Leaving directory `/tools/database/PostgreSQL/psqlodbc' > gmake: *** [all] Error 2 I'm relatively new to the PostgreSQL ODBC driver so take this for what it's worth... On Solaris 9 (SPARC) with a similar configuration, I received the same errors you did using iODBC 3.52.1. After seeing some of the same errors when compiling OpenLDAP (using iODBC), I switched to iODBC 3.51.2 and PostgreSQL ODBC compiled just fine. I haven't fully tested yet so please let us know how it goes! Regards, Michael Laws
--- "Celeste Suliin Burris" <csburris@ci.tacoma.wa.us> wrote: > When I try to compile psqlodbc on Solaris 8, it fails. I'm not sure > what I'm doing wrong. gcc version 3.4.0 GNU libtool 1.4.2 > GNU Make 3.80 > solaris 8 linker on Solaris 8 sparc. > > configured with the options - --enable-shared --with-iodbc > --with-odbcinst=/usr/local/etc > > errors look like this - > > source='environ.c' object='environ.lo' libtool=yes \ > depfile='.deps/environ.Plo' tmpdepfile='.deps/environ.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ /bin/sh ./libtool --mode=compile gcc > -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o environ.lo `test -f > 'environ.c' || echo './'`environ.c gcc -DHAVE_CONFIG_H -I. -I. -I. -g > -O2 -c environ.c -MT environ.lo -MD -MP -MF .deps/environ.TPlo -fPIC -DPIC -o environ.lo > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:233: error: conflicting types for 'PGAPI_StmtError' > pgapifunc.h:78: error: previous declaration of 'PGAPI_StmtError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:465: error: conflicting types for 'PGAPI_ConnectError' > pgapifunc.h:74: error: previous declaration of 'PGAPI_ConnectError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:598: error: conflicting types for 'PGAPI_EnvError' > pgapifunc.h:70: error: previous declaration of 'PGAPI_EnvError' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > environ.c:660: error: conflicting types for 'PGAPI_Error' > pgapifunc.h:65: error: previous declaration of 'PGAPI_Error' was here > gmake[1]: *** [environ.lo] Error 1 > gmake[1]: Leaving directory `/tools/database/PostgreSQL/psqlodbc' > gmake: *** [all] Error 2 I'm relatively new to the PostgreSQL ODBC driver so take this for what it's worth... On Solaris 9 (SPARC) with a similar configuration, I received the same errors you did using iODBC 3.52.1. After seeing some of the same errors when compiling OpenLDAP (using iODBC), I switched to iODBC 3.51.2 and PostgreSQL ODBC compiled just fine. I haven't fully tested yet so please let us know how it goes! Regards, Michael Laws