All of lore.kernel.org
 help / color / mirror / Atom feed
* Help with redundant RPATH /usr/lib
@ 2013-04-22 13:32 Lewis, Nick
  2013-04-22 13:51 ` Fabio Estevam
  2013-04-22 14:34 ` Richard Purdie
  0 siblings, 2 replies; 7+ messages in thread
From: Lewis, Nick @ 2013-04-22 13:32 UTC (permalink / raw)
  To: meta-freescale@yoctoproject.org

I have written a very basic recipe which inherits autotools but it is failing complaining of an rpath containing an unnecessary /usr/lib

Is someone able to assist me please with any pointers as to what may be causing this rpath issue and how to avoid it. Would the configure.ac or Makefile.in from the source give any clues?

--
Nick

The details of this company are as follows:
G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-22 13:32 Help with redundant RPATH /usr/lib Lewis, Nick
@ 2013-04-22 13:51 ` Fabio Estevam
  2013-04-22 14:34 ` Richard Purdie
  1 sibling, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2013-04-22 13:51 UTC (permalink / raw)
  To: Lewis, Nick; +Cc: meta-freescale@yoctoproject.org

Hi Nick,

On Mon, Apr 22, 2013 at 10:32 AM, Lewis, Nick <nick.lewis@usa.g4s.com> wrote:
> I have written a very basic recipe which inherits autotools but it is failing complaining of an rpath containing an unnecessary /usr/lib
>
> Is someone able to assist me please with any pointers as to what may be causing this rpath issue and how to avoid it. Would the configure.ac or Makefile.in from the source give any clues?
>
> --
> Nick
>
> The details of this company are as follows:
> G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

Sorry for bringing this topic again, but you are asking help in the
list and write:


> This communication may contain information which is confidential, personal and/or privileged.
>
> It is for the exclusive use of the intended recipient(s).

We do not know if each one of us are the 'intended recipients'.

> If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

...so we are not allowed to do anything with the content of your message.

> Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.
>
> Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

I don't think that every subscriber of this list is interested in
"seeking appropriate confirmation of its authenticity.".

So, again, please remove all of these. It does not make sense to post
it on public lists.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-22 13:32 Help with redundant RPATH /usr/lib Lewis, Nick
  2013-04-22 13:51 ` Fabio Estevam
@ 2013-04-22 14:34 ` Richard Purdie
  2013-04-22 15:48   ` Lewis, Nick
  2013-04-23 11:10   ` Lewis, Nick
  1 sibling, 2 replies; 7+ messages in thread
From: Richard Purdie @ 2013-04-22 14:34 UTC (permalink / raw)
  To: Lewis, Nick; +Cc: meta-freescale@yoctoproject.org

On Mon, 2013-04-22 at 14:32 +0100, Lewis, Nick wrote:
> I have written a very basic recipe which inherits autotools but it is
> failing complaining of an rpath containing an unnecessary /usr/lib
> 
> Is someone able to assist me please with any pointers as to what may
> be causing this rpath issue and how to avoid it. Would the
> configure.ac or Makefile.in from the source give any clues?

Did you write your own do_configure?

The most common reason for this occurring is our libtool macros not
being used. 

If that isn't the reason, its likely you're doing something custom to
the linking command in configure.ac or Makefile.am and breaking it.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-22 14:34 ` Richard Purdie
@ 2013-04-22 15:48   ` Lewis, Nick
  2013-04-23 11:10   ` Lewis, Nick
  1 sibling, 0 replies; 7+ messages in thread
From: Lewis, Nick @ 2013-04-22 15:48 UTC (permalink / raw)
  To: 'Richard Purdie'; +Cc: meta-freescale@yoctoproject.org

Richard

Thank you for your assistance

>Did you write your own do_configure?
This is my first recipe so I did what I guessed was the minimum necessary to get it up and running. The recipe only fetches the source and validates the license before the "inherit autotools" line

>The most common reason for this occurring is our libtool macros not being used.
>If that isn't the reason, its likely you're doing something custom to the linking command in configure.ac or Makefile.am and breaking it.
The recipe fetches 3rd party source which has pre-existing autotools configure.ac and Makefile.am files
Do I need to replace these?

http://code.google.com/p/xar/source/browse/branches/xar-1.5/configure.ac
http://code.google.com/p/xar/source/browse/branches/xar-1.5/Makefile.in


--
Nick

The details of this company are as follows:
G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-22 14:34 ` Richard Purdie
  2013-04-22 15:48   ` Lewis, Nick
@ 2013-04-23 11:10   ` Lewis, Nick
  2013-04-23 11:46     ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Lewis, Nick @ 2013-04-23 11:10 UTC (permalink / raw)
  To: 'Richard Purdie'; +Cc: meta-freescale@yoctoproject.org

