Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: bmarkus on July 26, 2010, 04:51:50 AM

Title: Update request - slang
Post by: bmarkus on July 26, 2010, 04:51:50 AM
Current slang.tcz (2.1.4) is more than one year old and was compiled on TC 2.x Latest upstream is 2.2.2 (December 2009). I kindly ask an update.  :)
Title: Re: Update request - slang
Post by: SvOlli on July 26, 2010, 02:55:38 PM
Thy wish is my command. ;)

I'm a bit puzzled though, since I already updated slang to 2.2.2 in March. I might have forgotten to submit it.

Anyway, the update has now been submitted, as well as an update for most and jed, which both depend on slang.

Greetings,
SvOlli
Title: Re: Update request - slang
Post by: bmarkus on July 27, 2010, 06:25:50 AM
SvOlli:

thanks for the fast update! In general it is OK, however there are some issues.

slang.tcz has these files:

Quote
usr/local/lib/libslang.so.2
usr/local/lib/libslang.so.2.2.2
usr/local/lib/pkgconfig/slang.pc
usr/local/lib/slang/v2/modules/fcntl-module.so
usr/local/lib/slang/v2/modules/fork-module.so
usr/local/lib/slang/v2/modules/iconv-module.so
usr/local/lib/slang/v2/modules/png-module.so
usr/local/lib/slang/v2/modules/rand-module.so
usr/local/lib/slang/v2/modules/select-module.so
usr/local/lib/slang/v2/modules/slsmg-module.so
usr/local/lib/slang/v2/modules/socket-module.so
usr/local/lib/slang/v2/modules/sysconf-module.so
usr/local/lib/slang/v2/modules/termios-module.so
usr/local/lib/slang/v2/modules/varray-module.so
usr/local/lib/slang/v2/modules/zlib-module.so

Right place for slang.pc is slang-dev.tcz as it is needed for developing against slang.

slang-dev.tcz content:

Quote
usr/local/include/slang.h
usr/local/include/slcurses.h

usr/local/lib/libslang.a
usr/local/lib/libslang.so
usr/local/share/doc/slang/v2/COPYING
usr/local/share/doc/slang/v2/changes.txt
usr/local/share/doc/slang/v2/cref.txt
usr/local/share/doc/slang/v2/cslang.txt
usr/local/share/doc/slang/v2/slang.txt
usr/local/share/doc/slang/v2/slangdoc.html
usr/local/share/doc/slang/v2/slangfun.txt
usr/local/share/doc/slsh/html/slshfun-1.html
usr/local/share/doc/slsh/html/slshfun-2.html
usr/local/share/doc/slsh/html/slshfun-3.html
usr/local/share/doc/slsh/html/slshfun-4.html
usr/local/share/doc/slsh/html/slshfun-5.html
usr/local/share/doc/slsh/html/slshfun-6.html
usr/local/share/doc/slsh/html/slshfun-7.html
usr/local/share/doc/slsh/html/slshfun-8.html
usr/local/share/doc/slsh/html/slshfun-9.html
usr/local/share/doc/slsh/html/slshfun.html


libslang.so must be in slang.tcz Proper location for header files is /usr/local/include/slang directory. Finally common agreement is to keep doc files in slang-doc.tcz

With these rearrangements it would be perfect :) !

Regards... Béla



Title: Re: Update request - slang
Post by: SvOlli on July 27, 2010, 05:38:35 PM
I'm working on the update right now. There are just a few questions left:

libslang.so must be in slang.tcz
Why? libslang.so will only be used during linking, and that's part of development. If you take a look at the elf header, it states that it looks for libslang.so.2.
Code: [Select]
$ objdump -x slsh
[...]
Dynamic Section:
  NEEDED               libslang.so.2
  NEEDED               libdl.so.2
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  RPATH                /usr/local/lib
[...]
Proper location for header files is /usr/local/include/slang directory.
I also like to question this as well. I can't remember any distribution where the slang includes are installed in an own directory, and I double-checked it with my debian server where both includes are put in /usr/include. Since there are only two files, I think I'd be breaking more than I'm gaining if I move the includes to an own directory.

With these rearrangements it would be perfect :) !
Your constructive comments are always welcome. :)
Title: Re: Update request - slang
Post by: Arslan S. on July 28, 2010, 02:53:41 AM
when slang.tcz is mounted libslang.so is a broken symlink if you put it in slang-dev instead of slang

