Readahead for HD Video Playback CIFS/NFS/FTP over Wi-Fi

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.

Readahead for HD Video Playback CIFS/NFS/FTP over Wi-Fi

Postby wannaseek » Sat Jan 30, 2010 9:17 pm

I think I have found an existing solution with no need of kernel/firmware modification for video lagging that occurs at high bit rate scenes through wifi.

The size of the page cache is appropriate (I have measured about 200 MB with top) and caches the remote file system. I tested it in a following way:
- turned on the TV, the "cached" value in top was about 50 MB
- started to play a HD movie through CIFS, the "cached" value started to grow until free memory was available up to about 250 MB
- when the video started to lag, I pressed the rwd button, that made the lagging part played back properly because the data was in the page cache already

So the sole issue is that not enough readahead happens.

The following article describes how a FUSE module as a shim between the NFS mountpoint and the player can trigger readahead.
http://www.linuxjournal.com/article/9769

The read implementation of the FUSE module reads in what the application requested and the next 4MB of data. The extra data is just thrown away but the mere act of the FUSE module reading, the 4MB of extra data will remain in the page cache. (I have increased the buffer to 32 MB in the included code.)

The article recommends using FS-Cache but it is not needed in our case as the page cache has a satisfactory size and behaviour for file caching.

The only thing seems to be done, is to compile the nfs-fuse-readahead-shim.cpp class and the fuselagefs package to the TV's platform. (see below)

I tried it but I have stucked with building the cross-compiler toolchain on cygwin. And I have to admit not having the necessary experience for cross compilation.

I would appritiate if someone could compile and upload it or assist me how to compile.

The solution can be also included in the All Extensions Pack.

fuselagefs: http://sourceforge.net/project/showfile ... _id=225200

nfs-fuse-readahead-shim.cpp:
Code: Select all
#include <fuselagefs/fuselagefs.hh>
using namespace Fuselage;
using namespace Fuselage::Helpers;

#include <aio.h>
#include <errno.h>

#include <string>
#include <iostream>
using namespace std;
...
class CustomFilesystem
 :
 public Delegatefs
{
 typedef Delegatefs _Base;
 off_t m_oldOffset;
 off_t m_startNextAIOOffset;
 enum
 {
   aio_buffer_sz = 32 * 1024 * 1024,
   aio_consume_window = aio_buffer_sz / 2,
   debug_readahread_aio = false
 };
 char aio_buffer[ aio_buffer_sz ];
   
 void schedule_readahread_aio( int fd,
     off_t offset, bool forceNewReadAHead )
 {
   if( m_startNextAIOOffset <= offset
        || forceNewReadAHead )
   {
     cerr << "Starting an async read request"
          << " at offset:" << offset << endl;

     ssize_t retval; ssize_t nbytes;
     struct aiocb arg;
     bzero( &arg, sizeof (struct aiocb));
     arg.aio_fildes = fd;
     arg.aio_offset = offset;
     arg.aio_buf = (void *) aio_buffer;
     arg.aio_nbytes = aio_buffer_sz;
     arg.aio_sigevent.sigev_notify = SIGEV_NONE;
 
     retval = aio_read( &arg );
     if( retval < 0 )
       cerr << "error starting aio request!"
            << endl;
 
     m_startNextAIOOffset = offset
        + aio_consume_window;

     if( debug_readahread_aio )
     {
       while ( (retval = aio_error( &arg ) )
           == EINPROGRESS )
       {}
       cerr << "aio_return():"
            << aio_return( &arg )
             << endl;
      }
    }
 }
   
public:

 CustomFilesystem()
 :
 _Base(),
 m_startNextAIOOffset( 0 ),
 m_oldOffset( -1 )
 {
 }
   
 virtual int fs_read( const char *path,
    char *buf, size_t size,
    off_t offset, struct fuse_file_info *fi)
 {
   cerr << "fs_read() offset:" << offset
        << " sz:" << size << endl;
   int fd = fi->fh;

   bool forceNewReadAHead = false;
   if( (offset - size) != m_oldOffset )
   {
     cerr << "possible seek() between read()s!"
          << endl;
     forceNewReadAHead = true;
     aio_cancel( fd, 0 );
   }
   schedule_readahread_aio( fd, offset,
                            forceNewReadAHead );
   m_oldOffset = offset;
   return _Base::fs_read( path, buf,
                          size, offset, fi );
 }
};


