perl-net-ssleay: fix configure
PATCH 1/1 perl-net-ssleay: fix configure
From: Francois Perrad <[email protected]>
When TARGET_LDFLAGS contains more than one option, the generated Makefile contains this definition of LDDLFLAGS:
LDDLFLAGS = '--option-1 --option-2'
Which when passed to gcc is interpreted as a single option, and gcc (rightfully) barfs on it, like with:
arm-linux-gnueabihf-gcc: error: unrecognized command line option ?-shared -g?
This is because perl-net-ssleay's buildsystem is really completely brain-damaged. Other perl extensions do not behave like that, and instead are doing the only same thing to do: not add single quotes around the definition, and just use what they were provided for lddlflags.
So, just do the same for perl-net-ssleay. Since tweaking (yet once more) their buildsystem is too complex, we just use a post-configure hook to fix up the mess, by removing single quotes around the definition of LDDLFLAGS.
Note: if only one option is specified, no single quotes are added, but out hook is a no-op in this case.
See also:
http://lists.busybox.net/pipermail/buildroot/2014-July/101782.html
and the previous message for even more entertainment. ;-)
[me: find the real cause of the issue, tweak the sed expression to not
force -shared and instead just trim the single quotes, enhance commit log]
--- package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/perl-net-ssleay/perl-net-ssleay.mk +5 -0
@@ -15,4 +15,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE # suffers from: don't search for openssl, they pick the host-system one. PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr +define PERL_NET_SSLEAY_FIX_MAKEFILE + $(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile +endef +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE + $(eval $(perl-package))
Signature · 1 line
1.9.1
PATCH 1/1 perl-net-ssleay: fix configure
Dear Yann E. MORIN,
Quoted 3 lines · Yann E. MORIN
This is because perl-net-ssleay's buildsystem is really completely brain-damaged. Other perl extensions do not behave like that, and instead are doing the only same thing to do: not add single quotes
same -> sane
Quoted 2 lines
around the definition, and just use what they were provided for lddlflags.
lddflags -> LDDLFLAGS.
Quoted 7 lines
So, just do the same for perl-net-ssleay. Since tweaking (yet once more) their buildsystem is too complex, we just use a post-configure hook to fix up the mess, by removing single quotes around the definition of LDDLFLAGS.
Note: if only one option is specified, no single quotes are added, but out hook is a no-op in this case.
out -> our.
package/perl-net-ssleay/perl-net-ssleay.mk PERL_NET_SSLEAY_LICENSE_FILES = LICENSE · line 21
Quoted 4 lines
package/perl-net-ssleay/perl-net-ssleay.mk +4
-0+define PERL_NET_SSLEAY_FIX_MAKEFILE + $(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile +endef +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
I've fixed these and added a short comment above the hook definition to explain what it is doing. Committed!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 perl-net-ssleay: fix configure
Thomas, All,
On 2014-07-15 19:13 +0200, Thomas Petazzoni spake thusly:
Quoted 1 line · Yann E. MORIN
[--SNIP--]
Quoted 2 lines
I've fixed these and added a short comment above the hook definition to explain what it is doing. Committed!
Thanks!
/me should really look for a spelling+grammar checker for git commits...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 perl-net-ssleay: fix configure
In reply to Yann E. MORINHi Yann, Francois,
Quoted 17 lines · Yann E. MORIN
From: Francois Perrad <[email protected]>
When
TARGET_LDFLAGScontains more than one option, the generatedMakefilecontains this definition of LDDLFLAGS:LDDLFLAGS = '--option-1 --option-2'Which when passed to gcc is interpreted as a single option, and gcc (rightfully) barfs on it, like with:
arm-linux-gnueabihf-gcc: error: unrecognized command line option ?-shared -g?This is because perl-net-ssleay's buildsystem is really completely brain-damaged. Other perl extensions do not behave like that, and instead are doing the only same thing to do: not add single quotes around the definition, and just use what they were provided for lddlflags.
Quoted 4 lines
So, just do the same for perl-net-ssleay. Since tweaking (yet once more) their buildsystem is too complex, we just use a post-configure hook to fix up the mess, by removing single quotes around the definition of LDDLFLAGS.
Are you sure that it is only perl-net-ssleay that is broken in this way, and
not perl-xml-libxml?
I tried to run (without this patch)
make perl-net-ssleay BR2_TARGET_LDFLAGS=-g
and that worked just fine. So I suspect the problem is in the system's MakeMaker package, and not in perl-net-ssleay itself. If that is the case, you should see the same problem for perl-xml-libxml (because it also uses the LDDLFLAGS, while other packages don't because they don't build any C code).
I'm not sure what the real solution would be. Perhaps add a host-perl-makemaker
package and depend on that?
Regards,
Arnout
Quoted 32 lines
Note: if only one option is specified, no single quotes are added, but out hook is a no-op in this case.
See also:
http://lists.busybox.net/pipermail/buildroot/2014-July/101782.htmland the previous message for even more entertainment. ;-)
Signed-off-by Francois Perrad <[email protected]>[me: find the real cause of the issue, tweak the sed expression to not
force -shared and instead just trim the single quotes, enhance commit log]Signed-off-by "Yann E. MORIN" <[email protected]>--- package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++ 1 file changed, 5 insertions(+)package/perl-net-ssleay/perl-net-ssleay.mk +5
-0@@ -15,4 +15,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE # suffers from: don't search for openssl, they pick the host-system one. PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr +define PERL_NET_SSLEAY_FIX_MAKEFILE + $(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile +endef +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE + $(eval $(perl-package))
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 perl-net-ssleay: fix configure
2014-07-16 8:15 GMT+02:00 Arnout Vandecappelle <[email protected]>:
Quoted 32 lines
Hi Yann, Francois,
Quoted 17 lines · Yann E. MORIN
From: Francois Perrad <[email protected]>
When
TARGET_LDFLAGScontains more than one option, the generatedMakefilecontains this definition of LDDLFLAGS:LDDLFLAGS = '--option-1 --option-2'Which when passed to gcc is interpreted as a single option, and gcc (rightfully) barfs on it, like with:
arm-linux-gnueabihf-gcc: error: unrecognized command line option ?-shared -g?This is because perl-net-ssleay's buildsystem is really completely brain-damaged. Other perl extensions do not behave like that, and instead are doing the only same thing to do: not add single quotes around the definition, and just use what they were provided for lddlflags.
Quoted 4 lines
So, just do the same for perl-net-ssleay. Since tweaking (yet once more) their buildsystem is too complex, we just use a post-configure hook to fix up the mess, by removing single quotes around the definition of LDDLFLAGS.
Are you sure that it is only perl-net-ssleay that is broken in this way, and
not perl-xml-libxml?I tried to run (without this patch)
make perl-net-ssleay BR2_TARGET_LDFLAGS=-g
Quoted 8 lines
and that worked just fine. So I suspect the problem is in the system's MakeMaker package, and not in perl-net-ssleay itself. If that is the case, you should see the same problem for perl-xml-libxml (because it also uses the LDDLFLAGS, while other packages don't because they don't build any C code).
I'm not sure what the real solution would be. Perhaps add a host-perl-makemaker
package and depend on that?
Net-SSLeay has a Makefile.PL, but it doesn't use to run the classic ExtUtils-MakeMaker,
it runs a local copy of Module-Install, see in inc/
Fran?ois
Quoted 49 lines
Regards,
ArnoutQuoted 23 lines
Note: if only one option is specified, no single quotes are added, but out hook is a no-op in this case.
See also:
http://lists.busybox.net/pipermail/buildroot/2014-July/101782.htmland the previous message for even more entertainment. ;-)
Signed-off-by Francois Perrad <[email protected]>[me: find the real cause of the issue, tweak the sed expression to not
force -shared and instead just trim the single quotes, enhance commit log]Signed-off-by "Yann E. MORIN" <[email protected]>--- package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++ 1 file changed, 5 insertions(+)package/perl-net-ssleay/perl-net-ssleay.mk +0
-0package/perl-net-ssleay/perl-net-ssleay.mk PERL_NET_SSLEAY_LICENSE_FILES = LICENSE · line 23
Quoted 9 lines
package/perl-net-ssleay/perl-net-ssleay.mk +5
-0@@ -15,4 +15,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE # suffers from: don't search for openssl, they pick the host-system one. PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr +define PERL_NET_SSLEAY_FIX_MAKEFILE + $(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile +endef +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE + $(eval $(perl-package))--
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 perl-net-ssleay: fix configure
Fran?ois, All,
On 2014-07-16 19:42 +0200, Fran?ois Perrad spake thusly:
Quoted 3 lines
Net-SSLeay has a Makefile.PL, but it doesn't use to run the classic ExtUtils-MakeMaker,
it runs a local copy of Module-Install, see in inc/
Ah! Thanks for the explanations. Indeed, that's bad...
Would it be possible to make it use the system perl's MakeMaker instead of its own copy? For example, if we were to just remove it?
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 perl-net-ssleay: fix configure
In reply to Arnout VandecappelleArnout, All,
On 2014-07-16 08:15 +0200, Arnout Vandecappelle spake thusly:
Quoted 1 line · Yann E. MORIN
[--SNIP--]
Quoted 6 lines
Quoted 6 lines
This is because perl-net-ssleay's buildsystem is really completely brain-damaged. Other perl extensions do not behave like that, and instead are doing the only same thing to do: not add single quotes around the definition, and just use what they were provided for lddlflags.
Quoted 7 lines
Quoted 4 lines
So, just do the same for perl-net-ssleay. Since tweaking (yet once more) their buildsystem is too complex, we just use a post-configure hook to fix up the mess, by removing single quotes around the definition of LDDLFLAGS.
Are you sure that it is only perl-net-ssleay that is broken in this way, and
not perl-xml-libxml?
No, perl-xml-libxml is not impacted by this issue. I just checked, and I get a generated Makefile that contains:
LDDLFLAGS = -shared -g
I maintain my position: perl-net-ssleay's buildsystem is brain-danaged! ;-) And Fran?ois confirmed that in his reply, too. ;-)
If we needed yet another reason why bundling dependencies in one's own package was just bad, perl-net-ssleay is just that example. ;-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'