diff mbox series

lua: add patch to fix pkg-config file for version 5.1.x

Message ID 20171012074518.14902-1-joerg.krause@embedded.rocks
State Rejected
Headers show
Series lua: add patch to fix pkg-config file for version 5.1.x | expand

Commit Message

Jörg Krause Oct. 12, 2017, 7:45 a.m. UTC
This patch applies the fix added in commit
8d845683e37640d33c186c0091ccce6ae3ef0777 to Lua version 5.1.x.

When Lua is linked with additional libraries, these libraries should go
into the pkg-config file as well.

Otherwise, linking swupdate with the lua library (version 5.1.x) fails:

```
/home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlopen'
/home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlclose'
/home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlerror'
/home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlsym'
```

The build error was detected when building the package swupdate from
upstream with Lua 5.1 compatibility support [1] enabled.

[1] https://groups.google.com/forum/#!topic/swupdate/cBvq27-zuvs

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch

Comments

Francois Perrad Oct. 12, 2017, 4:22 p.m. UTC | #1
Jorg,

please look the patch http://patchwork.ozlabs.org/patch/804094/
which fix lua.pc for all version of Lua.

François

2017-10-12 9:45 GMT+02:00 Jörg Krause <joerg.krause@embedded.rocks>:

> This patch applies the fix added in commit
> 8d845683e37640d33c186c0091ccce6ae3ef0777 to Lua version 5.1.x.
>
> When Lua is linked with additional libraries, these libraries should go
> into the pkg-config file as well.
>
> Otherwise, linking swupdate with the lua library (version 5.1.x) fails:
>
> ```
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so:
> undefined reference to `dlopen'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so:
> undefined reference to `dlclose'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so:
> undefined reference to `dlerror'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so:
> undefined reference to `dlsym'
> ```
>
> The build error was detected when building the package swupdate from
> upstream with Lua 5.1 compatibility support [1] enabled.
>
> [1] https://groups.google.com/forum/#!topic/swupdate/cBvq27-zuvs
>
> Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
> ---
>  package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch | 12
> ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 package/lua/5.1.5/0003-add-
> MYLIBS-to-Libs-in-lua-pc.patch
>
> diff --git a/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch
> b/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch
> new file mode 100644
> index 0000000000..8a5a0d85be
> --- /dev/null
> +++ b/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch
> @@ -0,0 +1,12 @@
> +diff -purN lua-5.1.5.orig/etc/lua.pc lua-5.1.5/etc/lua.pc
> +--- lua-5.1.5.orig/etc/lua.pc  2017-10-12 09:25:20.339277165 +0200
> ++++ lua-5.1.5/etc/lua.pc       2017-10-12 09:26:37.272796305 +0200
> +@@ -25,7 +25,7 @@ Name: Lua
> + Description: An Extensible Extension Language
> + Version: ${R}
> + Requires:
> +-Libs: -L${libdir} -llua -lm
> ++Libs: -L${libdir} -llua -lm @MYLIBS@
> + Cflags: -I${includedir}
> +
> + # (end of lua.pc)
> --
> 2.14.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
<div dir="ltr"><div><div><div><div><br></div>Jorg,<br><br></div>please look the patch <a href="http://patchwork.ozlabs.org/patch/804094/">http://patchwork.ozlabs.org/patch/804094/</a><br></div>which fix lua.pc for all version of Lua.<br><br></div>François<br><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-12 9:45 GMT+02:00 Jörg Krause <span dir="ltr">&lt;<a href="mailto:joerg.krause@embedded.rocks" target="_blank">joerg.krause@embedded.rocks</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This patch applies the fix added in commit<br>
8d845683e37640d33c186c0091ccce<wbr>6ae3ef0777 to Lua version 5.1.x.<br>
<br>
When Lua is linked with additional libraries, these libraries should go<br>
into the pkg-config file as well.<br>
<br>
Otherwise, linking swupdate with the lua library (version 5.1.x) fails:<br>
<br>
```<br>
/home/buildroot/output/host/<wbr>arm-buildroot-linux-gnueabihf/<wbr>sysroot/usr/lib/liblua.so: undefined reference to `dlopen&#39;<br>
/home/buildroot/output/host/<wbr>arm-buildroot-linux-gnueabihf/<wbr>sysroot/usr/lib/liblua.so: undefined reference to `dlclose&#39;<br>
/home/buildroot/output/host/<wbr>arm-buildroot-linux-gnueabihf/<wbr>sysroot/usr/lib/liblua.so: undefined reference to `dlerror&#39;<br>
/home/buildroot/output/host/<wbr>arm-buildroot-linux-gnueabihf/<wbr>sysroot/usr/lib/liblua.so: undefined reference to `dlsym&#39;<br>
```<br>
<br>
The build error was detected when building the package swupdate from<br>
upstream with Lua 5.1 compatibility support [1] enabled.<br>
<br>
[1] <a href="https://groups.google.com/forum/#%21topic/swupdate/cBvq27-zuvs" rel="noreferrer" target="_blank">https://groups.google.com/<wbr>forum/#!topic/swupdate/cBvq27-<wbr>zuvs</a><br>
<br>
Signed-off-by: Jörg Krause &lt;joerg.krause@embedded.rocks&gt;<br>
---<br>
 package/lua/5.1.5/0003-add-<wbr>MYLIBS-to-Libs-in-lua-pc.patch | 12 ++++++++++++<br>
 1 file changed, 12 insertions(+)<br>
 create mode 100644 package/lua/5.1.5/0003-add-<wbr>MYLIBS-to-Libs-in-lua-pc.patch<br>
<br>
diff --git a/package/lua/5.1.5/0003-add-<wbr>MYLIBS-to-Libs-in-lua-pc.patch b/package/lua/5.1.5/0003-add-<wbr>MYLIBS-to-Libs-in-lua-pc.patch<br>
new file mode 100644<br>
index 0000000000..8a5a0d85be<br>
--- /dev/null<br>
+++ b/package/lua/5.1.5/0003-add-<wbr>MYLIBS-to-Libs-in-lua-pc.patch<br>
@@ -0,0 +1,12 @@<br>
+diff -purN lua-5.1.5.orig/etc/lua.pc lua-5.1.5/etc/lua.pc<br>
+--- lua-5.1.5.orig/etc/lua.pc  2017-10-12 09:25:20.339277165 +0200<br>
++++ lua-5.1.5/etc/lua.pc       2017-10-12 09:26:37.272796305 +0200<br>
+@@ -25,7 +25,7 @@ Name: Lua<br>
+ Description: An Extensible Extension Language<br>
+ Version: ${R}<br>
+ Requires:<br>
+-Libs: -L${libdir} -llua -lm<br>
++Libs: -L${libdir} -llua -lm @MYLIBS@<br>
+ Cflags: -I${includedir}<br>
+<br>
+ # (end of lua.pc)<br>
<span class="gmail-HOEnZb"><font color="#888888">--<br>
2.14.2<br>
<br>
______________________________<wbr>_________________<br>
buildroot mailing list<br>
<a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
<a href="http://lists.busybox.net/mailman/listinfo/buildroot" rel="noreferrer" target="_blank">http://lists.busybox.net/<wbr>mailman/listinfo/buildroot</a></font></span></blockquote></div><br></div></div></div></div></div></div></div>
Thomas Petazzoni Oct. 12, 2017, 8:05 p.m. UTC | #2
Hello,

On Thu, 12 Oct 2017 09:45:18 +0200, Jörg Krause wrote:
> This patch applies the fix added in commit
> 8d845683e37640d33c186c0091ccce6ae3ef0777 to Lua version 5.1.x.
> 
> When Lua is linked with additional libraries, these libraries should go
> into the pkg-config file as well.
> 
> Otherwise, linking swupdate with the lua library (version 5.1.x) fails:
> 
> ```
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlopen'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlclose'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlerror'
> /home/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/liblua.so: undefined reference to `dlsym'
> ```
> 
> The build error was detected when building the package swupdate from
> upstream with Lua 5.1 compatibility support [1] enabled.
> 
> [1] https://groups.google.com/forum/#!topic/swupdate/cBvq27-zuvs
> 
> Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
> ---
>  package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch

I have merged the other patch proposed by François Perrad a while ago,
and marked your patch as Rejected.

Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch b/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch
new file mode 100644
index 0000000000..8a5a0d85be
--- /dev/null
+++ b/package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch
@@ -0,0 +1,12 @@ 
+diff -purN lua-5.1.5.orig/etc/lua.pc lua-5.1.5/etc/lua.pc
+--- lua-5.1.5.orig/etc/lua.pc	2017-10-12 09:25:20.339277165 +0200
++++ lua-5.1.5/etc/lua.pc	2017-10-12 09:26:37.272796305 +0200
+@@ -25,7 +25,7 @@ Name: Lua
+ Description: An Extensible Extension Language
+ Version: ${R}
+ Requires: 
+-Libs: -L${libdir} -llua -lm
++Libs: -L${libdir} -llua -lm @MYLIBS@
+ Cflags: -I${includedir}
+ 
+ # (end of lua.pc)