All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV
@ 2014-07-03 16:53 Francois Perrad
  2014-07-03 16:53 ` [Buildroot] [v2 2/3] perl-net-ssleay: fix build Francois Perrad
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Francois Perrad @ 2014-07-03 16:53 UTC (permalink / raw)
  To: buildroot

in some case $(2)_CONV_OPT is not enough

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 docs/manual/adding-packages-perl.txt | 4 ++++
 package/pkg-perl.mk                  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt
index 4062646..5046618 100644
--- a/docs/manual/adding-packages-perl.txt
+++ b/docs/manual/adding-packages-perl.txt
@@ -100,6 +100,10 @@ A few additional variables, specific to the Perl/CPAN infrastructure,
 can also be defined. Many of them are only useful in very specific
 cases, typical packages will therefore only use a few of them.
 
+* +PERL_FOO_ENV_OPT+/+HOST_PERL_FOO_ENV_OPT+, to specify additional
+  environment variables to pass to the +perl Makefile.PL+ or +perl Build.PL+.
+  By default, empty.
+
 * +PERL_FOO_CONF_OPT+/+HOST_PERL_FOO_CONF_OPT+, to specify additional
   configure options to pass to the +perl Makefile.PL+ or +perl Build.PL+.
   By default, empty.
diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk
index 5cfdc77..8c45001 100644
--- a/package/pkg-perl.mk
+++ b/package/pkg-perl.mk
@@ -49,6 +49,7 @@ ifeq ($(4),target)
 # Configure package for target
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--config ar="$$(TARGET_AR)" \
@@ -69,6 +70,7 @@ define $(2)_CONFIGURE_CMDS
 			--install_path libdoc=/usr/share/man/man3 \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
@@ -95,12 +97,14 @@ else
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		perl Build.PL \
 			--install_base $$(HOST_DIR)/usr \
 			--installdirs vendor \
 			$$($(2)_CONF_OPT); \
 	else \
+		$$($(2)_CONF_ENV) \
 		PERL_MM_USE_DEFAULT=1 \
 		PERL_AUTOINSTALL=--skipdeps \
 		perl Makefile.PL \
-- 
1.9.1

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

* [Buildroot] [v2 2/3] perl-net-ssleay: fix build
  2014-07-03 16:53 [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Francois Perrad
@ 2014-07-03 16:53 ` Francois Perrad
  2014-07-03 18:18   ` Thomas Petazzoni
  2014-07-03 16:53 ` [Buildroot] [v2 3/3] " Francois Perrad
  2014-07-03 18:18 ` [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Thomas Petazzoni
  2 siblings, 1 reply; 11+ messages in thread
From: Francois Perrad @ 2014-07-03 16:53 UTC (permalink / raw)
  To: buildroot

set the correct prefix, instead of '/usr' detected on the host

see http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl-net-ssleay/perl-net-ssleay.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
index 413fdf0..7e4c194 100644
--- a/package/perl-net-ssleay/perl-net-ssleay.mk
+++ b/package/perl-net-ssleay/perl-net-ssleay.mk
@@ -11,4 +11,6 @@ PERL_NET_SSLEAY_DEPENDENCIES = perl openssl
 PERL_NET_SSLEAY_LICENSE = OpenSSL
 PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 
+PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
+
 $(eval $(perl-package))
-- 
1.9.1

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-03 16:53 [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Francois Perrad
  2014-07-03 16:53 ` [Buildroot] [v2 2/3] perl-net-ssleay: fix build Francois Perrad
