Thread: Minor problem with Makefile.shlib

Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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
commandsfor 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



Re: Minor problem with Makefile.shlib

From
Andrew Dunstan
Date:
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:

> 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
>


Re: Minor problem with Makefile.shlib

From
Tom Lane
Date:
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


Re: Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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




Re: Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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



Re: Minor problem with Makefile.shlib

From
Fabien COELHO
Date:
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


Re: Minor problem with Makefile.shlib

From
Fabien COELHO
Date:
> >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


Re: Minor problem with Makefile.shlib

From
Reini Urban
Date:
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)


Re: Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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




Re: Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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




Re: Minor problem with Makefile.shlib

From
Fabien COELHO
Date:
> >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


Re: Minor problem with Makefile.shlib

From
Tom Lane
Date:
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


Re: Minor problem with Makefile.shlib

From
Thomas Hallgren
Date:
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