bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Make version 3.79.1 Linux Redhat 8.0


From: Jeff Burke
Subject: RE: Make version 3.79.1 Linux Redhat 8.0
Date: Wed, 30 Apr 2003 11:34:31 -0400

Paul,   
        Thanks in advance for your help. But I still believe it is and
issue or I may still have a misunderstanding of the .LIBPATTERNS use.

        If you forget that I even mentioned the linker in my previous
email.
When you run make in the manor that you mentioned below, using it only
as a 
prerequisite it fails in the same manor.

        I can reproduce like this if you rename a good library so it
looks like libWHATEVER.so.0.0 . Then setting the .LIBPATTERN
:=lib%.so.0.0 lib%.so lib.a . Provided the lib was a prerequisite before
it should still be. But if you run a make -p in the section of the
database where it expands the target all the libs are expanded except
for the one that was listed like this -lWHATEVER. 


PD> I don't believe it's legal to add "-llibfoo.so.0.0" to the link
line;
that is not how the linker works.  The -l option is supposed to take the
base library name ("foo") only, and it uses internal algorithms to find
the "best" one.
        
Paul, you are correct it was my mistake when typing the email. I did
only me to put "-lfoo" not "-llibfoo.so.0.0" thanks for pointing that
out.
        

Thanks again for all your help
Jeff

-----Original Message-----
From: Paul D. Smith [mailto:address@hidden 
Sent: Wednesday, April 30, 2003 10:50 AM
To: Jeff Burke
Cc: address@hidden
Subject: Re: Make version 3.79.1 Linux Redhat 8.0

%% "Jeff Burke" <address@hidden> writes:

  jb>         When setting the .LIBPATTERNS variable in my makefile.
  jb> .LIBPATTERNS :=lib%.so.0.0 lib%.so lib.a

  jb> Here is where the problem begins.  Any library I try to link in
  jb> with the -L${LIB_DIR} -l{libWHATEVER.so.0.0} it will find all the
  jb> lib%.so and lib%.a fine but any lib%so.0.0 in the {LIB_DIR} path
  jb> it will not find at all. I also tried adding a vpath for
  jb> %.so.0.0 to the ${LIB_DIR} but that still doesn$,1ry(Bt work.

I think you are misunderstanding what .LIBPATTERNS does.  .LIBPATTERNS
has absolutely no impact on how the linker that make invokes behaves.
Make doesn't even know that any given command it runs is a "linker"; it
can in no way influence this.  Whatever arguments you have on your link
line are what the linker uses.

.LIBPATTERNS is _only_ used when a -lLIB appears on a prerequisite list,
like this:

  foo: foo.o -lbar

In this case make has to look for the library to see if it's updated
before it knows whether to rebuild "foo".  _That_ lookup is when
.LIBPATTERNS comes into play, not during the actual link.


I don't believe it's legal to add "-llibfoo.so.0.0" to the link line;
that is not how the linker works.  The -l option is supposed to take the
base library name ("foo") only, and it uses internal algorithms to find
the "best" one.

If you want to fully specify a library then you need to write out the
full pathname to the library, as you've done.

See the manual for your linker to determine if you have other options:
this is not really a make question.

-- 
------------------------------------------------------------------------
-------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad
Scientist
 
--------------------------------------------------------

 
This email message and any files transmitted with it contain confidential 
information intended only for the person(s) to whom this email message is 
addressed.  If you have received this email message in error, please notify the 
sender immediately by telephone or email and destroy the original message 
without making a copy.  Thank you. 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]