Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: How to build thread-safe postgresql 8.x on mingw?




At 3/6/2006 04:07 PM, Matt England wrote:
For what it's worth, I built <http://sources.redhat.com/pthreads-win32/> and put the corresponding headers in /mingw/include and the libs in /mingw/lib.

...and the postgresql 8.1.3 ./configure --enable-thread-safety now works, and I'm now 5-10 minutes into the make process...and I have my fingers crossed.

So I spoke too quickly. My postgresql build broke with "pthreads" link-time errors. Details below.

I'm still investigating. I'd really like to find a mingw/msys "native" pthreads gizmo. Not sure how I get/build that stuff, looking for pointers.

-Matt

$ make
[...]
dlltool --export-all --output-def ecpg.def execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o path.o exec.o snprintf.o dllwrap -o libecpg.dll --dllname libecpg.dll --def ecpg.def execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o path.o exec.o snprintf.o -L../pgtypeslib -L../../../../src/interfaces/libpq -L../../../../src/port -lpgtypes -lpq -lm -lshfolder connect.o:connect.c:(.text+0x15): undefined reference to `_imp__pthread_key_create' connect.o:connect.c:(.text+0x7a): undefined reference to `_imp__pthread_getspecific' connect.o:connect.c:(.text+0xf1): undefined reference to `_imp__pthread_getspecific' connect.o:connect.c:(.text+0x11f): undefined reference to `_imp__pthread_mutex_lock' connect.o:connect.c:(.text+0x135): undefined reference to `_imp__pthread_mutex_unlock' connect.o:connect.c:(.text+0x1da): undefined reference to `_imp__pthread_getspecific' connect.o:connect.c:(.text+0x269): undefined reference to `_imp__pthread_setspecific' connect.o:connect.c:(.text+0x42e): undefined reference to `_imp__pthread_setspecific' connect.o:connect.c:(.text+0x735): undefined reference to `_imp__pthread_mutex_lock'
connect.o:connect.c:(.text+0x77f): undefined reference to `_imp__pthread_once'
connect.o:connect.c:(.text+0x796): undefined reference to `_imp__pthread_setspecific' connect.o:connect.c:(.text+0x872): undefined reference to `_imp__pthread_mutex_unlock' connect.o:connect.c:(.text+0x922): undefined reference to `_imp__pthread_mutex_lock' connect.o:connect.c:(.text+0x9b0): undefined reference to `_imp__pthread_mutex_unlock' connect.o:connect.c:(.text+0xe2e): undefined reference to `_imp__pthread_mutex_lock' connect.o:connect.c:(.text+0xe67): undefined reference to `_imp__pthread_mutex_unlock' connect.o:connect.c:(.text+0xea5): undefined reference to `_imp__pthread_mutex_unlock'
misc.o:misc.c:(.text+0x68): undefined reference to `_imp__pthread_key_create'
misc.o:misc.c:(.text+0x89): undefined reference to `_imp__pthread_once'
misc.o:misc.c:(.text+0x97): undefined reference to `_imp__pthread_getspecific'
misc.o:misc.c:(.text+0xcd): undefined reference to `_imp__pthread_setspecific'
misc.o:misc.c:(.text+0x1e8): undefined reference to `_imp__pthread_mutex_lock'
misc.o:misc.c:(.text+0x262): undefined reference to `_imp__pthread_mutex_unlock'
misc.o:misc.c:(.text+0x28b): undefined reference to `_imp__pthread_mutex_lock'
misc.o:misc.c:(.text+0x2ba): undefined reference to `_imp__pthread_mutex_unlock'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make[4]: *** [libecpg.a] Error 1
make[4]: Leaving directory `e:/data.online/data.cleversafe/svnwork/swdev-external-src/postgresql/dist/mingw/postgresql-8.1.3/src/interfaces/ecpg/ecpglib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `e:/data.online/data.cleversafe/svnwork/swdev-external-src/postgresql/dist/mingw/postgresql-8.1.3/src/interfaces/ecpg'
make[2]: *** [all] Error 2
make[2]: Leaving directory `e:/data.online/data.cleversafe/svnwork/swdev-external-src/postgresql/dist/mingw/postgresql-8.1.3/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `e:/data.online/data.cleversafe/svnwork/swdev-external-src/postgresql/dist/mingw/postgresql-8.1.3/src'
make: *** [all] Error 2

$



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group