Skip to contentSkip to conversation

slang: fix linking issue

PATCH New Romain Naour 2 participants 5 messages Mar 27, 2014 – Mar 29, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 slang: fix linking issue

The installation location of the slang library does not take into account the DESTDIR directory. So SLANG_INST_LIB is initialized with -L/usr/lib/ and slang may be linked with host's libdl.so (if any) Therefore, we have to pass correct installation paths.

Fixes:
http://autobuild.buildroot.net/results/df4/df435d9cebbdc84b3581ba258b618123570dde8b/

---
 package/slang/slang.mk | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
package/slang/slang.mk +17 -0
index d519eca..38f0b6f 100644
@@ -13,4 +13,21 @@ SLANG_LICENSE_FILES = COPYING
 SLANG_INSTALL_STAGING = YES
 SLANG_MAKE = $(MAKE1)
 
+# The installation location of the slang library
+# does not take into account the DESTDIR directory.
+# So SLANG_INST_LIB is initialized with -L/usr/lib/
+# and slang may be linked with host's libdl.so (if any)
+# Therefore, we have to pass correct installation paths.
+SLANG_INSTALL_STAGING_OPT = \
+	prefix=$(STAGING_DIR)/usr \
+	exec_prefix=$(STAGING_DIR)/usr \
+	DESTDIR=$(STAGING_DIR) \
+	install
+
+SLANG_INSTALL_TARGET_OPT = \
+	prefix=$(STAGING_DIR)/usr \
+	exec_prefix=$(STAGING_DIR)/usr \
+	DESTDIR=$(TARGET_DIR) \
+	install
+
 $(eval $(autotools-package))
Signature · 1 line
1.9.0
#1 lore raw

PATCH 2/2 slang: add ncurses optional dependency

Ncurses check need to be disabled if ncurses package is not selected.
If we don't do that, host's ncurses5-config may be used by configure script.

---
Note: others optional dependencies may be missing
(pcre oniguruma png z iconv)

 package/slang/slang.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/slang/slang.mk +6 -0
index 38f0b6f..2006c71 100644
@@ -13,6 +13,12 @@ SLANG_LICENSE_FILES = COPYING
 SLANG_INSTALL_STAGING = YES
 SLANG_MAKE = $(MAKE1)
 
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+	SLANG_DEPENDENCIES = ncurses
+else
+	SLANG_CONF_OPT = ac_cv_path_nc5config=no
+endif
+
 # The installation location of the slang library
 # does not take into account the DESTDIR directory.
 # So SLANG_INST_LIB is initialized with -L/usr/lib/
Signature · 1 line
1.9.0
#2 lore raw

PATCH 2/2 slang: add ncurses optional dependency

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Ncurses check need to be disabled if ncurses package is not selected.
If we don't do that, host's ncurses5-config may be used by configure script.

Committed, thanks.

Quoted 2 lines

Note: others optional dependencies may be missing
(pcre oniguruma png z iconv)

Care to cook up a patch for those?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/2 slang: add ncurses optional dependency

Hi Peter,

Le 28/03/2014 09:56, Peter Korsgaard a ?crit :

Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Ncurses check need to be disabled if ncurses package is not selected.
If we don't do that, host's ncurses5-config may be used by configure script.

Quoted 9 lines
Quoted 1 line

Committed, thanks.

Quoted 2 lines

Note: others optional dependencies may be missing
(pcre oniguruma png z iconv)

Care to cook up a patch for those?

Sorry, I had notime to rework on this patch yesterday. In the meantime Gustavo Zacarias added a patch for slsh and added the missing dependencies.

Also, my patch for slang has broken the newt package. newt could not find the slang library.
http://autobuild.buildroot.net/results/553/5533328ec987f12d0b3dd81c430e960d3dc50503/build-end.log

Thanks to Gustavo the problem is gone.

Best regards,
Romain

#4 lore raw

PATCH 1/2 slang: fix linking issue

In reply to Romain Naour
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

The installation location of the slang library does not take into account the DESTDIR directory. So SLANG_INST_LIB is initialized with -L/usr/lib/ and slang may be linked with host's libdl.so (if any) Therefore, we have to pass correct installation paths.

Quoted 4 lines

Fixes:
http://autobuild.buildroot.net/results/df4/df435d9cebbdc84b3581ba258b618123570dde8b/

The real problem is that the slang build system gets confused and rebuilds slsh even though it has just built it in the build step (called slsh_exe for some reason though).

But ok, I tried fiddling a bit with Makefile.in, but also didn't manage to fix it - So committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard