Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
@ 2014-01-15  8:42 Francois Perrad
  2014-01-15 10:12 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Francois Perrad @ 2014-01-15  8:42 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/luarocks/luarocks.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
index 85b6866..6cfd92e 100644
--- a/package/luarocks/luarocks.mk
+++ b/package/luarocks/luarocks.mk
@@ -31,7 +31,7 @@ define HOST_LUAROCKS_INSTALL_CMDS
 	echo "   LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]],"      >> $(LUAROCKS_CONFIG_FILE)
 	echo "   CC = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
 	echo "   LD = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
-	echo "   CFLAGS = [[$(TARGET_CFLAGS)]],"                >> $(LUAROCKS_CONFIG_FILE)
+	echo "   CFLAGS = [[$(TARGET_CFLAGS) -fPIC]],"          >> $(LUAROCKS_CONFIG_FILE)
 	echo "   LIBFLAG = [[-shared $(TARGET_LDFLAGS)]],"      >> $(LUAROCKS_CONFIG_FILE)
 	echo "}"                                                >> $(LUAROCKS_CONFIG_FILE)
 	echo "external_deps_dirs = { [[$(STAGING_DIR)/usr]] }"  >> $(LUAROCKS_CONFIG_FILE)
-- 
1.7.9.5

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

* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
  2014-01-15  8:42 [Buildroot] [PATCH] luarocks: fix compilation on 64bits Francois Perrad
@ 2014-01-15 10:12 ` Peter Korsgaard
  2014-01-15 10:49   ` François Perrad
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2014-01-15 10:12 UTC (permalink / raw)
  To: buildroot

>>>>> "Francois" == Francois Perrad <fperrad@gmail.com> writes:

 > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Where did you see this? On the autobuilders? If yes, please add a link.

It's not really about 32bits/64bits, but yes, x86-64 is one of the archs
needing -fPIC.

 > ---
 >  package/luarocks/luarocks.mk |    2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
 > index 85b6866..6cfd92e 100644
 > --- a/package/luarocks/luarocks.mk
 > +++ b/package/luarocks/luarocks.mk
 > @@ -31,7 +31,7 @@ define HOST_LUAROCKS_INSTALL_CMDS
 >  	echo "   LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]],"      >> $(LUAROCKS_CONFIG_FILE)
 >  	echo "   CC = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
 >  	echo "   LD = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
 > -	echo "   CFLAGS = [[$(TARGET_CFLAGS)]],"                >> $(LUAROCKS_CONFIG_FILE)
 > +	echo "   CFLAGS = [[$(TARGET_CFLAGS) -fPIC]],"          >> $(LUAROCKS_CONFIG_FILE)
 >  	echo "   LIBFLAG = [[-shared $(TARGET_LDFLAGS)]],"      >> $(LUAROCKS_CONFIG_FILE)