>If that isn't the reason, its likely you're doing something custom to the linking command in configure.ac or Makefile.am and breaking it.

Richard

I have added a patch to the recipe that appears to fix the problem. Is this a reasonable approach to the issue?

$ cat sources/meta-nick/recipes-nick/xar/xar-1.5.2/xar-rpath.patch
--- a/src/Makefile.inc.in       2013-04-17 18:03:12.704735379 -0700
+++ b/src/Makefile.inc.in       2013-04-17 17:52:41.684668367 -0700
@@ -54,7 +54,11 @@
 @objroot@src/i% : @objroot@src/%.o $(LIBXAR)
        @mkdir -p $(@D)
 ifneq ($(words "" @RPATH@), 1)
+ ifeq (/usr/lib, $(LIBDIR))
+       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBXAR) @LIBS@
+ else
        $(CC) $(CFLAGS) -o $@ $< @RPATH@$(LIBDIR) $(LDFLAGS) $(LIBXAR) @LIBS@
+ endif
 else
        $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBXAR) @LIBS@
 endif


--
Nick

The details of this company are as follows:
G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-23 11:10   ` Lewis, Nick
@ 2013-04-23 11:46     ` Richard Purdie
  2013-04-23 13:13       ` Lewis, Nick
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-04-23 11:46 UTC (permalink / raw)
  To: Lewis, Nick; +Cc: meta-freescale@yoctoproject.org

On Tue, 2013-04-23 at 12:10 +0100, Lewis, Nick wrote:
> >If that isn't the reason, its likely you're doing something custom to the linking command in configure.ac or Makefile.am and breaking it.
> 
> Richard
> 
> I have added a patch to the recipe that appears to fix the problem. Is this a reasonable approach to the issue?
> 
> $ cat sources/meta-nick/recipes-nick/xar/xar-1.5.2/xar-rpath.patch
> --- a/src/Makefile.inc.in       2013-04-17 18:03:12.704735379 -0700
> +++ b/src/Makefile.inc.in       2013-04-17 17:52:41.684668367 -0700
> @@ -54,7 +54,11 @@
>  @objroot@src/i% : @objroot@src/%.o $(LIBXAR)
>         @mkdir -p $(@D)
>  ifneq ($(words "" @RPATH@), 1)
> + ifeq (/usr/lib, $(LIBDIR))
> +       $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBXAR) @LIBS@
> + else
>         $(CC) $(CFLAGS) -o $@ $< @RPATH@$(LIBDIR) $(LDFLAGS) $(LIBXAR) @LIBS@
> + endif
>  else
>         $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBXAR) @LIBS@
>  endif

Its certainly better, yes. libdir might not always equal /usr/lib of
course, in libtool it compared against the system search path list but I
think you've at least tracked down the cause of your problem.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Help with redundant RPATH /usr/lib
  2013-04-23 11:46     ` Richard Purdie
@ 2013-04-23 13:13       ` Lewis, Nick
  0 siblings, 0 replies; 7+ messages in thread
From: Lewis, Nick @ 2013-04-23 13:13 UTC (permalink / raw)
  To: 'Richard Purdie'; +Cc: meta-freescale@yoctoproject.org


>Its certainly better, yes. libdir might not always equal /usr/lib of course, in libtool it compared against the system search path list

So @RPATH@$(LIBDIR) is always wrong because if it is in libdir then it need not be on rpath?

Should it unconditionally be just:
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBXAR) @LIBS@

@RPATH@ is set for bsd and solaris in addition to linux. Do different rpath rules apply for these or can I look to upstream the removal of @RPATH@$(LIBDIR)

--
Nick


The details of this company are as follows:
G4S Technology Limited, Registered Office: Challenge House, International Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. 2382338.

This communication may contain information which is confidential, personal and/or privileged.

It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited.

Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them.

Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.

This e-mail has been scanned for all viruses by MessageLabs.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-23 13:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 13:32 Help with redundant RPATH /usr/lib Lewis, Nick
2013-04-22 13:51 ` Fabio Estevam
2013-04-22 14:34 ` Richard Purdie
2013-04-22 15:48   ` Lewis, Nick
2013-04-23 11:10   ` Lewis, Nick
2013-04-23 11:46     ` Richard Purdie
2013-04-23 13:13       ` Lewis, Nick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.