[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Error compiling midnight commander
03-27-2010, 05:47 PM (This post was last modified: 03-28-2010 03:20 PM by Axa-ru.)
Post: #1
Question Error compiling midnight commander
I decided to port the last version midnight commander http://www.midnight-commander.org/
I'm trying to compile a slang-2.2.2:

Code:
$ wget ftp://ftp.ntua.gr/pub/lang/slang/slang/v2.2/slang-2.2.2.tar.gz
$ tar xvfz slang-2.2.2.tar.gz
$ cd slang-2.2.2
$ ./configure CC=mipsel-linux-gcc --host=mipsel-linux --build=i386 --prefix=/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir
$ make

At the assembly stage is given this error:
Code:
...
   ...
   ...
ibslang.so.2.2.2 created in /home/akhromov/Staff/slang-2.2.2/src/elfobjs.
The link libslang.so to libslang.so.2.2.2 was also created.

make[1]: Leaving directory `/home/akhromov/Staff/slang-2.2.2/src'
cd slsh; make all
make[1]: Entering directory `/home/akhromov/Staff/slang-2.2.2/slsh'
cp ../src/config.h .
mipsel-linux-gcc -c -g -O2   -I/home/akhromov/Staff/slang-2.2.2/src -DSLSH_CONF_DIR='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/etc"' -DSLSH_PATH='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  slsh.c
mipsel-linux-gcc -c -g -O2   -I/home/akhromov/Staff/slang-2.2.2/src -DSLSH_CONF_DIR='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/etc"' -DSLSH_PATH='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  -DUSE_GNU_READLINE=0 readline.c
mipsel-linux-gcc -g -O2   slsh.o readline.o -o slsh_exe -Wl,-export-dynamic -L/home/akhromov/Staff/slang-2.2.2/src/elfobjs -lslang  -ldl  -lm
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `logf'
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `__libc_enable_secure'
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `cosf'
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `sinf'
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `expf'
collect2: ld returned 1 exit status
make[1]: *** [slsh_exe] Error 1
make[1]: Leaving directory `/home/akhromov/Staff/slang-2.2.2/slsh'
make: *** [elf] Error 2

What advise?

my home network
Find all posts by this user
03-27-2010, 09:36 PM (This post was last modified: 03-27-2010 10:22 PM by nuke12.)
Post: #2
RE: Error compiling midnight commander
Sorry, not much help but I would have told you to download the compiled version that works but it is no longer there?

It worked on my A-110, before I moved my HD to the C-200.

I've suggested to the people in power here, they have a small upload/download section for things like this, but it seems to be a no-go. The URL for the file is now dead. Such a shame..... Sad

C-200, A-110 both playing from a DIY Linux Raid 5 server.

Remuxes, Captures and Transcodes done on a desktop running;
Win7, Intel i7 hexacore processor with 24 GB ram, WD VR OS drive and a WD Black 2 TB data drive.
Find all posts by this user
03-27-2010, 10:26 PM
Post: #3
RE: Error compiling midnight commander
(03-27-2010 09:36 PM)nuke12 Wrote:  I've suggested to the people in power here, they have small a upload/download section for things like this, but it seems to be a no-go. The URL for the file is now dead. Such a shame..... Sad

Hmm, I'll see if I can get the wiki to permit binary uploads. If that succeeds we'll probably have a size limitation and the usual policies (no spam, no unauthorized, no illegals etc.) but for small utilities and commands that shouldn't be an issue.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
03-27-2010, 10:41 PM (This post was last modified: 03-27-2010 10:42 PM by nuke12.)
Post: #4
RE: Error compiling midnight commander
(03-27-2010 10:26 PM)dc11ab Wrote:  Hmm, I'll see if I can get the wiki to permit binary uploads. If that succeeds we'll probably have a size limitation and the usual policies (no spam, no unauthorized, no illegals etc.) but for small utilities and commands that shouldn't be an issue.

That is more then fair. Many don't know how to put the app in CSI or have any real desire to learn how. It was mainly an app they made for themselves and were willing to share with others.

Please give us follow-ups when this is possible. Many thanks, for considering this.

C-200, A-110 both playing from a DIY Linux Raid 5 server.

Remuxes, Captures and Transcodes done on a desktop running;
Win7, Intel i7 hexacore processor with 24 GB ram, WD VR OS drive and a WD Black 2 TB data drive.
Find all posts by this user
03-27-2010, 10:54 PM (This post was last modified: 03-28-2010 04:55 AM by Axa-ru.)
Post: #5
RE: Error compiling midnight commander
(03-27-2010 09:36 PM)nuke12 Wrote:  Sorry, not much help but I would have told you to download the compiled version that works but it is no longer there?

Compiled version (http://www.networkedmediatank.com/showth...+commander), unfortunately, does not support UTF-8.

[Image: thumb_99675fa4.jpg]

my home network
Find all posts by this user
03-27-2010, 11:22 PM
Post: #6
RE: Error compiling midnight commander
(03-27-2010 10:54 PM)Axa-ru Wrote:  Compiled version

Great job!!!

C-200, A-110 both playing from a DIY Linux Raid 5 server.

Remuxes, Captures and Transcodes done on a desktop running;
Win7, Intel i7 hexacore processor with 24 GB ram, WD VR OS drive and a WD Black 2 TB data drive.
Find all posts by this user
03-28-2010, 06:47 PM (This post was last modified: 04-04-2010 05:46 PM by Axa-ru.)
Post: #7
RE: Error compiling midnight commander
Ok.
if before ". / configure" to set a system environment variable "export LIBS =- lm"
Code:
$ export LIBS=-lm
$ ./configure CC=mipsel-linux-gcc --host=mipsel-linux --build=i386 --prefix=/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir
$make
then link errors of mathematical functions disappear.

But still error "undefined reference to` __libc_enable_secure '":
Code:
.  .  .
   .  .  .
   .  .  .
rm -f /home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so.2.2.2
cd /home/akhromov/Staff/slang-2.2.2/src/elfobjs; mipsel-linux-gcc  -shared -Wl,-O1 -Wl,--version-script,/home/akhromov/Staff/slang-2.2.2/src/slang.ver -Wl,-soname,libslang.so.2 -o libslang.so.2.2.2 sltermin.o sldisply.o slutty.o slang.o slarray.o slclass.o slcmd.o slerr.o slgetkey.o slkeymap.o slmalloc.o slmath.o slmemchr.o slmemcmp.o slmemcpy.o slmemset.o slmisc.o slparse.o slprepr.o slregexp.o slrline.o slsearch.o slsmg.o slstd.o sltoken.o sltypes.o slxstrng.o slcurses.o slscroll.o slsignal.o slkeypad.o slerrno.o slstring.o slstruct.o slcmplex.o slarrfun.o slimport.o slpath.o slarith.o slassoc.o slcompat.o slposdir.o slstdio.o slproc.o sltime.o slstrops.o slbstr.o slpack.o slintall.o slistruc.o slposio.o slnspace.o slarrmis.o slospath.o slscanf.o sllower.o slupper.o slischar.o slutf8.o slwcwidth.o slwclut.o slcommon.o sllist.o slexcept.o slfpu.o slsig.o slboseos.o  -ldl -lm -lc
if [ libslang.so.2 != libslang.so.2.2.2 ]; then \
     cd /home/akhromov/Staff/slang-2.2.2/src/elfobjs; rm -f libslang.so.2; /bin/ln -sf libslang.so.2.2.2 libslang.so.2; \
   fi
cd /home/akhromov/Staff/slang-2.2.2/src/elfobjs; rm -f libslang.so; /bin/ln -sf libslang.so.2.2.2 libslang.so

libslang.so.2.2.2 created in /home/akhromov/Staff/slang-2.2.2/src/elfobjs.
The link libslang.so to libslang.so.2.2.2 was also created.

make[1]: Leaving directory `/home/akhromov/Staff/slang-2.2.2/src'
cd slsh; make all
make[1]: Entering directory `/home/akhromov/Staff/slang-2.2.2/slsh'
cp ../src/config.h .
mipsel-linux-gcc -c -g -O2   -I/home/akhromov/Staff/slang-2.2.2/src -DSLSH_CONF_DIR='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/etc"' -DSLSH_PATH='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  slsh.c
mipsel-linux-gcc -c -g -O2   -I/home/akhromov/Staff/slang-2.2.2/src -DSLSH_CONF_DIR='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/etc"' -DSLSH_PATH='"/home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  -DUSE_GNU_READLINE=0 readline.c
mipsel-linux-gcc -g -O2   slsh.o readline.o -o slsh_exe -Wl,-export-dynamic -L/home/akhromov/Staff/slang-2.2.2/src/elfobjs -lslang  -ldl -lm -lm
/home/akhromov/Staff/slang-2.2.2/src/elfobjs/libslang.so: undefined reference to `__libc_enable_secure'
collect2: ld returned 1 exit status
make[1]: *** [slsh_exe] Error 1
make[1]: Leaving directory `/home/akhromov/Staff/slang-2.2.2/slsh'
make: *** [elf] Error 2

I found a patch that fixes this:
- patch to make slang compile under uclibc

Code:
src/slcommon.c

      diff -ur slang-2.1.3.orig/src/slcommon.c slang-2.1.3/src/slcommon.c

      old    new    
      191   191      return p;
      192   192   }
      193   193  
      194         #if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2)
            194   #if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !defined(__UCLIBC__)
      195   195   extern int __libc_enable_secure;
      196   196   # define HAVE___LIBC_ENABLE_SECURE 1
      197   197   #endif

I have successfully compiled all the libraries.
But in assembling mc checked slang library with error:

Code:
. . .
   . . .
checking for SLang_init_tty in -lslang... yes
checking SLANG-headers in /usr/local ...
checking for slang.h... yes
checking if S-Lang uses termcap... (cached) no
checking for SLang_init_tty in -lslang... yes
checking for S-Lang version 2.0 or newer... no
configure: error: S-Lang library version 2.0 or newer not found

but
Code:
cat /home/akhromov/Staff/smp86xx_toolchain.20080505/build_mipsel_nofpu/staging_dir/include/slang.h
.....
#define SLANG_VERSION 20202
#define SLANG_VERSION_STRING "2.2.2"
/* #ifdef __DATE__ */
/* # define SLANG_VERSION_STRING SLANG_VERSION_STRING0 " " __DATE__ */
/* #else */
/* # define SLANG_VERSION_STRING SLANG_VERSION_STRING0 */
/* #endif */
/*{{{ System Dependent Macros and Typedefs */
....

any suggestions?

my home network
Find all posts by this user
04-04-2010, 11:13 AM
Post: #8
RE: Error compiling midnight commander
I built a midnight commander successfully.

[Image: mc-nmt.jpg]

But there is a problem with the locale.

[Image: mc-nmt.jpg]

For correct display of national character midnight commander uses the locale setting.
How to enable locale in nmt?

my home network
Find all posts by this user
03-13-2011, 10:05 AM
Post: #9
RE: Error compiling midnight commander
Any news about MC ? Can you share your binary file.
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Help with Server Timeout Error running a script hindibuff 0 1,681 03-29-2011 06:21 AM
Last Post: hindibuff
  Compiling with nmt toolchain ssuukk 18 4,699 09-26-2010 06:09 AM
Last Post: ssuukk
  Tracker returned error: I'm sorry but 1.7.5.0 transmission is not permitted to be us silvio_zg 1 2,438 09-14-2010 09:54 PM
Last Post: Freeq
  HD Homerun Client - could not play error wickchucker 0 1,110 08-11-2010 02:41 AM
Last Post: wickchucker
  Cross compiling Heyu Vincefp 0 1,197 08-04-2010 03:52 PM
Last Post: Vincefp
  Compiling binaries for PCH kruuth 1 1,543 05-07-2010 09:40 PM
Last Post: dc11ab
  Error while trying to downloading installation files. siblektis 1 1,548 04-17-2010 10:15 PM
Last Post: siblektis
  keep getting error trying to install manual from CSI (shuffleplay) opel4ever 8 3,378 01-13-2010 11:50 AM
Last Post: opel4ever
  uclibc error when running simple compiled program b.lefoll 5 4,710 10-11-2009 10:27 PM
Last Post: artn3r
  Cross compiling the unix screen commando artn3r 5 4,043 10-11-2009 10:19 PM
Last Post: artn3r

Forum Jump: