I attempted to compile 7.4.3 with enable-thread-safety but it fails and
says it's not supported. My configure command was:
../configure --enable-thread-safety
and the result:
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
configure: error:
Cannot enable threads on your platform.
Please report your platform threading info to the PostgreSQL mailing
lists
so it can be added to the next release. Report all compile flags, link
flags,
functions, or libraries required for threading support.
See the comment at the top of src/port/thread.c for more information.
This is on OS X 10.3.4 with the latest developer tools. Am I doing
something wrong, or should this be reported as a bug?
Thanks,
----
Aaron Burghardt ab****@mac.com
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html 10 1544
on 6/26/04 11:21 AM, ab****@mac.com purportedly said: I attempted to compile 7.4.3 with enable-thread-safety but it fails and says it's not supported. My configure command was:
./configure --enable-thread-safety
This is what I did for 10.3.4/7.4.2:
1. Enabled thread support in the platform template: src/template/darwin (see
src/tools/thread/README for info)
2. Configured/compiled
3. Ran the thread_test program that was created by compile (in
src/tools/thread)
4. Followed any recommendations output by the program
5. Re-configured/compiled
Everything was fine.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Thanks, that worked!
----
Aaron Burghardt ab****@mac.com
On Jun 26, 2004, at 4:01 PM, Keary Suska wrote: on 6/26/04 11:21 AM, ab****@mac.com purportedly said:
I attempted to compile 7.4.3 with enable-thread-safety but it fails and says it's not supported. My configure command was:
./configure --enable-thread-safety
This is what I did for 10.3.4/7.4.2:
1. Enabled thread support in the platform template: src/template/darwin (see src/tools/thread/README for info)
2. Configured/compiled
3. Ran the thread_test program that was created by compile (in src/tools/thread)
4. Followed any recommendations output by the program
5. Re-configured/compiled
Everything was fine.
Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet"
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org
On 6/26/04 3:01 PM, "Keary Suska" <hi********@pcisys.net> wrote: I attempted to compile 7.4.3 with enable-thread-safety but it fails and says it's not supported. My configure command was:
./configure --enable-thread-safety
This is what I did for 10.3.4/7.4.2:
1. Enabled thread support in the platform template: src/template/darwin (see src/tools/thread/README for info)
2. Configured/compiled
3. Ran the thread_test program that was created by compile (in src/tools/thread)
4. Followed any recommendations output by the program
5. Re-configured/compiled
Everything was fine.
You shouldn't have to mess with template/darwin. Back post 7.4.2 I went
through a number of iterations with the developers on this and it was
working out of the box. They were in the process of rewriting the threads
detection and configuration to be more clean and reliable.
I just tried it from the CVS source and it worked fine, even after a 'make
clean'. However, when I download 7.4.3 and try it, I get the same error as
you. The darwin template is identical between the two. I would have
thought all those code changes would have been incorporated in 7.4.3.
I think this requires some more investigation. Mac OS X 10.3.x should be
working off the bat.
Wes
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org we****@syntegra.com wrote: On 6/26/04 3:01 PM, "Keary Suska" <hi********@pcisys.net> wrote:
I attempted to compile 7.4.3 with enable-thread-safety but it fails and says it's not supported. My configure command was:
./configure --enable-thread-safety
This is what I did for 10.3.4/7.4.2:
1. Enabled thread support in the platform template: src/template/darwin (see src/tools/thread/README for info)
2. Configured/compiled
3. Ran the thread_test program that was created by compile (in src/tools/thread)
4. Followed any recommendations output by the program
5. Re-configured/compiled
Everything was fine.
You shouldn't have to mess with template/darwin. Back post 7.4.2 I went through a number of iterations with the developers on this and it was working out of the box. They were in the process of rewriting the threads detection and configuration to be more clean and reliable.
I just tried it from the CVS source and it worked fine, even after a 'make clean'. However, when I download 7.4.3 and try it, I get the same error as you. The darwin template is identical between the two. I would have thought all those code changes would have been incorporated in 7.4.3.
I think this requires some more investigation. Mac OS X 10.3.x should be working off the bat.
The thread testing in 7.5 is dramatically different from 7.4 and can't
be backpatched. What should I add to template/darwin for 7.4.4?
--
Bruce Momjian | http://candle.pha.pa.us pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
On Jul 6, 2004, at 12:06 AM, Bruce Momjian wrote: we****@syntegra.com wrote: On 6/26/04 3:01 PM, "Keary Suska" <hi********@pcisys.net> wrote:
I attempted to compile 7.4.3 with enable-thread-safety but it fails and says it's not supported. My configure command was:
./configure --enable-thread-safety
This is what I did for 10.3.4/7.4.2:
1. Enabled thread support in the platform template: src/template/darwin (see src/tools/thread/README for info)
2. Configured/compiled
3. Ran the thread_test program that was created by compile (in src/tools/thread)
4. Followed any recommendations output by the program
5. Re-configured/compiled
Everything was fine.
You shouldn't have to mess with template/darwin. Back post 7.4.2 I went through a number of iterations with the developers on this and it was working out of the box. They were in the process of rewriting the threads detection and configuration to be more clean and reliable.
I just tried it from the CVS source and it worked fine, even after a 'make clean'. However, when I download 7.4.3 and try it, I get the same error as you. The darwin template is identical between the two. I would have thought all those code changes would have been incorporated in 7.4.3.
I think this requires some more investigation. Mac OS X 10.3.x should be working off the bat.
The thread testing in 7.5 is dramatically different from 7.4 and can't be backpatched. What should I add to template/darwin for 7.4.4?
I added these two lines:
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=no
But, is it a mistake to have these defined when thread-safety is not
enabled?
----
Aaron Burghardt ab****@mac.com
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
On 7/5/04 11:06 PM, "Bruce Momjian" <pg***@candle.pha.pa.us> wrote: The thread testing in 7.5 is dramatically different from 7.4 and can't be backpatched. What should I add to template/darwin for 7.4.4?
I added these two lines:
THREAD_SUPPORT=yes NEED_REENTRANT_FUNCS=no
I don't think this is safe. What I've been using since 7.4.1/Mac OS X 10.3
is:
# Apple's cpp-precomp seems a tad broken, so don't use it
# (Note: on OS X before 10.2, you might need -traditional-cpp instead)
CC="$CC -no-cpp-precomp"
# Select appropriate semaphore support
USE_NAMED_POSIX_SEMAPHORES=1
# tools/thread/thread_test must be run
THREAD_SUPPORT=yes
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"
NEED_REENTRANT_FUNCS=yes
It appears with OS X 10.3.4, the THREAD_LIBS="-lpthread" is no longer
necessary (or is it due to PostgreSQL 7.3.4?). Previously it would not
build without this. With 7.3.4 and OS X 10.3.4, it will build with or
without it. I think -lpthread was required with OS X 10.2 (Jaguar).
I don't recall why -D_POSIX_PTHREAD_SEMANTICS was needed.
If I run thread_test many times, I get inconsistent results. I get both:
All your non-*_r functions are thread-safe.
Add this to your template/$port file:
NEED_REENTRANT_FUNCS=no
and:
Your gethostbyname() is _not_ thread-safe
Not all non-*_r functions are thread-safe.
Add this to your template/$port file:
NEED_REENTRANT_FUNCS=yes
Thus, to be safe I believe 'NEED_REENTRANT_FUNCS=yes' should be specified.
If I remember right from earlier discussions, the '-D_REENTRANT' *is*
required to insure errno is handled properly in a threaded environment.
See also the thread 'thread_test.c problems' back in of April. This was the
last entry from you on the subject:
OK, CVS is ready. I unconditionally defined:
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
for all ports. It can't hurt if they are not supported, but it makes our job easier for porting. It allowed me to remove almost all the port-specific thread stuff. The other tests are done by configure and thread_test.
Should fix Darwin compile and other platforms without mucking with the thread detection code.
Wes
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
OK, I have removed the changes I just added to allow threads for 7.4.X
on OSX. This stuff had to be dealt with before 7.4 final, and I don't
want to play with it at this point. 7.5 thread testing is automatic so
people will have to wait for that.
--------------------------------------------------------------------------- we****@syntegra.com wrote: On 7/5/04 11:06 PM, "Bruce Momjian" <pg***@candle.pha.pa.us> wrote:
The thread testing in 7.5 is dramatically different from 7.4 and can't be backpatched. What should I add to template/darwin for 7.4.4?
I added these two lines:
THREAD_SUPPORT=yes NEED_REENTRANT_FUNCS=no
I don't think this is safe. What I've been using since 7.4.1/Mac OS X 10.3 is:
# Apple's cpp-precomp seems a tad broken, so don't use it # (Note: on OS X before 10.2, you might need -traditional-cpp instead) CC="$CC -no-cpp-precomp"
# Select appropriate semaphore support USE_NAMED_POSIX_SEMAPHORES=1
# tools/thread/thread_test must be run THREAD_SUPPORT=yes THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" THREAD_LIBS="-lpthread"
NEED_REENTRANT_FUNCS=yes
It appears with OS X 10.3.4, the THREAD_LIBS="-lpthread" is no longer necessary (or is it due to PostgreSQL 7.3.4?). Previously it would not build without this. With 7.3.4 and OS X 10.3.4, it will build with or without it. I think -lpthread was required with OS X 10.2 (Jaguar).
I don't recall why -D_POSIX_PTHREAD_SEMANTICS was needed.
If I run thread_test many times, I get inconsistent results. I get both:
All your non-*_r functions are thread-safe. Add this to your template/$port file:
NEED_REENTRANT_FUNCS=no
and:
Your gethostbyname() is _not_ thread-safe Not all non-*_r functions are thread-safe. Add this to your template/$port file:
NEED_REENTRANT_FUNCS=yes
Thus, to be safe I believe 'NEED_REENTRANT_FUNCS=yes' should be specified. If I remember right from earlier discussions, the '-D_REENTRANT' *is* required to insure errno is handled properly in a threaded environment.
See also the thread 'thread_test.c problems' back in of April. This was the last entry from you on the subject:
OK, CVS is ready. I unconditionally defined:
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
for all ports. It can't hurt if they are not supported, but it makes our job easier for porting. It allowed me to remove almost all the port-specific thread stuff. The other tests are done by configure and thread_test.
Should fix Darwin compile and other platforms without mucking with the thread detection code.
Wes
--
Bruce Momjian | http://candle.pha.pa.us pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
On 7/8/04 11:28 AM, "Bruce Momjian" <pg***@candle.pha.pa.us> wrote: OK, I have removed the changes I just added to allow threads for 7.4.X on OSX. This stuff had to be dealt with before 7.4 final, and I don't want to play with it at this point. 7.5 thread testing is automatic so people will have to wait for that.
Just as a note to anyone searching the archives...
# tools/thread/thread_test must be run
THREAD_SUPPORT=yes
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"
NEED_REENTRANT_FUNCS=yes
works on both OS X 10.2 and 10.3
Wes
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings we****@syntegra.com wrote: On 7/8/04 11:28 AM, "Bruce Momjian" <pg***@candle.pha.pa.us> wrote:
OK, I have removed the changes I just added to allow threads for 7.4.X on OSX. This stuff had to be dealt with before 7.4 final, and I don't want to play with it at this point. 7.5 thread testing is automatic so people will have to wait for that.
Just as a note to anyone searching the archives...
# tools/thread/thread_test must be run THREAD_SUPPORT=yes THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" THREAD_LIBS="-lpthread"
NEED_REENTRANT_FUNCS=yes
works on both OS X 10.2 and 10.3
OK, I put this back in for 7.4.X since you tested to OSX versions, which
helps me think it is reliable. Thanks.
--
Bruce Momjian | http://candle.pha.pa.us pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
On Thu, 8 Jul 2004 14:25:48 -0400 (EDT), Bruce Momjian
<pg***@candle.pha.pa.us> wrote: works on both OS X 10.2 and 10.3
OK, I put this back in for 7.4.X since you tested to OSX versions, which helps me think it is reliable. Thanks.
I can confirm this as well, and I'll be including these changes in the
next release of the PostgreSQL packages for Fink on Mac OS X.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John Harrison |
last post by:
Where can I find information on exception safety in the STL? I.e. which
methods on which types offer what level of exception safety.
Josuttis has a useful list of classes and methods but he fails...
|
by: Steve Jorgensen |
last post by:
I frequently find myself wanting to use class abstraction in VB/VBA code, and
frankly, with the tacked-on class support in VB/VBA, there are some problems
with trying to do that and have any...
|
by: Dave |
last post by:
Hello all,
I am creating a linked list implementation which will be used in a
number of contexts. As a result, I am defining its value node as type
(void *). I hope to pass something in to its...
|
by: Jonathan Burd |
last post by:
Greetings everyone,
Here is a random string generator I wrote for an application
and I'm wondering about the thread-safety of this function.
I was told using static and global variables cause...
|
by: Alexander Fleck |
last post by:
Hi,
I' ve to make a software module thread safe.
I know how to realize that and what' re the main topics of thread safety.
But I don' t know how thread safety can be tested. I read about a test...
|
by: Howard Swope |
last post by:
Could someone help explain thread safety issues in the System.Collections
classes? The documentation states:...
|
by: The Crow |
last post by:
for example i have static readonly SqlParameter and i want to clone them at
runtime. as clone operation will not write to SqlParameter object, just
reading, should i lock that object during read...
|
by: aarklon |
last post by:
In the article http://en.wikipedia.org/wiki/Type_safety
it is written as
The archetypal type-unsafe language is C because (for example) it is
possible for an integer to be viewed as a function...
|
by: Warren Sirota |
last post by:
Hi,
I've got a method that I want to execute in a multithreaded environment
(it's a specialized spider. I want to run a whole bunch of copies at low
priority as a service). It works well running...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |