All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+
@ 2018-12-14  6:36 Jörg Krause
  2018-12-14 21:05 ` Thomas Petazzoni
  2018-12-16 21:50 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Jörg Krause @ 2018-12-14  6:36 UTC (permalink / raw)
  To: buildroot

luvi fails to run when it was build with CMake 3.12+:

```
[string "return require('init')(...)"]:1: module 'init' not found:
	no field package.preload['init']
	no file './init.lua'
	no file '/usr/share/luajit-2.0.5/init.lua'
	no file '/usr/local/share/lua/5.1/init.lua'
	no file '/usr/local/share/lua/5.1/init/init.lua'
	no file '/usr/share/lua/5.1/init.lua'
	no file '/usr/share/lua/5.1/init/init.lua'
	no file './init.so'
	no file '/usr/local/lib/lua/5.1/init.so'
	no file '/usr/lib/lua/5.1/init.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
```

Looking at link.txt for the luvi executable shows that `-rdynamic` is
not set anymore in CMake 3.12. This has the effect, that symbols are
missing in the `.dynsym` section in the binary.

The patch, sets `ENABLE_EXPORTS` to true in CMakeLists.txt to force setting
`-rdynamic` explicitly.

Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe

Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
 ...i-executable-needs-to-export-symbols.patch | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 package/luvi/0002-luvi-executable-needs-to-export-symbols.patch

diff --git a/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch b/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch
new file mode 100644
index 0000000000..74b6537f9b
--- /dev/null
+++ b/package/luvi/0002-luvi-executable-needs-to-export-symbols.patch
@@ -0,0 +1,53 @@
+From 1ea2c1e372ab59b9a633a51f0dcefc24328528f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Mon, 10 Sep 2018 08:18:38 +0200
+Subject: [PATCH] luvi executable needs to export symbols
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Using CMake 3.12 running luvi fails with:
+
+```
+[string "return require('init')(...)"]:1: module 'init' not found:
+	no field package.preload['init']
+	no file './init.lua'
+	no file '/usr/share/luajit-2.0.5/init.lua'
+	no file '/usr/local/share/lua/5.1/init.lua'
+	no file '/usr/local/share/lua/5.1/init/init.lua'
+	no file '/usr/share/lua/5.1/init.lua'
+	no file '/usr/share/lua/5.1/init/init.lua'
+	no file './init.so'
+	no file '/usr/local/lib/lua/5.1/init.so'
+	no file '/usr/lib/lua/5.1/init.so'
+	no file '/usr/local/lib/lua/5.1/loadall.so'
+```
+
+Looking at link.txt for the luvi executable shows that `-rdynamic` is
+not set anymore in CMake 3.12. This has the effect, that symbols are
+missing in the `.dynsym` section.
+
+Therefore, set `ENABLE_EXPORTS` to true which set `-rdynamic` explicitly.
+
+Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe
+
+Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e141f8e..8219d0b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -158,6 +158,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
+ endif()
+ 
+ target_link_libraries(luvi ${LUVI_LIBRARIES} ${EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
++set_target_properties(luvi PROPERTIES ENABLE_EXPORTS ON)
+ 
+ ###############################################################################
+ ## Installation Targets
+-- 
+2.19.1
+
-- 
2.20.0

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

* [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+
  2018-12-14  6:36 [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+ Jörg Krause
@ 2018-12-14 21:05 ` Thomas Petazzoni
  2018-12-16 21:50 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2018-12-14 21:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 14 Dec 2018 07:36:07 +0100, J?rg Krause wrote:
> luvi fails to run when it was build with CMake 3.12+:
> 
> ```
> [string "return require('init')(...)"]:1: module 'init' not found:
> 	no field package.preload['init']
> 	no file './init.lua'
> 	no file '/usr/share/luajit-2.0.5/init.lua'
> 	no file '/usr/local/share/lua/5.1/init.lua'
> 	no file '/usr/local/share/lua/5.1/init/init.lua'
> 	no file '/usr/share/lua/5.1/init.lua'
> 	no file '/usr/share/lua/5.1/init/init.lua'
> 	no file './init.so'
> 	no file '/usr/local/lib/lua/5.1/init.so'
> 	no file '/usr/lib/lua/5.1/init.so'
> 	no file '/usr/local/lib/lua/5.1/loadall.so'
> ```
> 
> Looking at link.txt for the luvi executable shows that `-rdynamic` is
> not set anymore in CMake 3.12. This has the effect, that symbols are
> missing in the `.dynsym` section in the binary.
> 
> The patch, sets `ENABLE_EXPORTS` to true in CMakeLists.txt to force setting
> `-rdynamic` explicitly.
> 
> Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe
> 
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> ---
>  ...i-executable-needs-to-export-symbols.patch | 53 +++++++++++++++++++
>  1 file changed, 53 insertions(+)
>  create mode 100644 package/luvi/0002-luvi-executable-needs-to-export-symbols.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+
  2018-12-14  6:36 [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+ Jörg Krause
  2018-12-14 21:05 ` Thomas Petazzoni
@ 2018-12-16 21:50 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2018-12-16 21:50 UTC (permalink / raw)
  To: buildroot

>>>>> "J?rg" == J?rg Krause <joerg.krause@embedded.rocks> writes:

 > luvi fails to run when it was build with CMake 3.12+:
 > ```
 > [string "return require('init')(...)"]:1: module 'init' not found:
 > 	no field package.preload['init']
 > 	no file './init.lua'
 > 	no file '/usr/share/luajit-2.0.5/init.lua'
 > 	no file '/usr/local/share/lua/5.1/init.lua'
 > 	no file '/usr/local/share/lua/5.1/init/init.lua'
 > 	no file '/usr/share/lua/5.1/init.lua'
 > 	no file '/usr/share/lua/5.1/init/init.lua'
 > 	no file './init.so'
 > 	no file '/usr/local/lib/lua/5.1/init.so'
 > 	no file '/usr/lib/lua/5.1/init.so'
 > 	no file '/usr/local/lib/lua/5.1/loadall.so'
 > ```

 > Looking at link.txt for the luvi executable shows that `-rdynamic` is
 > not set anymore in CMake 3.12. This has the effect, that symbols are
 > missing in the `.dynsym` section in the binary.

 > The patch, sets `ENABLE_EXPORTS` to true in CMakeLists.txt to force setting
 > `-rdynamic` explicitly.

 > Upstream status: b8781653dcb8815a3019a77baf4f3b7f7a255ebe

 > Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>

Committed to 2018.02.x, 2018.08.x and 2018.11.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2018-12-16 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14  6:36 [Buildroot] [PATCH] package/luvi: add upstream patch to fix runtime issue with CMake 3.12+ Jörg Krause
2018-12-14 21:05 ` Thomas Petazzoni
2018-12-16 21:50 ` Peter Korsgaard

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.