@ 2014-07-03 16:53 ` Francois Perrad
  2014-07-03 18:20   ` Thomas Petazzoni
  2014-07-13 13:35   ` Yann E. MORIN
  2014-07-03 18:18 ` [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Thomas Petazzoni
  2 siblings, 2 replies; 11+ messages in thread
From: Francois Perrad @ 2014-07-03 16:53 UTC (permalink / raw)
  To: buildroot

the following error occurs after the previous patch
    arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '

so, force LDDLFLAGS without quote

note: previously LDDLFLAGS was correct
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
index 7e4c194..48ff715 100644
--- a/package/perl-net-ssleay/perl-net-ssleay.mk
+++ b/package/perl-net-ssleay/perl-net-ssleay.mk
@@ -13,4 +13,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 
 PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
 
+define PERL_NET_SSLEAY_FIX_MAKEFILE
+	$(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile
+endef
+PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
+
 $(eval $(perl-package))
-- 
1.9.1

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

* [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV
  2014-07-03 16:53 [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Francois Perrad
  2014-07-03 16:53 ` [Buildroot] [v2 2/3] perl-net-ssleay: fix build Francois Perrad
  2014-07-03 16:53 ` [Buildroot] [v2 3/3] " Francois Perrad
@ 2014-07-03 18:18 ` Thomas Petazzoni
  2 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2014-07-03 18:18 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Thu,  3 Jul 2014 18:53:24 +0200, Francois Perrad wrote:
> in some case $(2)_CONV_OPT is not enough

In title and commit log: s/CONV/CONF/. Also please try to write more
detailed commit messages, such as:

"""
pkg-perl: add support for $(2)_CONF_ENV

This commit adds support for specifying additional variables to be
passed in the perl Makefile.PL or perl Build.PL executions for packages
based on the perl-package infrastructure.
"""

> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  docs/manual/adding-packages-perl.txt | 4 ++++
>  package/pkg-perl.mk                  | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-perl.txt b/docs/manual/adding-packages-perl.txt
> index 4062646..5046618 100644
> --- a/docs/manual/adding-packages-perl.txt
> +++ b/docs/manual/adding-packages-perl.txt
> @@ -100,6 +100,10 @@ A few additional variables, specific to the Perl/CPAN infrastructure,
>  can also be defined. Many of them are only useful in very specific
>  cases, typical packages will therefore only use a few of them.
>  
> +* +PERL_FOO_ENV_OPT+/+HOST_PERL_FOO_ENV_OPT+, to specify additional

The name of the options is incorrect here, it should be
PERL_FOO_CONF_ENV and HOST_PERL_FOO_CONV_ENV.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [v2 2/3] perl-net-ssleay: fix build
  2014-07-03 16:53 ` [Buildroot] [v2 2/3] perl-net-ssleay: fix build Francois Perrad
@ 2014-07-03 18:18   ` Thomas Petazzoni
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2014-07-03 18:18 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

On Thu,  3 Jul 2014 18:53:25 +0200, Francois Perrad wrote:
> set the correct prefix, instead of '/usr' detected on the host
> 
> see http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Again, sorry to be annoying, but please, please, please, better commit
logs. The title should be more something like:

perl-net-ssleay: specific correct OpenSSL prefix to fix build

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-03 16:53 ` [Buildroot] [v2 3/3] " Francois Perrad
@ 2014-07-03 18:20   ` Thomas Petazzoni
  2014-07-13 13:35   ` Yann E. MORIN
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2014-07-03 18:20 UTC (permalink / raw)
  To: buildroot

Dear Francois Perrad,

See: this patch has exactly the same title as the previous one. That's
a good indication that the title is not sufficiently distinctive.

On Thu,  3 Jul 2014 18:53:26 +0200, Francois Perrad wrote:
> the following error occurs after the previous patch
>     arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '
> 
> so, force LDDLFLAGS without quote
> 
> note: previously LDDLFLAGS was correct
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
> index 7e4c194..48ff715 100644
> --- a/package/perl-net-ssleay/perl-net-ssleay.mk
> +++ b/package/perl-net-ssleay/perl-net-ssleay.mk
> @@ -13,4 +13,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
>  
>  PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
>  
> +define PERL_NET_SSLEAY_FIX_MAKEFILE
> +	$(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile
> +endef
> +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE

What about BR2_PREFER_STATIC_LIB=y configurations, as Peter asked in
the review of your initial patch?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-03 16:53 ` [Buildroot] [v2 3/3] " Francois Perrad
  2014-07-03 18:20   ` Thomas Petazzoni
@ 2014-07-13 13:35   ` Yann E. MORIN
  2014-07-14 19:52     ` François Perrad
  1 sibling, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2014-07-13 13:35 UTC (permalink / raw)
  To: buildroot

Fran?ois, All,

On 2014-07-03 18:53 +0200, Francois Perrad spake thusly:
> the following error occurs after the previous patch
>     arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '
> 
> so, force LDDLFLAGS without quote
> 
> note: previously LDDLFLAGS was correct
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

I've dropped this patch from my resend [0], and marked it Rejected in
the patchwork, because I submitted an alternative patch, and C extensions
to Perl can not be built static anyway.

[0] http://lists.busybox.net/pipermail/buildroot/2014-July/101699.html

Regards,
Yann E. MORIN.

> ---
>  package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
> index 7e4c194..48ff715 100644
> --- a/package/perl-net-ssleay/perl-net-ssleay.mk
> +++ b/package/perl-net-ssleay/perl-net-ssleay.mk
> @@ -13,4 +13,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
>  
>  PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
>  
> +define PERL_NET_SSLEAY_FIX_MAKEFILE
> +	$(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile
> +endef
> +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
> +
>  $(eval $(perl-package))
> -- 
> 1.9.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-13 13:35   ` Yann E. MORIN
@ 2014-07-14 19:52     ` François Perrad
  2014-07-14 22:43       ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: François Perrad @ 2014-07-14 19:52 UTC (permalink / raw)
  To: buildroot

2014-07-13 15:35 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Fran?ois, All,
>
> On 2014-07-03 18:53 +0200, Francois Perrad spake thusly:
>> the following error occurs after the previous patch
>>     arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '
>>
>> so, force LDDLFLAGS without quote
>>
>> note: previously LDDLFLAGS was correct
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>
> I've dropped this patch from my resend [0], and marked it Rejected in
> the patchwork, because I submitted an alternative patch, and C extensions
> to Perl can not be built static anyway.
>
> [0] http://lists.busybox.net/pipermail/buildroot/2014-July/101699.html
>

On my box, with all patches already applied in the trunk, I still need
this patch.

Fran?ois

> Regards,
> Yann E. MORIN.
>
>> ---
>>  package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
>> index 7e4c194..48ff715 100644
>> --- a/package/perl-net-ssleay/perl-net-ssleay.mk
>> +++ b/package/perl-net-ssleay/perl-net-ssleay.mk
>> @@ -13,4 +13,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
>>
>>  PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
>>
>> +define PERL_NET_SSLEAY_FIX_MAKEFILE
>> +     $(SED) 's/^LDDLFLAGS =.*/LDDLFLAGS = -shared/' $(@D)/Makefile
>> +endef
>> +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
>> +
>>  $(eval $(perl-package))
>> --
>> 1.9.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  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.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-14 19:52     ` François Perrad
@ 2014-07-14 22:43       ` Yann E. MORIN
  2014-07-14 23:22         ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2014-07-14 22:43 UTC (permalink / raw)
  To: buildroot

Fran?ois, All,

On 2014-07-14 21:52 +0200, Fran?ois Perrad spake thusly:
> 2014-07-13 15:35 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> > On 2014-07-03 18:53 +0200, Francois Perrad spake thusly:
> >> the following error occurs after the previous patch
> >>     arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '
> >>
> >> so, force LDDLFLAGS without quote
> >>
> >> note: previously LDDLFLAGS was correct
> >> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> >
> > I've dropped this patch from my resend [0], and marked it Rejected in
> > the patchwork, because I submitted an alternative patch, and C extensions
> > to Perl can not be built static anyway.
> 
> On my box, with all patches already applied in the trunk, I still need
> this patch.

Ah, I see. I re-tested here, and indeed, it does perl-net-ssleay does
not build anymore.

I swear I was able to build it before I removed that patch... :-(

However, I have investigated a bit, and here are my findings:

  - our pkg-perl simply calls 'perl' to run the configure steps
  - this calls to the host system's perl
  - it also passes (among many other flags)::
        --config lddlflags="-shared $$(TARGET_LDFLAGS)"
  - this gets shoehorned into the generated Makefile as:
        LDDLFLAGS = '-shared '
  - which, when calling gcc for the link step, is then passed as:
        ...-gcc  '-shared ' ...
  - which is interpreted by gcc as the option '-shared ', so with a
    trailing space.

Removing the -shared from the configure steps yields a Makefile with:
        LDDLFLAGS = -shared -L/usr/local/lib -fstack-protector

Notice how there is no longer any single-quote around the value. And
now, it builds!

However, there is an unwanted -L/usr/local/lib option, which is properly
wrong, since we're doing cross-compilation. So, where does it come from?

Well, remember we're calling the host system's perl. On my system, I was
able to track the definition of LDDLFALGS to this file:
    /usr/lib/perl/5.18.2/Config_heavy.pl

which aptly contains:
    lddlflags='-shared -L/usr/local/lib -fstack-protector'

Changing the 'local' in there by 'YEM' would yield a Makefile for
perl-net-ssleay with, guess what? The following:
    LDDLFLAGS = -shared -L/usr/YEM/lib -fstack-protector

Bingo!

But why doesn't it take the value we pass on the configure line? Ah, for
my config, $(TARGET_LDFLAGS) is empty. So, it seems that if we pass an
empty value to --lddlflags, then it uses the default value specified in
the installation's files. That's not good...

So, it seems we would need to do one of the following:

  - find a way to pass a no-op, non-empty value to lddlflags, or
  - munge all generated Makefile so they no longer have paths to the
    host system libs/includes, or
  - tell the host perl not to use system paths, but I guess perl is not
    well equipped to be gentle to cross-compiletion, or
  - build our own host-perl and munge its installed files so they point
    to $(STAGING_DIR) (instead of $(HOST_DIR), probably)

Heck, I think the first option is the quickest as a workaround, but that
the latest is the safest, although the most complex. I doubt the third
would be that easy, while with the second option, we may miss
something... :-(

In any case, the -shared value in the configure steps is absolutely not
needed (and it breaks the build!) I'm testing the other extensions now
to see if we can really remove it...

BTW, all the above is also valid for LDFLAGS, sicne mine also contain an
option -L/usr/local/lib .

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-14 22:43       ` Yann E. MORIN
@ 2014-07-14 23:22         ` Yann E. MORIN
  2014-07-14 23:49           ` Yann E. MORIN
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2014-07-14 23:22 UTC (permalink / raw)
  To: buildroot

Fran?ois, All,

On 2014-07-15 00:43 +0200, Yann E. MORIN spake thusly:
> On 2014-07-14 21:52 +0200, Fran?ois Perrad spake thusly:
> > 2014-07-13 15:35 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> > > On 2014-07-03 18:53 +0200, Francois Perrad spake thusly:
> > >> the following error occurs after the previous patch
> > >>     arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-shared '
> > >>
> > >> so, force LDDLFLAGS without quote
> > >>
> > >> note: previously LDDLFLAGS was correct
> > >> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > >
> > > I've dropped this patch from my resend [0], and marked it Rejected in
> > > the patchwork, because I submitted an alternative patch, and C extensions
> > > to Perl can not be built static anyway.
> > 
> > On my box, with all patches already applied in the trunk, I still need
> > this patch.
> 
> Ah, I see. I re-tested here, and indeed, it does perl-net-ssleay does
> not build anymore.
> 
> I swear I was able to build it before I removed that patch... :-(

OK, that's probably because I had removed -shared fron pkg-perl.mk and
forgot about it.

> However, I have investigated a bit, and here are my findings:
> 
>   - our pkg-perl simply calls 'perl' to run the configure steps
>   - this calls to the host system's perl
>   - it also passes (among many other flags)::
>         --config lddlflags="-shared $$(TARGET_LDFLAGS)"

I tried to set TARGET_LDFLAGS="-g" since -g is simply ignored by ld, and
I left the -shared in lddlflags on the configure line, but then, here's
what I got:
    arm-linux-gnueabihf-gcc: error: unrecognized command line option ?-shared -g?

Bummer! So, if we pass more than one option to --lddlflags, the perl
infra completely derails, and sets LDDLFLAGS in the Makefile, to:
    LDDLFLAGS = '-shared -g'

Bad, real bad... :-(

OK, let's see what happens to other extensions. What about
perl-mojolicious? Here's what LDDLFLAGS looks like with -shared on the
configure line, and TARGET_LDFLAGS=-g:
    LDDLFLAGS = -shared -g

Oooookay... And other extensions are OK, too.

So, that's not the perl infra that is brain-dead, that's really
perl-net-ssleay which is completely f*cked up... :-(

OK, I'll revive your patch, with a few quirks...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [v2 3/3] perl-net-ssleay: fix build
  2014-07-14 23:22         ` Yann E. MORIN
@ 2014-07-14 23:49           ` Yann E. MORIN
  0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2014-07-14 23:49 UTC (permalink / raw)
  To: buildroot

Fran?ois, All,

On 2014-07-15 01:22 +0200, Yann E. MORIN spake thusly:
> On 2014-07-15 00:43 +0200, Yann E. MORIN spake thusly:
> > On 2014-07-14 21:52 +0200, Fran?ois Perrad spake thusly:
> > > 2014-07-13 15:35 GMT+02:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> > > > I've dropped this patch from my resend [0], and marked it Rejected in
> > > > the patchwork, because I submitted an alternative patch, and C extensions
> > > > to Perl can not be built static anyway.
> > > On my box, with all patches already applied in the trunk, I still need
> > > this patch.
> OK, I'll revive your patch, with a few quirks...

And the new patch has been posted, now:
    http://patchwork.ozlabs.org/patch/369784/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2014-07-14 23:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 16:53 [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Francois Perrad
2014-07-03 16:53 ` [Buildroot] [v2 2/3] perl-net-ssleay: fix build Francois Perrad
2014-07-03 18:18   ` Thomas Petazzoni
2014-07-03 16:53 ` [Buildroot] [v2 3/3] " Francois Perrad
2014-07-03 18:20   ` Thomas Petazzoni
2014-07-13 13:35   ` Yann E. MORIN
2014-07-14 19:52     ` François Perrad
2014-07-14 22:43       ` Yann E. MORIN
2014-07-14 23:22         ` Yann E. MORIN
2014-07-14 23:49           ` Yann E. MORIN
2014-07-03 18:18 ` [Buildroot] [v2 1/3] pkg-perl: add $(2)_CONV_ENV Thomas Petazzoni

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.