Minor problem with Makefile.shlib

Started by Thomas Hallgrenabout 21 years ago13 messages
#1Thomas Hallgren
thhal@mailblocks.com

I have a minor issue with Makefile.shlib. Compiling with win32 it spits
out these warnings (the same is true for Cygwin)

Makefile.shlib:327: warning: overriding commands for target `libpljava.a'
Makefile.shlib:262: warning: ignoring old commands for target
`libpljava.a'

As it turns out, the rule to make the lib$(NAME).a actually has commands
defined in multiple places when Cygwin or win32 is used. In global scope
we find the following at line 260:

lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
$(LINK.static) $@ $^
else
$(LINK.static) $@ `$(LORDER) $^ | tsort`
endif
$(RANLIB) $@

Then, further down and win32 specific on line 325:

$(shlib) lib$(NAME).a: $(OBJS)
ifndef DLL_DEFFILE
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def
$(OBJS)
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def
--output-lib lib$(NAME).a
else
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE)
--output-lib lib$(NAME).a
endif

endif # PORTNAME == win32

As I said, it's is no big issue since it just results in two warnings.

Regards,
Thomas Hallgren

#2Andrew Dunstan
andrew@dunslane.net
In reply to: Thomas Hallgren (#1)
Re: Minor problem with Makefile.shlib

I submitted a patch to fix this on October 21st, but it has not been
applied (in common with several other cleanup patches I sent in about a
week ago).

cheers

andrew

Thomas Hallgren wrote:

Show quoted text

I have a minor issue with Makefile.shlib. Compiling with win32 it
spits out these warnings (the same is true for Cygwin)

Makefile.shlib:327: warning: overriding commands for target
`libpljava.a'
Makefile.shlib:262: warning: ignoring old commands for target
`libpljava.a'

As it turns out, the rule to make the lib$(NAME).a actually has
commands defined in multiple places when Cygwin or win32 is used. In
global scope we find the following at line 260:

lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
$(LINK.static) $@ $^
else
$(LINK.static) $@ `$(LORDER) $^ | tsort`
endif
$(RANLIB) $@

Then, further down and win32 specific on line 325:

$(shlib) lib$(NAME).a: $(OBJS)
ifndef DLL_DEFFILE
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def
$(NAME).def $(OBJS)
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def
$(NAME).def --output-lib lib$(NAME).a
else
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def
$(DLL_DEFFILE) --output-lib lib$(NAME).a
endif

endif # PORTNAME == win32

As I said, it's is no big issue since it just results in two warnings.

Regards,
Thomas Hallgren

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#2)
Re: Minor problem with Makefile.shlib

Andrew Dunstan <andrew@dunslane.net> writes:

I submitted a patch to fix this on October 21st, but it has not been
applied (in common with several other cleanup patches I sent in about a
week ago).

Bruce got horribly backlogged recently and didn't get any patches in to
speak of. Since he's in California this week, I'm going to try to pick
up the slack so we can still push out beta5 in the next day or so.

However, I don't seem to have anything from you on that date in my
inbox; could you send it to me off-list?

regards, tom lane

#4Thomas Hallgren
thhal@mailblocks.com
In reply to: Tom Lane (#3)
Re: Minor problem with Makefile.shlib

Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

I submitted a patch to fix this on October 21st, but it has not been
applied (in common with several other cleanup patches I sent in about a
week ago).

Bruce got horribly backlogged recently and didn't get any patches in to
speak of. Since he's in California this week, I'm going to try to pick
up the slack so we can still push out beta5 in the next day or so.

However, I don't seem to have anything from you on that date in my
inbox; could you send it to me off-list?

regards, tom lane

Something that Fabien Coelho fixed recently broke tonight. I can no
longer compile PL/Java on win32 using pgxs since the directory
"pgxs/src/include/port/win32/*" is missing (again).

Regards,
Thomas Hallgren

#5Thomas Hallgren
thhal@mailblocks.com
In reply to: Thomas Hallgren (#4)
Re: Minor problem with Makefile.shlib

Thomas Hallgren wrote:

Something that Fabien Coelho fixed recently broke tonight. I can no
longer compile PL/Java on win32 using pgxs since the directory
"pgxs/src/include/port/win32/*" is missing (again).

And in addition to that, the libpostgresql.a is also missing.

Regards,
Thomas Hallgren

#6Fabien COELHO
coelho@cri.ensmp.fr
In reply to: Thomas Hallgren (#4)
Re: Minor problem with Makefile.shlib

Dear Thomas,

Something that Fabien Coelho fixed recently broke tonight. I can no
longer compile PL/Java on win32 using pgxs since the directory
"pgxs/src/include/port/win32/*" is missing (again).

AFAICS, the patch is in the queue waiting for a review.

--
Fabien Coelho - coelho@cri.ensmp.fr

#7Thomas Hallgren
thhal@mailblocks.com
In reply to: Fabien COELHO (#6)
Re: Minor problem with Makefile.shlib

Fabien COELHO wrote:

Dear Thomas,

Something that Fabien Coelho fixed recently broke tonight. I can no
longer compile PL/Java on win32 using pgxs since the directory
"pgxs/src/include/port/win32/*" is missing (again).

AFAICS, the patch is in the queue waiting for a review.

Well, the CVS HEAD did work as if it indeed had been applied until
yesterday evening. I'm quite sure of that since I took a new snapshot
yesterday and created a brand new installation. PL/Java compiled fine on
win32 (aside from the warnings I mentioned at the beginning of this thread).

Regards,
Thomas Hallgren

#8Fabien COELHO
coelho@cri.ensmp.fr
In reply to: Thomas Hallgren (#1)
Re: Minor problem with Makefile.shlib

AFAICS, the patch is in the queue waiting for a review.

Well, the CVS HEAD did work as if it indeed had been applied until
yesterday evening. I'm quite sure of that since I took a new snapshot
yesterday and created a brand new installation. PL/Java compiled fine on
win32 (aside from the warnings I mentioned at the beginning of this thread).

I guess the magic is explained because you installed *over* the previous
test install you did to check my patch? So the header files were there
from this previous install.

--
Fabien Coelho - coelho@cri.ensmp.fr

#9Thomas Hallgren
thhal@mailblocks.com
In reply to: Fabien COELHO (#8)
Re: Minor problem with Makefile.shlib

Fabien COELHO wrote:

I guess the magic is explained because you installed *over* the previous
test install you did to check my patch? So the header files were there
from this previous install.

Nope. I removed my previous installation. It's easy enough to check if
CVS have some way to check out a snapshot based on a timestamp. Does it?
If so, tell me and I'll try it.

- thomas

#10Fabien COELHO
coelho@cri.ensmp.fr
In reply to: Thomas Hallgren (#1)
Re: Minor problem with Makefile.shlib

I guess the magic is explained because you installed *over* the previous
test install you did to check my patch? So the header files were there
from this previous install.

Nope. I removed my previous installation. It's easy enough to check if
CVS have some way to check out a snapshot based on a timestamp. Does it?
If so, tell me and I'll try it.

Do not bother. Let it be magic and wait for the patch to be applied;-)

--
Fabien Coelho - coelho@cri.ensmp.fr

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thomas Hallgren (#1)
Re: Minor problem with Makefile.shlib

Thomas Hallgren <thhal@mailblocks.com> writes:

Nope. I removed my previous installation. It's easy enough to check if
CVS have some way to check out a snapshot based on a timestamp. Does it?

Yes, -D I think. See the manual. (Note this is "sticky", so you
probably want to do it in a scratch checkout rather than overwriting
your regular tree.)

regards, tom lane

#12Thomas Hallgren
thhal@mailblocks.com
In reply to: Tom Lane (#11)
Re: Minor problem with Makefile.shlib

Tom,

Yes, -D I think. See the manual. (Note this is "sticky", so you
probably want to do it in a scratch checkout rather than overwriting
your regular tree.)

Something lingered allright, but not in the PostgreSQL installation that
I removed. Sigh...

Anyway, the patch that was applied tonight removes the warnings which is
fine, but the patch submitted by Fabien is more important since it
actually enables me to build. I would be very greatful if that patch
could make it before release of beta5.

Thanks,
Thomas Hallgren

#13Reini Urban
rurban@x-ray.at
In reply to: Thomas Hallgren (#1)
Re: Minor problem with Makefile.shlib

Thomas Hallgren schrieb:

I have a minor issue with Makefile.shlib. Compiling with win32 it spits
out these warnings (the same is true for Cygwin)

Makefile.shlib:327: warning: overriding commands for target `libpljava.a'
Makefile.shlib:262: warning: ignoring old commands for target
`libpljava.a'

As it turns out, the rule to make the lib$(NAME).a actually has commands
defined in multiple places when Cygwin or win32 is used. In global scope
we find the following at line 260:

lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
$(LINK.static) $@ $^
else
$(LINK.static) $@ `$(LORDER) $^ | tsort`
endif
$(RANLIB) $@

Then, further down and win32 specific on line 325:

$(shlib) lib$(NAME).a: $(OBJS)

^^^^^^^^^^^^^

This is wrong. Those static import libs should be called
lib$(NAME).dll.a and are a completely different beast than the pure
static lib from above. But it will only bite when ever a module wants
both, static AND shared libs.

ifndef DLL_DEFFILE
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def
$(OBJS)
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def
--output-lib lib$(NAME).a
else
$(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib)
$(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def
$(DLL_DEFFILE) --output-lib lib$(NAME).a
endif

endif # PORTNAME == win32

As I said, it's is no big issue since it just results in two warnings.

--
Man is by nature a political animal. (Aristotle, Politics)