Monday, January 4, 2010

[nslu2-linux] Compiling libtorrent in QNAP 509 Pro

 

Hello 

I am a n00b with linux and just trying to have some understanding of how things work. Now, I know rTorrent is compiled and already available here, but I wanted to try compiling it myself.

Now here's the approach I took with IPKG

1) ipkg update
2) ipkg install gcc
3) ipkg install pkgconfig
4) ipkg install openssl-dev

5) ipkg install libsigc++
6) I used this code for libsigc++.pc in pkgconfig folder to fix an error that sigc++2.0.pc was missing

prefix=/opt
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libsigc++ 2
Description: Typesafe signal and callback system for C++
Version: 2.2.2
Requires:
Libs: -L${libdir} -lsigc-2.0
Cflags: -I${includedir}


Here's my IPKG list_installed command:

[~/libtorrent-0.11.5/libtorrent-0.11.5] # ipkg list_installed
binutils - 2.17-2 - The GNU assembler and linker and related tools
gcc - 4.2.1-5 - The GNU Compiler Collection.
grep - 2.5.3-1 - Global regular expression parser
libc-dev - 2.6.1-5 - libc development files.
libcurl - 7.19.7-1 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libnsl - 2.6.1-4 - Network Services Library
libsigc++ - 2.2.3-1 - libsigc++ implements a typesafe callback system for standard C++.
libstdc++ - 6.0.9-6 - Standard C++ library, needed for dynamically linked C++ programs
libtorrent - 0.12.5-2 -
libxml2 - 2.7.6-1 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
ncurses - 5.7-1 - NCurses libraries
ncursesw - 5.7-1 - NCurses libraries with wide char support.
openssl - 0.9.8l-1 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
pcre - 8.00-1 - Perl-compatible regular expression library
pkgconfig - 0.15.0-1 - Package configuration tool
rtorrent - 0.8.5-1 -
screen - 4.0.3-2 - A screen manager that supports multiple logins on single terminal
termcap - 1.3.1-2 - Terminal emulation library
unrar - 3.9.6-1 - unrar is an application that can decompress files and archives created using the RAR compression scheme
xmlrpc-c - 1.11.00-3 - A library providing modular implementation of XML-RPC for C and C++.
zlib - 1.2.3-3 - zlib is a library implementing the 'deflate' compression system.
Successfully terminated.
[~/libtorrent-0.11.5/libtorrent-0.11.5] #




Now, I get this error when I configure and make:



[~/libtorrent-0.12.6/libtorrent-0.12.6] # ./configure && make
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... none
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /opt/bin/grep
checking for egrep... /opt/bin/grep -E
checking for fgrep... /opt/bin/grep -F
checking for ld used by gcc... /share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld
checking if the linker (/share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/bin/nm -B
checking the name lister (/opt/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 32768
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... ./configure: line 7610: diff: command not found
no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) none
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld
checking if the linker (/share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld) is GNU ld... yes
checking whether the g++ linker (/share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/share/MD0_DATA/.qpkg/Optware/i686-unknown-linux-gnu/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking the byte alignment... none needed
checking for user-defined CXXFLAGS... user-defined "-g -O2"
checking for TR1 support... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for epoll support... yes
checking size of long... 4
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/statfs.h usability... yes
checking sys/statfs.h presence... yes
checking for sys/statfs.h... yes
checking for statvfs... ok
checking if compiler supports __attribute__((visibility("default")))... yes
checking for pkg-config... /opt/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
checking for STUFF... yes
checking for madvise... yes
checking signedness of mincore parameter... unsigned
checking for proper overloaded template function disambiguation... yes
checking if compiler supports __attribute__((unused))... yes
configure: creating ./config.status
config.status: creating libtorrent.pc
awk: ./confUjMY9W/subs.awk:2: Unexpected token
config.status: error: could not create libtorrent.pc
[~/libtorrent-0.12.6/libtorrent-0.12.6] #




Can anyone explain what "awk:2: Unexpected token" means? I tried google, but no help so far ((

Here are config.status and config.log files in rar format:
http://rapidshare.com/files/329931009/pkgconfig_omdb.rar 

__._,_.___
.

__,_._,___

No comments:

Post a Comment