On Wednesday 02 April 2008 04:50:23 Christian Aperghis wrote:
> Andy Dougherty a écrit :
> > On Tue, 1 Apr 2008, Christian Aperghis-Tramoni wrote:
> >> I have exactly the same problem under a Debian system.
> >> Configure works properly but make ends with the same message error :
> >>
> >> pbc_to_exe.o: In function `main':
> >> pbc_to_exe.c:(.text+0x64): undefined reference to
> >> `Parrot_set_executable_name'
> >> collect2: ld returned 1 exit status
> >> linking failed
> >> current instr.: 'link_file' pc 769 (pbc_to_exe.pir:369)
> >> called from Sub 'main' pc 124 (pbc_to_exe.pir:32)
> >> make: *** [pbc_to_exe] Error 1
> >
> > My guess is the same as it was in the original problem report -- do you
> > have a previously installed libparrot somewhere (perhaps in
> > /usr/local/lib?)
> >
> > I have not yet heard back from the original poster whether this is the
> > source of the problem, but it seems a reasonable possibility to me.
> >
> >> Note that this problem does not appear on a Centos or a MacOsX System.
> >
> > My guess is that those systems do not have a previously installed
> > libparrot somewhere where the linker can find it.
>
> If what you are suggesting is right, depending of the system we are
> working on we cannot perform an upgrade of parrot without removing the
> former installation.
We're not seeing the problem in the parrot executable, just the pbc_to_exe
executable, which makes me believe that the attached patch will fix the
problem.
We rearranged the linker flags for the parrot executable to avoid this a while
back, so we ought to rearrange the linker flags for pbc_to_exe in the same
way.
Does this fix the problem for anyone still seeing it?
-- c
=== tools/dev/pbc_to_exe_gen.pl
==================================================================
--- tools/dev/pbc_to_exe_gen.pl (revision 26711)
+++ tools/dev/pbc_to_exe_gen.pl (local)
@@ -360,14 +360,14 @@
link .= objfile
link .= pathquote
link .= ' '
+ link .= rpath
+ link .= ' '
+ link .= libparrot
+ link .= ' '
link .= link_dynamic
link .= ' '
link .= linkflags
link .= ' '
- link .= libparrot
- link .= ' '
- link .= rpath
- link .= ' '
link .= libs
link .= ' '
link .= config