Re: Re: [PATCHES] patch for minor Win32 makefile bug - Mailing list pgsql-ports
From | Jason Tishler |
---|---|
Subject | Re: Re: [PATCHES] patch for minor Win32 makefile bug |
Date | |
Msg-id | 20010403223851.A3119@dothill.com Whole thread Raw |
In response to | Re: Re: [PATCHES] patch for minor Win32 makefile bug (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: Re: [PATCHES] patch for minor Win32 makefile bug
Re: Re: [PATCHES] patch for minor Win32 makefile bug |
List | pgsql-ports |
Tom, On Tue, Apr 03, 2001 at 06:03:45PM -0400, Tom Lane wrote: > Hmm. It seems a little bit weird (no, a lot weird) to be referencing > -lpostgres for the client-side interface library builds. I can see that > the PL-language DLLs might need to reference -lpostgres during their > links, but I've got severe doubts that this is a good idea anyplace > else. You are correct. I just verified by using MS's dumpbin that none of the above DLLs except for plpgsql.dll actually import any symbols from libpostgres.a. Hence, linking the client-side interface libraries with libpostgres.a is superfluous. However, you missed a few regression test related DLLs. See below for details. > My thought is that Makefile.win ought to have > > DLLLIBS=-lcygipc -lcygwin -lcrypt -lkernel32 > > which is what will be used by Makefile.shlib to build the interfaces > libraries. I agreed with the above except that the -lcygwin and -lkernel32 are unnecessary. Cygwin's ld always supplies these options. This is true for both the Net and b20.1 releases. > Then in the makefiles for the PL directories we should write > > DLLLIBS:= -L$(top_builddir)/src/backend -lpostgres $(DLLLIBS) > > so that -lpostgres is added just for the links of those shlibs. I agree with the above too. > And finally backend/Makefile could use the Makefile.win definition as-is. I agree with the above too. Additionally, when Fred is ready with his NT service patch, then he can add the following to backend/Makefile: DLLLIBS:= $(DLLLIBS) -lpopt > Comments? If this seems plausible, could you test it? Yes, I have tested this on the Net release. Is someone else willing to test on b20.1 -- I'm not confident of my b20.1 setup. When I executed make check, I noticed that the following DLLs are also dependent on libpostgres.a: contrib/spi/autoinc.dll contrib/spi/refint.dll src/test/regress/regress.dll So I used the same change that you proposed for plpgsql.dll for these too. Did we miss any others? With the attached patch applied to my CVS working directory, I was able to build PostgreSQL without errors. When I run make check, I am getting consistent failures with horology. I don't believe that this is related to this build related patch. See attached for details. Am I correct? > BTW, I see that the prior version of backend/Makefile actually defined > DLLLIBS as > > DLLLIBS := -L/usr/local/lib -lcygipc -lcrypt -lcygwin -lkernel32 > > as compared to what Makefile.win offers (shorn of the backend): > > DLLLIBS=-lcygipc -lcygwin -lcrypt -lkernel32 > > Any comments on whether -L/usr/local/lib is appropriate here or not? We have already determined that the -L/usr/local/lib option is superfluous for both the Cygwin Net and b20.1 releases. See the following for details: http://www.postgresql.org/mhonarc/pgsql-ports/2001-03/msg00049.html > What about the ordering of these libraries, does that matter? I believe that -lcygipc and -lcrypt are independent of each other and that the -lcygwin and -lkernel32 are unnecessary, so no the order doesn't matter. Jason -- Jason Tishler Director, Software Engineering Phone: +1 (732) 264-8770 x235 Dot Hill Systems Corp. Fax: +1 (732) 264-8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
Attachment
pgsql-ports by date: