Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 84345
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc: LEONT [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: LDDLFLAGS missing CCDLFLAGS (rpath)
rpath args (CCDLFLAGS) are not given to the linker. Systems which rely on proper rpath cannot install modules via CPAN. I.e. any XS which relies on dynamic libs in paths only known to perl and not to the system. See e.g. https://rt.cpan.org/Ticket/Update.html?id=68572 (solaris /opt/csw/lib) The fix is to add CCDLFLAGS to LDDLFLAGS. The workaround is to add this EUMM arg to WriteMakefile: LDDLFLAGS => $Config{lddlflags} . " " . $Config{ccdlflags} -- Reini Urban
On Mon Apr 01 11:26:29 2013, RURBAN wrote: Show quoted text
> rpath args (CCDLFLAGS) are not given to the linker. > Systems which rely on proper rpath cannot install modules via CPAN. > I.e. any XS which relies on dynamic libs in paths only known to perl > and not to the system. > See e.g. https://rt.cpan.org/Ticket/Update.html?id=68572 > (solaris /opt/csw/lib) > > The fix is to add CCDLFLAGS to LDDLFLAGS. > > The workaround is to add this EUMM arg to WriteMakefile: > LDDLFLAGS => $Config{lddlflags} . " " . $Config{ccdlflags}
As far as I know, ccdlflags is what you pass when linking executables, and lddlflags is what you pass when linking loadable-objects/shared-libraries. I suspect the correct solution is not that MakeMaker should add those ccdlflags, but that -R <whatever> should be added to that particular perl's configuration. Leon
On Fri Apr 19 13:05:22 2013, LEONT wrote: solution is not Show quoted text
> that MakeMaker should add those ccdlflags, but that -R <whatever> > should be added to that particular perl's configuration.
Erm, that should be "that particular perl's lddlflags". Leon
I claim this is obsolete since was Perl configuration error.
On Thu Jul 31 22:29:52 2014, ETJ wrote: Show quoted text
> I claim this is obsolete since was Perl configuration error.
No, leont said LDDLFLAGS is only for shared libs (yes), and CCDLFLAGS only for executables (wrong, but right in the p5p limited point of view). CCDLFLAGS are compiler flags needed to compile shared libs, hence the DL. See perldoc Config. LDDLFLAGS missing rpath settings, which are in CCDLFLAGS, looks like an upstream bug in Configure. But since those bugs/misinterpretations cannot be fixed for already installed perl's, EUMM is the place to fix this problem. ccdlflags always carried linker flags such as -Wl,-E and the rpath settings. Discuss this with p5p if you want to change it. But perl5 really has no idea how to properly create executables, as they still link with CC and not LD and refused to change that over the last decades (they blamed HP-UX), such as needed for llvm link-time optimizations. So only clang can be used. So rather do not talk to p5p, as they have a confused concept over compiler vs linker vs loader. My guess is that they think LD stands for Link Dynamic, and not Linker Driver. $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) They also confuse the linker with the loader and make no attempt to describe that ldflags are only valid for passing though compiler drivers, not linkers. perldoc Config: "ldflags" This variable contains any additional C loader flags desired by the user. It is up to the Makefile to use this. -- Reini Urban
Leon, What do you want to do about this issue?
On Tue Aug 05 12:42:07 2014, RURBAN wrote: Show quoted text
> CCDLFLAGS are compiler flags needed to compile shared libs, hence the > DL. See perldoc Config.
No, it's needed to link to a shared library, that's something subtly different. Show quoted text
> LDDLFLAGS missing rpath settings, which are in CCDLFLAGS, looks like > an upstream bug in Configure.
lddlflags «contains *any* special flags that might need to be passed to $ld to create a shared library suitable for dynamic loading» (emphasis mine). If -R is needed, it should already be there, anything else is a misconfigured system IMO. Show quoted text
> But since those bugs/misinterpretations > cannot be fixed for already installed perl's, EUMM is the place to fix > this problem.
No, that is the path to madness. Guessing what people meant with a misconfigured perl is asking for trouble, odds are this will break matters for someone else, even if we don't know yet who. Show quoted text
> But perl5 really has no idea how to properly create executables, as > they still link with CC and not LD and refused to change that over the > last decades (they blamed HP-UX), such as needed for llvm link-time > optimizations. So only clang can be used. > > So rather do not talk to p5p, as they have a confused concept over > compiler vs linker vs loader. My guess is that they think LD stands > for Link Dynamic, and not Linker Driver. > $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE)
There's nothing that really stops you from using an cc instead of a cc for $LD AFAIK, but the hint files may not take it into account; I'm pretty sure it can be done, but it may require more effort than desirable. Show quoted text
> They also confuse the linker with the loader and make no attempt to > describe that ldflags are only valid for passing though compiler > drivers, not linkers. > > perldoc Config: > "ldflags" > This variable contains any additional C loader flags desired by the > user. It is up to the Makefile to use > this.
That is indeed confusing wording. Leon