Ticket #30 (closed todo: fixed)

Opened 13 years ago

Last modified 11 years ago

make shared libparrot with an already installed shared libparrot

Reported by: rurban Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: branch
Severity: medium Keywords:
Cc: jkeenan Language:
Patch status: new Platform: linux

Description

(migrated from RT 39742)

The reason for the problem to make shared libparrot with an already installed shared libparrot is simple and has several reasons:

1. libs belongs to the end.

first LDFLAGS, then LD_LOAD_FLAGS, then libparrot, then LIBS + EXTRALIBS.

dynpmc got this wrong. It had LIBS at the front.

  1. One should not put libs before the LDFLAGS.
  2. One should reverse the LIBS line in order of dependencies. We have the problem that the libs line is generated automatically and may contain -L/usr/lib (pulled in from libicu) and -L/usr/local/lib, so the already installed -lparrot will be found.

So our -Lblib/lib should be at the front, best in LDFLAGS. Note that parrot.pc got that right:

Libs: -L${libdir} -lparrot @icu_shared@ @libs@

2. remove the perl5 -L/usr/local/lib LDFLAGS which would pull in

a shared /usr/local/lib/libparrot.so before checking -Lblib/lib

-lparrot.

One fix could be to check this in Configure and move all -L from LDFLAGS to the LIBS flag at the front. I went this way for unices, and explicitly for win. The other fix would be to explicitly link to blib/lib/libparrot.so, without -L path hacks.

3. Now an already installed libparrot.dll/.so does not conflict with make anymore.

The remaining problem is at make installable esp. for the languages and already installed /usr/lib/parrot, /usr/include/parrot and /usr/lib/libparrot.dll.a

This patch adds PATH resp. LD_RUN_PATH to the parrot invocations, similar as in perl5. It moves a -L<path> from @ldflags@ to @libs@ in config. It also adds emacs/vim modes to the Makefiles. It also adds Makefile targets to regenerate the Makefiles automatically.

Attachments

39742-installed-conflict.patch Download (28.0 KB) - added by rurban 13 years ago.
pdd30install_stage3-unapplied.tar.bz2 Download (70.7 KB) - added by rurban 13 years ago.
tar.bz2 of all pdd30install_stage3 unapplied patches
tt30-shared-libparrot-warning.patch Download (1.7 KB) - added by doughera 13 years ago.

Change History

Changed 13 years ago by rurban

  Changed 13 years ago by rurban

  • status changed from new to assigned

  Changed 13 years ago by doughera

Further information is in the original RT ticket [perl #39742] and in mailing list threads referenced in the original ticket. In particular, there are two somewhat independent issues:

1. When building parrot, how does the linker know which libparrot.so to use?

2. When running the freshly-built parrot, how does the run-time loader know which libparrot.so to use?

  Changed 13 years ago by rurban

  • patch changed from new to rejected

Changed 13 years ago by rurban

tar.bz2 of all pdd30install_stage3 unapplied patches

  Changed 13 years ago by allison

Patch 39742-installed-conflict.patch held, pending extensive platform testing.

Monolithic bundle of patches pdd30install_stage3-unapplied.tar.bz2 rejected. Separate into individual patches.

  Changed 13 years ago by kjs

  • platform changed from all to linux
  • type changed from bug to todo

  Changed 13 years ago by allison

  • owner rurban deleted
  • status changed from assigned to new

  Changed 13 years ago by doughera

The problem in the subject of this ticket was fixed prior to 1.0. The build version of parrot only refers to the libparrot in the build directory. The 'make installable' target builds versions that link against the install directory. I have attached a patch to remove the now-irrelevant warning in config/inter/libparrot.pm. Once that patch is applied, this ticket should be closed.

Changed 13 years ago by doughera

follow-up: ↓ 9   Changed 13 years ago by coke

  • milestone 1.2 deleted

1.2 has passed; removing milestone instead of auto-bumping to 1.3

in reply to: ↑ 8 ; follow-up: ↓ 11   Changed 13 years ago by doughera

1.2 has passed; removing milestone instead of auto-bumping to 1.3

If my attached patch https://trac.parrot.org/parrot/attachment/ticket/30/tt30-shared-libparrot-warning.patch is applied, this ticket can be closed.

  Changed 13 years ago by doughera

I should note that a user can still inadvertantly defeat the current scheme by appropriate settings of environment variables such as LD_LIBRARY_PATH or LD_RUN_PATH (or some other platform equivalent). In perl 5's makefile, we try to trap that and prepend the current library location to LD_LIBRARY_PATH (or equivalent) if appropriate.

in reply to: ↑ 9 ; follow-up: ↓ 12   Changed 11 years ago by jkeenan

  • cc jkeenan added
  • priority changed from critical to normal
  • component changed from install to configure
  • patch changed from rejected to new

Replying to doughera:

If my attached patch https://trac.parrot.org/parrot/attachment/ticket/30/tt30-shared-libparrot-warning.patch is applied, this ticket can be closed.

Andy,

Am cage-cleaning. Should we still be considering your patch?

Thank you very much.

kid51

in reply to: ↑ 11 ; follow-up: ↓ 13   Changed 11 years ago by doughera

Replying to jkeenan:

Am cage-cleaning. Should we still be considering your patch?

I think it should wait until TT #1960 is fixed, but then it's probably ok.

in reply to: ↑ 12   Changed 11 years ago by jkeenan

  • owner set to jkeenan

Replying to doughera:

Replying to jkeenan:

Am cage-cleaning. Should we still be considering your patch?

I think it should wait until TT #1960 is fixed, but then it's probably ok.

TT #1960 has been closed by cotto and stayed closed for 5 days, so let's close this one now.

  Changed 11 years ago by jkeenan

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.