Re: Compile/Link Error for Postgres 8.1.0 on Solaris 8

Поиск
Список
Период
Сортировка
От Aly S.P Dharshi
Тема Re: Compile/Link Error for Postgres 8.1.0 on Solaris 8
Дата
Msg-id Pine.LNX.4.64.0512090815240.30494@edtnas67.telus.net
обсуждение исходный текст
Ответ на Re: Compile/Link Error for Postgres 8.1.0 on Solaris 8  ("Bhide, Rajan" <rbhide@starentnetworks.com>)
Список pgsql-novice
Why don't you just try out the version that is compiled for Solaris at
www.blastwave.org ? Secondly a slightly OT point, Studio 11 is available
for download from Sun's site for free try that.

Aly


On Fri, 9 Dec 2005, Bhide, Rajan wrote:

>man CC:
>    -mt       Compile and link for multithreaded code.
>               This option:
>               o Passes -D_REENTRANT to the preprocessor
>               o Passes -lthread in the correct order to ld
>               o Ensures that, for standard mode (the default
>                 mode), libthread is linked before libCrun
>               o Ensures that, for compability mode (-compat),
>                 libthread is linked before libC
>               The -mt option is required if the application or
>               libraries are multithreaded.
>               Warnings:
>               To ensure proper library linking order, you must
>               use this option, rather than -lthread, to link
>               with libthread.
>               If you are using POSIX threads, you must link with
>               the options -mt -lpthread.  The -mt option is
>               necessary because libC (compatibility mode) and
>               libCrun (standard mode) need libthread for a mul-
>               tithreaded application.
>               If you compile and link in separate steps and you
>               compile with -mt, you might get unexpected
>               results. If you compile one translation unit with
>               -mt, compile all units of the program with -mt.
>               If you are mixing parallel Fortran objects with
>               C++ objects, the link line must specify the -mt
>               flag.
>
>For portability reasons, I am using Posix threads.
>As pointed out by Alan, -D_REENTRANT is redundant which I will remove.
>
>>>What version of the Sun compilers are you using here?
>cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
>
>
>I got cc: Sun C 5.7 2005/01/07 (Studio 10) installed on other box,so
>would try this one with the options suggested.
>The updated configure params are as under.
>
>
>./configure --without-readline --enable-thread-safety
>CFLAGS='-xinline=%auto,MemoryContextSwitchTo -xcrossfile -mt'
>LDFLAGS='-lpthread' CC=/export/home/uxapps/workshop/SUNWspro/bin/cc
>
>The main reason to use -mt options was to build thread safe PQ Client
>Library.
>We use Postgres mostly on Sparc v240 system with Solaris 8 and above.
>The app demands very high performance and is very extensive db write
>kind of.
>As the latest Postgres version mentions about many performance
>enhancement, we wanted to try before migrating to it.
>I would be highly obliged if you guys have some performance figures or
>benchmark results for Solaris environment. Could you please send
>pointers to it.
>If you have some input specific to compilation that too would be of much
>help.
>
>Thanks,
>Rajan Bhide
>
>-----Original Message-----
>From: Alan Stange [mailto:stange@rentec.com]
>Sent: Friday, December 09, 2005 1:06 AM
>To: Tom Lane
>Cc: Bhide, Rajan; pgsql-novice@postgresql.org
>Subject: Re: [NOVICE] Compile/Link Error for Postgres 8.1.0 on Solaris 8
>
>
>Tom Lane wrote:
>> Alan Stange <stange@rentec.com> writes:
>>
>>> Bhide, Rajan wrote:
>>>
>>>> ./configure --without-readline --enable-thread-safety CFLAGS=-xO4
>>>> -D_REENTRANT -xipo -mt -lpthread
>>>> CC=/export/home/uxapps/workshop/SUNWspro/bin/cc
>>>>
>>
>>
>>> Given that you've enabled -xipo, and the error is related to ipo, I'd
>>> suggest dropping that option for now.
>>>
>>
>> Putting -lpthread into CFLAGS seems pretty foolish as well.  If you
>> needed to specify that explicitly (which you do not) it would belong
>> in LDFLAGS --- putting it in CFLAGS is pretty certain to screw up link
>
>> order and so on.  And what is -mt?
>>
>>             regards, tom lane
>>
>     -mt  Passes D_REENTRANT to preprocessor. Appends -lthread
>          after all other user-specified libraries on the command
>          line.  If you are doing your own multithread coding,
>          you must use this option in the compile and link steps.
>          To obtain faster execution, this option requires a mul-
>          tiprocessor system. On a single-processor system, the
>          resulting executable usually runs more slowly with this
>          option.
>
>
>"This email message and any attachments are confidential information of Starent Networks, Corp. The information
transmittedmay not be used to create or change any contractual obligations of Starent Networks, Corp.  Any review,
retransmission,dissemination or other use of, or taking of any action in reliance upon this e-mail and its attachments
bypersons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please
notifythe sender immediately -- by replying to this message or by sending an email to postmaster@starentnetworks.com --
anddestroy all copies of this message and any attachments without reading or disclosing their contents. Thank you." 
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend
>

--
Aly S.P Dharshi
aly.dharshi@telus.net

     "A good speech is like a good dress
      that's short enough to be interesting
      and long enough to cover the subject"

В списке pgsql-novice по дате отправления:

Предыдущее
От: Jeanne Louize Emygdio
Дата:
Сообщение: Re: PostGreSql+Conectiva 10+initdb - Installation problems
Следующее
От: "Walker, Jed S"
Дата:
Сообщение: Return void error in PG 8.1.0