Make file:
Code: Select all
nfs-fuse-readahead-shim: nfs-fuse-readahead-shim.cpp
   g++ nfs-fuse-readahead-shim.cpp \
          -o nfs-fuse-readahead-shim \
          -D_FILE_OFFSET_BITS=64 -lfuselagefs
Last edited by wannaseek on Wed Mar 03, 2010 12:42 pm, edited 3 times in total.
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby erdem_ua » Sun Jan 31, 2010 11:52 pm

You can easily create toolchain with SamyGO OpenEmbedded SVN repo.
Sorry but I don't compile kernel modules too often :)
Might be arris could compile this code :D
User avatar
erdem_ua
SamyGO Admin
 
Posts: 2957
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby wannaseek » Mon Feb 01, 2010 11:13 am

Thank you for the hint. I will try with SamyGO OpenEmbedded SVN.

Actually this one is not a kernel module. It is a user space application as the name FUSE (Filesystem in Userspace)
also depicts it. ;)

Just for the record I've got stucked during building the cross-compiling toolchain on cygwin as described in the wiki when executing ./mkglibc.sh. at the errors below but now I will try OpenEmbedded on cygwin.

Code: Select all
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `process
_envvars':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/rtld.c:2715: undefined reference to `_
_open'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/rtld.c:2687: undefined reference to `_
_access'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `dl_main
':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/rtld.c:1640: undefined reference to `_
_access'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_dis
cover_osversion':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../sysdeps/unix/sysv/linux/dl-osinfo.h
:96: undefined reference to `__open'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../sysdeps/unix/sysv/linux/dl-osinfo.h
:99: undefined reference to `__read'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../sysdeps/unix/sysv/linux/dl-osinfo.h
:100: undefined reference to `__close'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `lose':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:810: undefined reference to
`__close'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `open_ve
rify':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1629: undefined reference to
 `__open'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1641: undefined reference to
 `__libc_read'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1739: undefined reference to
 `__lseek'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1740: undefined reference to
 `__libc_read'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1757: undefined reference to
 `__lseek'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1758: undefined reference to
 `__libc_read'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1774: undefined reference to
 `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1702: undefined reference to
 `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `open_pa
th':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1864: undefined reference to
 `__GI___xstat64'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1884: undefined reference to
 `__GI___fxstat64'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1890: undefined reference to
 `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1911: undefined reference to
 `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1930: undefined reference to
 `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_map
_object_from_fd':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:861: undefined reference to
`__GI___fxstat64'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:877: undefined reference to
`__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:1430: undefined reference to
 `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:994: undefined reference to
`__lseek'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:995: undefined reference to
`__libc_read'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:906: undefined reference to
`__close'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `elf_get
_dynamic_info':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dynamic-link.h:169: undefined referenc
e to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_map
_object':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:2138: undefined reference to
 `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-load.c:2202: undefined reference to
 `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_new
_object':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-object.c:172: undefined reference t
o `__getcwd'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-object.c:188: undefined reference t
o `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_pro
tect_relro':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-reloc.c:343: undefined reference to
 `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `elf_mac
hine_rela':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../ports/sysdeps/arm/dl-machine.h:540:
 undefined reference to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_map
_object_deps':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-deps.c:328: undefined reference to
`rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_sys
dep_read_whole_file':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-misc.c:58: undefined reference to `
__open'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-misc.c:61: undefined reference to `
__GI___fxstat64'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-misc.c:79: undefined reference to `
__close'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_sta
rt_profile':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:287: undefined reference
to `__open'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:304: undefined reference
to `__GI___fxstat64'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:298: undefined reference
to `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:335: undefined reference
to `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:320: undefined reference
to `__lseek'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:327: undefined reference
to `__libc_write'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:355: undefined reference
to `__close'
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-profile.c:393: undefined reference
to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `*__GI__
dl_make_stack_executable':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../sysdeps/unix/sysv/linux/dl-execstac
k.c:66: undefined reference to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_dl_sys
dep_start':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../elf/dl-sysdep.c:237: undefined refe
rence to `__libc_check_standard_fds'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `__strto
ul_internal':
/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/dl-minimal.c:251: undefined reference
to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `__brk':

/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf/../ports/sysdeps/unix/sysv/linux/arm/b
rk.c:32: undefined reference to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `mmap':
raise.c:(.text+0x14eec): undefined reference to `__syscall_error'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `__local
_syscall_error':
raise.c:(.text+0x14f0c): undefined reference to `rtld_errno'
raise.c:(.text+0x14f40): undefined reference to `rtld_errno'
raise.c:(.text+0x14f80): undefined reference to `rtld_errno'
raise.c:(.text+0x14fc0): undefined reference to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os: In function `_exit':