Code: [Select]
tc@box:~$ ls -l /usr/local/lib/libslang.so
lrwxrwxrwx    1 root     root            47 Jul 28 09:46 /usr/local/lib/libslang.so -> /tmp/tcloop/slang-dev/usr/local/lib/libslang.so
tc@box:~$ ls -l /tmp/tcloop/slang-dev/usr/local/lib/libslang.so
lrwxrwxrwx    1 1000     staff           17 Jul 26 19:58 /tmp/tcloop/slang-dev/usr/local/lib/libslang.so -> libslang.so.2.2.2
tc@box:~$ find /tmp/tcloop/ -type f -name libslang.so.2.2.2
/tmp/tcloop/slang/usr/local/lib/libslang.so.2.2.2
Title: Re: Update request - slang
Post by: bmarkus on July 28, 2010, 03:46:53 AM
Quote
Why? libslang.so will only be used during linking, and that's part of development. If you take a look at the elf header, it states that it looks for libslang.so.2.

In a certain case it would be OK. However keep it in the run time extension.

Quote
I also like to question this as well. I can't remember any distribution where the slang includes are installed in an own directory, and I double-checked it with my debian server where both includes are put in /usr/include. Since there are only two files, I think I'd be breaking more than I'm gaining if I move the includes to an own directory.

Compiling midnight-commander against slang its config looks for slang.h in ...include/slang. As it is now configure script do not find it.

Title: Re: Update request - slang
Post by: SvOlli on July 28, 2010, 07:18:47 AM
Compiling midnight-commander against slang its config looks for slang.h in ...include/slang. As it is now configure script do not find it.
Hmmm... that's strange. jed and most look for the includes in both .../include and .../include/slang. So moving the includes would not break these two. But I'm still not happy with moving them. Another alternative would be a symlink "/usr/local/include/slang -> ." which would work for all cases. But that one's got more the taste of a workaround than a fix.

Anyway, the new version will be submitted this evening CET, assembled the way we found here as a consensus.
Title: Re: Update request - slang
Post by: SvOlli on July 28, 2010, 03:49:53 PM
I've done some research and imho mc is going wrong there. If you take a look in /usr/local/lib/pkgconfig and compare glib-2.0.pc and slang.pc, slang.pc states that the includes are in /usr/local/lib, as glib-2.0 states a different path for its includes. Plus all examples of slang go for an #include <slang.h>.

Because of this I've chosen to put the includes in /usr/local/include and add symlinks "/usr/local/include/slang/slang.h -> ../slang.h" and "/usr/local/include/slang/slcurses.h -> ../slcurses.h" as a symlink to a directory seems to be unsupported with squashfs, at least the symlink "slang -> ." just disappeared.

Submission is on it's way.
Title: Re: Update request - slang
Post by: Jason W on July 28, 2010, 06:09:29 PM
Debian and Arch both have their slang includes in /usr/include, same as our /usr/local/include.  And Arch does not use the configure switch "--with-slang-includes=/usr/include" in their mc build file.

I know we are not Arch or Debian, but slang.h in /usr/(local)/include seems pretty standard.  I am not on TC at the moment but I bet a pkgconfig file or something is at issue.
Title: Re: Update request - slang
Post by: Jason W on July 28, 2010, 08:51:54 PM
As a test I compiled mc with the slang(-dev).tcz built in march with only fixing the broken .so symlink.  Built with a simple "./configure --prefix=/usr/local --with-screen=slang" I did see the configure warning about a missing slang/slang.h but the Makefile reflected that the correct include directory was found:

From the resulting Makefile:
Code: [Select]
SLANG_CFLAGS = -I/usr/local/include 
SLANG_LIBS = -L/usr/local/lib -lslang

And MC built and ran fine, linking dynamically to slang once the .so symlink was fixed, linking statically otherwise. 

My opinion is that the includes are ok in /usr/local/include, but having symlinks to /usr/local/include/slang I don't think can hurt.
Title: Re: Update request - slang
Post by: ^thehatsrule^ on July 28, 2010, 11:48:48 PM
fwiw, MC does look for both, i.e. see HAVE_SLANG_SLANG_H
Title: Re: Update request - slang
Post by: bmarkus on July 29, 2010, 03:00:07 AM
guys, wasting too much time on a small issue :)

SvOlli: make extensions as you wish and default for slang, following TC packaging rules. Include location can be managed during MC build, so it is not critical.

Thanks gain! Béla