What about BR2_PREFER_STATIC_LIB (for both CFLAGS and LDFLAGS lines)?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
  2014-01-15 10:12 ` Peter Korsgaard
@ 2014-01-15 10:49   ` François Perrad
  2014-01-15 11:57     ` Vicente Olivert Riera
  2014-01-15 12:14     ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: François Perrad @ 2014-01-15 10:49 UTC (permalink / raw)
  To: buildroot

2014/1/15 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>> "Francois" == Francois Perrad <fperrad@gmail.com> writes:
>
>  > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>
> Where did you see this? On the autobuilders? If yes, please add a link.
>

in the latest autobuilder report, native Lua modules using the
`luarocks-package` infrastructure are broken :
x86_64 | lbase64-20120820-1 | NOK |
http://autobuild.buildroot.net/results/f28a624f89f4de249a1b7a718f5ae31109ba9171/
x86_64 | luabitop-1.0.2-1 | NOK |
http://autobuild.buildroot.net/results/1ead0a162a251d3e7bf8598036fa06c4befeb3d9/
x86_64 | luaexpat-1.2.0-1 | NOK |
http://autobuild.buildroot.net/results/0544cead086ba51b45dfa1df114787a8f22eaf8d/
x86_64 | luafilesystem-1.6.2-1 | NOK |
http://autobuild.buildroot.net/results/60161d13d596d41dd4059977eb947d72c172f0d5/

> It's not really about 32bits/64bits, but yes, x86-64 is one of the archs
> needing -fPIC.

Yes, x86_64

>
>  > ---
>  >  package/luarocks/luarocks.mk |    2 +-
>  >  1 file changed, 1 insertion(+), 1 deletion(-)
>
>  > diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
>  > index 85b6866..6cfd92e 100644
>  > --- a/package/luarocks/luarocks.mk
>  > +++ b/package/luarocks/luarocks.mk
>  > @@ -31,7 +31,7 @@ define HOST_LUAROCKS_INSTALL_CMDS
>  >      echo "   LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]],"      >> $(LUAROCKS_CONFIG_FILE)
>  >      echo "   CC = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
>  >      echo "   LD = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
>  > -    echo "   CFLAGS = [[$(TARGET_CFLAGS)]],"                >> $(LUAROCKS_CONFIG_FILE)
>  > +    echo "   CFLAGS = [[$(TARGET_CFLAGS) -fPIC]],"          >> $(LUAROCKS_CONFIG_FILE)
>  >      echo "   LIBFLAG = [[-shared $(TARGET_LDFLAGS)]],"      >> $(LUAROCKS_CONFIG_FILE)
>
> What about BR2_PREFER_STATIC_LIB (for both CFLAGS and LDFLAGS lines)?

native Lua modules/extensions are always shared lib.

>
> --
> Bye, Peter Korsgaard
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
  2014-01-15 10:49   ` François Perrad
@ 2014-01-15 11:57     ` Vicente Olivert Riera
  2014-01-15 12:14     ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Vicente Olivert Riera @ 2014-01-15 11:57 UTC (permalink / raw)
  To: buildroot

On 01/15/2014 10:49 AM, Fran?ois Perrad wrote:
> 2014/1/15 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>>> "Francois" == Francois Perrad <fperrad@gmail.com> writes:
>>
>>   > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>>
>> Where did you see this? On the autobuilders? If yes, please add a link.
>>
>
> in the latest autobuilder report, native Lua modules using the
> `luarocks-package` infrastructure are broken :
> x86_64 | lbase64-20120820-1 | NOK |
> http://autobuild.buildroot.net/results/f28a624f89f4de249a1b7a718f5ae31109ba9171/
> x86_64 | luabitop-1.0.2-1 | NOK |
> http://autobuild.buildroot.net/results/1ead0a162a251d3e7bf8598036fa06c4befeb3d9/
> x86_64 | luaexpat-1.2.0-1 | NOK |
> http://autobuild.buildroot.net/results/0544cead086ba51b45dfa1df114787a8f22eaf8d/
> x86_64 | luafilesystem-1.6.2-1 | NOK |
> http://autobuild.buildroot.net/results/60161d13d596d41dd4059977eb947d72c172f0d5/
>
>> It's not really about 32bits/64bits, but yes, x86-64 is one of the archs
>> needing -fPIC.
>
> Yes, x86_64
>
>>
>>   > ---
>>   >  package/luarocks/luarocks.mk |    2 +-
>>   >  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>   > diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk
>>   > index 85b6866..6cfd92e 100644
>>   > --- a/package/luarocks/luarocks.mk
>>   > +++ b/package/luarocks/luarocks.mk
>>   > @@ -31,7 +31,7 @@ define HOST_LUAROCKS_INSTALL_CMDS
>>   >      echo "   LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]],"      >> $(LUAROCKS_CONFIG_FILE)
>>   >      echo "   CC = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
>>   >      echo "   LD = [[$(TARGET_CC)]],"                        >> $(LUAROCKS_CONFIG_FILE)
>>   > -    echo "   CFLAGS = [[$(TARGET_CFLAGS)]],"                >> $(LUAROCKS_CONFIG_FILE)
>>   > +    echo "   CFLAGS = [[$(TARGET_CFLAGS) -fPIC]],"          >> $(LUAROCKS_CONFIG_FILE)
>>   >      echo "   LIBFLAG = [[-shared $(TARGET_LDFLAGS)]],"      >> $(LUAROCKS_CONFIG_FILE)
>>
>> What about BR2_PREFER_STATIC_LIB (for both CFLAGS and LDFLAGS lines)?
>
> native Lua modules/extensions are always shared lib.
>
>>
>> --
>> Bye, Peter Korsgaard
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

I have tested this patch on mips. It fixes this problem:

http://autobuild.buildroot.net/results/e7e/e7ea6946552f72dc27f23ae1aff1665a6aa097c7/

-- 
Vincent

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

* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
  2014-01-15 10:49   ` François Perrad
  2014-01-15 11:57     ` Vicente Olivert Riera
@ 2014-01-15 12:14     ` Peter Korsgaard
  2014-01-15 12:59       ` Mike Zick
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2014-01-15 12:14 UTC (permalink / raw)
  To: buildroot

>>>>> "Fran?ois" == Fran?ois Perrad <francois.perrad@gadz.org> writes:

 > 2014/1/15 Peter Korsgaard <jacmet@uclibc.org>:
 >>>>>>> "Francois" == Francois Perrad <fperrad@gmail.com> writes:
 >> 
 >> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
 >> 
 >> Where did you see this? On the autobuilders? If yes, please add a link.
 >> 

 > in the latest autobuilder report, native Lua modules using the
 > `luarocks-package` infrastructure are broken :
 > x86_64 | lbase64-20120820-1 | NOK |
 > http://autobuild.buildroot.net/results/f28a624f89f4de249a1b7a718f5ae31109ba9171/
 > x86_64 | luabitop-1.0.2-1 | NOK |
 > http://autobuild.buildroot.net/results/1ead0a162a251d3e7bf8598036fa06c4befeb3d9/
 > x86_64 | luaexpat-1.2.0-1 | NOK |
 > http://autobuild.buildroot.net/results/0544cead086ba51b45dfa1df114787a8f22eaf8d/
 > x86_64 | luafilesystem-1.6.2-1 | NOK |
 > http://autobuild.buildroot.net/results/60161d13d596d41dd4059977eb947d72c172f0d5/

 >> It's not really about 32bits/64bits, but yes, x86-64 is one of the archs
 >> needing -fPIC.

 > Yes, x86_64

 >> What about BR2_PREFER_STATIC_LIB (for both CFLAGS and LDFLAGS lines)?

 > native Lua modules/extensions are always shared lib.

Ok, committed with a reworded commit message, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] luarocks: fix compilation on 64bits
  2014-01-15 12:14     ` Peter Korsgaard
@ 2014-01-15 12:59       ` Mike Zick
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Zick @ 2014-01-15 12:59 UTC (permalink / raw)
  To: buildroot

On Wed, 15 Jan 2014 13:14:54 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:

>  >> What about BR2_PREFER_STATIC_LIB (for both CFLAGS and LDFLAGS
>  >> lines)?  
> 
>  > native Lua modules/extensions are always shared lib.  
> 
> Ok, committed with a reworded commit message, thanks.
>

"Close enough" for the purposes of Buildroot.

Both modules and extensions in either native Lua or as
objects from foreign languages (such as "C") may be 
statically linked into the Lua interpreter.

The process and changes required are well documented,
but would probably be impractical to automate in the
build system.

So the answer for the BR2_PREFER_STATIC_LIB question is:
"Not supported within the Buildroot system."
or on a positive note:
"Buildroot only supports Lua externals as dynamic libraries."

Mike

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

end of thread, other threads:[~2014-01-15 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15  8:42 [Buildroot] [PATCH] luarocks: fix compilation on 64bits Francois Perrad
2014-01-15 10:12 ` Peter Korsgaard
2014-01-15 10:49   ` François Perrad
2014-01-15 11:57     ` Vicente Olivert Riera
2014-01-15 12:14     ` Peter Korsgaard
2014-01-15 12:59       ` Mike Zick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox