Skip to contentSkip to conversation

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

PATCH New Jörg Krause 3 participants 3 messages Oct 12, 2017

lore
Share & tools
lore
#0 lore raw

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

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

---
 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
package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch new file +12 -0
new file mode 100644
index 0000000000..8a5a0d85be
@@ -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)
Signature · 1 line
2.14.2
#1 lore raw

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

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 <[email protected]>:

Quoted 54 lines

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

---
 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

package/lua/5.1.5/0003-add-MYLIBS-to-Libs-in-lua-pc.patch new file +12 -1
new file mode 100644
index 0000000000..8a5a0d85be
@@ -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

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171012/4e8048a3/attachment.html>

#2 lore raw

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

In reply to Jörg Krause

Hello,

Quoted 18 lines · J?rg Krause

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.

Quoted 7 lines

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

---
 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

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