/tmp/arm-tools/src/glibc-2.5.90-9.0.9/posix/../sysdeps/unix/sysv/linux/_exit.c:3
5: undefined reference to `rtld_errno'
/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/librtld.os:/tmp/arm-tools/src/gl
ibc-2.5.90-9.0.9/signal/../ports/sysdeps/unix/sysv/linux/arm/sigaction.c:94: mor
e undefined references to `rtld_errno' follow
collect2: ld returned 1 exit status
make[2]: *** [/tmp/arm-tools/src/BUILD/glibc-2.5.90-9.0.9/elf/ld.so] Error 1
make[2]: Leaving directory `/tmp/arm-tools/src/glibc-2.5.90-9.0.9/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/tmp/arm-tools/src/glibc-2.5.90-9.0.9'
make: *** [install] Error 2
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby marcelru » Mon Feb 01, 2010 9:29 pm

[quote][Just for the record I've got stucked during building the cross-compiling toolchain on cygwin as described in the wiki when executing ./mkglibc.sh. at the errors below but now I will try OpenEmbedded on cygwin/quote]

Hi wannaseek,

That's where I got stuck too. It has to do with some bits of cygwin not being capable of handling weak objects properly. Haven't figured out yet how to solve this. It's not very high on my priority list, since I never touch a windows box unless I really have to.
Maybe if we use the glibc as built on another platform, this cygwin problem could be resolved. I have a working toolchain on Linux x86_64. (built with the same scripts, BTW). So if you're interested, I could send you a bunch of shared libraries (glibc and family). Building the gcc stage 2 afterwards might be straightforward.

On the other hand, if you get the OpenEmbedded version working, we could write that build process on the wiki, and forget about the samsung toolchain for cygwin.

Then the fuse build. I downloaded the fuse package source, configuration is OK until it tries to find libpopt. I haven't searched further yet, but with a little "luck" we need to build a bunch of libraries for ARM first before we can actually build the fuse package.

grtz,

marcelr
marcelru
Official SamyGO Developer
 
Posts: 171
Joined: Thu Oct 01, 2009 7:27 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby wannaseek » Wed Feb 03, 2010 1:11 am

openembedded on cygwin says after a while when running bitbake:
Code: Select all
In file included from gz_open.c:30:
libbb.h:59: error: conflicting types for ‘socklen_t’
/usr/include/cygwin/socket.h:23: error: previous declaration of ‘socklen_t’ was here
make[2]: *** [libbb_la-gz_open.lo] Error 1
make[2]: Leaving directory `/home/samygo-svn/build/tmp/work/ipkg-native-0.99.163-r1/ipkg-0.99.163/libbb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/samygo-svn/build/tmp/work/ipkg-native-0.99.163-r1/ipkg-0.99.163'
make: *** [all] Error 2
FATAL: oe_runmake failed

I will try wubi...
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby wannaseek » Fri Feb 05, 2010 1:27 pm

Now I have a successfully built toolchain on Wubi (ubuntu 9.10).
I have also downloaded the sources of popt-1.15 (libpopt). Now I try to compile fuselagefs.
The current issue is that I do not know how to tell to the configure script of fuselagefs where the libpopt sources are located. I can specify the location of FUSE by setting the pkg_config_path but that does not work for libpopt sources...
Could somebody send me an example how the location of libraries should be told to the "./configure" script normally?
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby arris69 » Fri Feb 05, 2010 9:42 pm

wannaseek wrote:Now I have a successfully built toolchain on Wubi (ubuntu 9.10).
I have also downloaded the sources of popt-1.15 (libpopt). Now I try to compile fuselagefs.
The current issue is that I do not know how to tell to the configure script of fuselagefs where the libpopt sources are located. I can specify the location of FUSE by setting the pkg_config_path but that does not work for libpopt sources...
Could somebody send me an example how the location of libraries should be told to the "./configure" script normally?


--libdir=

but if configure won't find essential libraries may it is better not to use the software or your system setup is copletly wrong, however it is something new for testing in samygo svn branch

hth
arris
User avatar
arris69
SamyGO Moderator
 
Posts: 1613
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby wannaseek » Sat Feb 06, 2010 9:52 am

Thanks for the help. I recognized that I was using the openembedded directory structure in a completely wrong way.
Now I put all sources into the build/tmp/work directory. And call the ./configure with --prefix= and execute make with DESTDIR=build/tmp/staging/arm-linux-gnueabi.
This way I was able to build fuse, popt and configure fusalage. But now when I try to make fuselage, I get:
Code: Select all
arm-linux-gnueabi-g++ -shared -nostdlib /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crti.o /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/crtbeginS.o  .libs/fuselagefs.o  -Wl,--rpath -Wl,/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -Wl,--rpath -Wl,/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -L/lib /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libfuse.so -lrt -ldl /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libpopt.so -L/home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0 -L/home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libstdc++.so -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/arm-linux-gnueabi/libstdc++-v3/src -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/arm-linux-gnueabi/libstdc++-v3/src/.libs -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/./gcc -L/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/bin -L/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -lm -lc -lgcc_s /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/crtendS.o /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crtn.o  -pthread -Wl,-soname -Wl,libfuselagefs.so.0 -o .libs/libfuselagefs.so.0.0.0
/lib/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [libfuselagefs.la] Error 1


What can cause this?
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby arris69 » Sat Feb 06, 2010 11:29 am

wannaseek wrote:Thanks for the help. I recognized that I was using the openembedded directory structure in a completely wrong way.
Now I put all sources into the build/tmp/work directory. And call the ./configure with --prefix= and execute make with DESTDIR=build/tmp/staging/arm-linux-gnueabi.
This way I was able to build fuse, popt and configure fusalage. But now when I try to make fuselage, I get:
Code: Select all
arm-linux-gnueabi-g++ -shared -nostdlib /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crti.o /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/crtbeginS.o  .libs/fuselagefs.o  -Wl,--rpath -Wl,/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -Wl,--rpath -Wl,/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -L/lib /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libfuse.so -lrt -ldl /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libpopt.so -L/home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0 -L/home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib /home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib/libstdc++.so -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/arm-linux-gnueabi/libstdc++-v3/src -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/arm-linux-gnueabi/libstdc++-v3/src/.libs -L/home/samygo-svn/build/tmp/work/gcc-cross-4.2.0-4.0.9-r1/gcc-4.2.0-4.0.9/build.x86_64-linux.arm-linux-gnueabi/./gcc -L/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/bin -L/home/samygo-svn/build/tmp/cross/arm-linux-gnueabi/lib -lm -lc -lgcc_s /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/crtendS.o /home/samygo-svn/build/tmp/cross/lib/gcc/arm-linux-gnueabi/4.2.0/../../../../arm-linux-gnueabi/lib/crtn.o  -pthread -Wl,-soname -Wl,libfuselagefs.so.0 -o .libs/libfuselagefs.so.0.0.0
/lib/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[2]: *** [libfuselagefs.la] Error 1


What can cause this?


you try to link against your hosts libc, -L/lib should never appear in your linking path.
for openembedded i suggest to create .bb files for your packages or use the devshell task

hth
arris

compile sample in .bb file
Code: Select all
do_compile(){
        ${CXX} ${CXXFLAGS} ${LDFLAGS} -o your_prog your_progsource.cpp
}
User avatar
arris69
SamyGO Moderator
 
Posts: 1613
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)

Re: Prebuffering for HD Video Playback CIFS/NFS - Help needed!

Postby wannaseek » Sat Feb 06, 2010 5:13 pm

Thanks again for your help. I have started the devshell and recompiled everything. Actually the /lib came from the fuse.pc (package config) file, I have manually fixed that by adding the right prefix.
Finally I could compile anything I need.
I have an executable and some .so-s. I will copy them to the TV via scp.
However I am not sure what should be exactly the right location? Any help would be appreciated.
wannaseek
 
Posts: 46
Joined: Thu Jan 21, 2010 9:46 am

Next

Return to [B] Software

Who is online

Users browsing this forum: No registered users and 3 guests