[Patch] NZBGet

linuxkasten

Aktives Mitglied
Mitglied seit
2 Feb 2009
Beiträge
891
Punkte für Reaktionen
0
Punkte
16
[EDIT] Programm lässt sich zwar kompilieren, bringt aber bei einem Testlauf (bei mir) sofort einen segfault -> nicht nutzbar [/EDIT]

Mit angehängtem Patch lässt sich NZBGet in Freetz (getestet mit Trunk Revision 5653) integrieren.
NZBGet is a command-line based binary newsgrabber for nzb files, written in C++. It supports client/server mode, automatic par-check/-repair and web-interface (via additional package). NZBGet requires low system resources and runs great on routers, NAS-devices and media players.
Anwendung:
Code:
# ins Freetz-Verzeichnis wechseln, dann
patch -p0 < /pfad/zum/patch/nzbget.patch.txt
Dann lässt sich nzbget bei den Packages unter unstable auswählen.

P.S.: binary only, d.h. kein WebFrontend und um die Konfiguration etc. muss man sich selbst kümmern.

Viel Spaß...
 

Anhänge

  • nzbget-files.tar.gz
    2.9 KB · Aufrufe: 18
  • nzbget.patch.txt
    15.9 KB · Aufrufe: 29
Zuletzt bearbeitet:
nzbget kann auch mit dem trunk 5645 (und mit meinen libs) compiliert werden:
Code:
~/myfreetz/freetz5645/freetz-trunk> file packages/target-mipsel_uClibc-0.9.29/nzbget-0.7.0/root/usr/bin/nzbget
packages/target-mipsel_uClibc-0.9.29/nzbget-0.7.0/root/usr/bin/nzbget: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), dynamically linked (uses shared libs), stripped
 
Ja, ich meinte nur, dass der Patch exakt auf Revision 5653 passt.
Leider habe ich zum Testen, ob es funktioniert immer nur die Hilfe vom Programm ausprobiert.
Jetzt, wo ich alles konfiguriert habe, bringt nzbget sofort einen segfault.

Laut ldd werden alle Libraries gefunden. aber ein strace lässt vermuten, dass libc und libgcc_s nicht gefunden werden:
Code:
strace  nzbget -c nzbget.conf file.nzb
execve("/usr/bin/nzbget", ["nzbget", "-c", "nzbget.conf", "file.nzb"], [/* 12 vars */]) = 0
old_mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
stat("/etc/ld-uClibc.so.cache", 0x7fca0998) = -1 ENOENT (No such file or directory)
open("/usr/lib/freetz/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=68708, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\2204\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 143360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
old_mmap(0x2aabe000, 49048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aabe000
old_mmap(0x2aad9000, 22440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0xb000) = 0x2aad9000
old_mmap(0x2aadf000, 6832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aadf000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libz.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=83028, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 \24\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 147456, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aae1000
old_mmap(0x2aae1000, 81172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aae1000
old_mmap(0x2ab04000, 3872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x13000) = 0x2ab04000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libm.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=104148, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 \25\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 163840, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab05000
old_mmap(0x2ab05000, 97636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ab05000
old_mmap(0x2ab2c000, 3920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x17000) = 0x2ab2c000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libxml2.so.2", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=1169480, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0`2\1\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 1236992, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab2d000
old_mmap(0x2ab2d000, 1160596, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ab2d000
old_mmap(0x2ac58000, 8924, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x11b000) = 0x2ac58000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libsigc-2.0.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=20936, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\36\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 86016, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac5b000
old_mmap(0x2ac5b000, 16748, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ac5b000
old_mmap(0x2ac6f000, 3308, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x4000) = 0x2ac6f000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libgnutls.so.26", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=537084, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\247\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 602112, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac70000
old_mmap(0x2ac70000, 517940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ac70000
old_mmap(0x2acff000, 15460, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x7f000) = 0x2acff000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libpar2.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=243856, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\240z\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 573440, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad03000
old_mmap(0x2ad03000, 221852, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ad03000
old_mmap(0x2ad49000, 21280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x36000) = 0x2ad49000
old_mmap(0x2ad4f000, 260448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ad4f000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libncurses.so.5", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=210488, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0@~\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 278528, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad8f000
old_mmap(0x2ad8f000, 200868, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ad8f000
old_mmap(0x2add0000, 8504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x31000) = 0x2add0000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libuClibc++.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=154148, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\254\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 221184, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2add3000
old_mmap(0x2add3000, 135004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2add3000
old_mmap(0x2ae04000, 17588, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x21000) = 0x2ae04000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\253\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 737280, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ae09000
old_mmap(0x2ae09000, 640964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2ae09000
old_mmap(0x2aeb5000, 8212, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x9c000) = 0x2aeb5000
old_mmap(0x2aeb8000, 18736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aeb8000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\307\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 245760, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aebd000
old_mmap(0x2aebd000, 176716, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aebd000
old_mmap(0x2aef8000, 3216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2b000) = 0x2aef8000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libgcrypt.so.11", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=340388, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p7\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 405504, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aef9000
old_mmap(0x2aef9000, 332628, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2aef9000
old_mmap(0x2af5a000, 7232, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x51000) = 0x2af5a000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=68708, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libz.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=83028, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libm.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=104148, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libuClibc++.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=154148, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libtasn1.so.3", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=67572, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\17\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af5c000
old_mmap(0x2af5c000, 64660, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2af5c000
old_mmap(0x2af6c000, 704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x10000) = 0x2af6c000
close(4)                                = 0
old_mmap(NULL, 248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaf000
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libz.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=83028, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcrypt.so.11", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=340388, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgpg-error.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=12672, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0P\7\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af6d000
old_mmap(0x2af6d000, 11380, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x2af6d000
old_mmap(0x2af7f000, 3300, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2000) = 0x2af7f000
close(4)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libsigc-2.0.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=20936, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libuClibc++.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=154148, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgpg-error.so.0", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=12672, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=180624, ...}) = 0
close(4)                                = 0
open("/usr/lib/freetz/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=693632, ...}) = 0
close(4)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22536, ...}) = 0
mprotect(0x2aad9000, 4096, PROT_READ)   = 0
mprotect(0x2aeb5000, 4096, PROT_READ)   = 0
mprotect(0x2aabc000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, 0x7fca0698)          = -1 ENOTTY (Inappropriate ioctl for device)
brk(0)                                  = 0x4ec000
brk(0x4ed000)                           = 0x4ed000
getpid()                                = 3791
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=716072144}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=716072144}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL, [RT_72 RT_75 RT_76 RT_78 RT_79 RT_86 RT_87 RT_88 RT_90 RT_92 RT_94], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac9980}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {SIG_DFL, [RT_72 RT_75 RT_76 RT_78 RT_79 RT_86 RT_87 RT_88 RT_90 RT_92 RT_94], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac98a0}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {SIG_DFL, [RT_72 RT_75 RT_76 RT_78 RT_79 RT_86 RT_87 RT_88 RT_90 RT_92 RT_94], SA_STACK|SA_INTERRUPT|0x2ac8ab4}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
getcwd("/var/media/ftp/uStor03/nzbget", 1024) = 30
brk(0x4ee000)                           = 0x4ee000
open("nzbget.conf", O_RDONLY)           = 4
ioctl(4, TIOCNXCL, 0x7fc9ff30)          = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x4ef000)                           = 0x4ef000
read(4, "# Sample configuration file for "..., 4096) = 4096
read(4, "value or value \"1000\" disable th"..., 4096) = 4096
read(4, "################################"..., 4096) = 4096
read(4, "se small values!\nTerminateTimeou"..., 4096) = 4096
read(4, ", info, warning, \n# error, debug"..., 4096) = 4096
read(4, "oes\n# not start repair-process. "..., 4096) = 4096
read(4, "zb-file;\n#  NZBPP_PARFILENAME  -"..., 4096) = 4096
read(4, "rs=one, ParCheck=no, ParRepair=y"..., 4096) = 4096
read(4, "yes\");\n# 3) Disable option <CrcC"..., 4096) = 720
read(4, "", 4096)                       = 0
close(4)                                = 0
stat("/var/media/ftp/uStor03/nzbget/dl", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault
 
Zuletzt bearbeitet:
Zum testen und vergleichen, evtl. statisch compilieren.

EDIT:
Bei mir will nzbget die "libstdc++.so.6".

Code:
/var/mod/root # [B]nzbget -h[/B]
[COLOR="Red"]nzbget: can't load library 'libstdc++.so.6'[/COLOR]

/var/mod/root # [B]ldd /usr/bin/nzbget[/B]
        libpthread.so.0 => /lib/libpthread.so.0 (0x2aabe000)
        libz.so.1 => /usr/lib/freetz/libz.so.1 (0x2aae2000)
        libm.so.0 => /lib/libm.so.0 (0x2ab05000)
        libxml2.so.2 => /usr/lib/freetz/libxml2.so.2 (0x2ab2f000)
        libsigc-2.0.so.0 => /usr/lib/freetz/libsigc-2.0.so.0 (0x2ac4e000)
        libssl.so.0.9.8 => /usr/lib/freetz/libssl.so.0.9.8 (0x2ac69000)
        libpar2.so.0 => /usr/lib/freetz/libpar2.so.0 (0x2acb5000)
        libuClibc++.so.0 => /usr/lib/freetz/libuClibc++.so.0 (0x2ad4c000)
        libc.so.0 => /lib/libc.so.0 (0x2ad84000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x2ae39000)
        libcrypto.so.0.9.8 => /usr/lib/freetz/libcrypto.so.0.9.8 (0x2ae57000)
        libdl.so.0 => /lib/libdl.so.0 (0x2af6c000)
        [COLOR="Red"]libstdc++.so.6 => not found[/COLOR]
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)

EDIT 2:
OK, der Grund ist der, ich habe die libpar2 nicht gepatcht.
 
Zuletzt bearbeitet:
Naja, letztendlich weiß ich nicht, worans liegt, die Libs findet er alle. (Habe mich vorhin getäuscht).
Vielleicht liegts an uClibc++. Funktionieren Exceptions mittlerweile?
 
uClibc++ exceptions do work since r4898 thanks to er13. See this ticket for details. I am using them for s3fslite.

Note: exceptions are not tested with uClibc-0.9.28 based boxes
 
Zuletzt bearbeitet:
Thank you. Because of this I thought, that uclibc-0.9.28 might be the reason. But I´ve tried a simple test programm
Code:
int main()
{
       try
	{
	       throw(5);
	}
	catch (int& i)
	{
	}
	return 0;
}
and it returned zero, meaning the execution was successful, right?
Maybe I´ll later try with newer uclibc version anyway.
 
and it returned zero, meaning the execution was successful, right?
Maybe I´ll later try with newer uclibc version anyway.
Seems right to me. Maybe add
Code:
return i;
to the exception handler to be sure.
Maybe you can update the exception ticket with your finding.
 
Entweder versuchst du mit ein paar printf dem Fehler auf die Spur zu kommen. Oder du verwendest gdb.

MfG Oliver
 
@Oliver: Gute Idee, hatte erstmal keine Ahnung was ich jetz mache...
Irgendwie findet bei mir mipsel-linux-g++-uc <iostream> nicht, wenn ich mipsel-linux-g++-uc test.cpp eingebe... Muss ich dem noch irgendwelche Pfade mitgeben?

@M66B: thanks, I´ll try this also.
 
Zuletzt bearbeitet:
Gibt doch den Pfad mal mit -I an. Wobei ich das nicht nachvollziehen kann.

Gruß
Oliver
 
Hallo,

bin gerade über diesen Thread gestolpert, da mich auch schon an nzbget erfolglos versuchte... Wird der Patch noch gepflegt bzw. gibt's eine aktuelle Version?

Für das mipsel Target kann man ja problemlos die Version von der Projekt-HP verwenden, für big endian gibt's die Version von MaxMustermann, welche (wenn ich recht sehe) nicht reparieren kann.

mfG.
 
Ich habe das mal an den aktuellen Trunk angepasst und etwas ergänzt, speziell um eine Option zum statischen Bauen des Programms. Das Ergebnis ist ähnlich wie das oben:
Sobald ich ncurses, ssl oder libpar2 dazu wähle, gibt es beim Starten einen SegFault :-(

Wie könnte ich das noch genauer eingrenzen?

Bei OpenWRT bauen sie das nur mit der stdlibc++, vermutlich deshalb??

Jörg
 

Anhänge

  • nzbget_libsigc_libpar2.patch.gz
    4.2 KB · Aufrufe: 14
Hallo,

danke für die Mühe. Da der Trunk bei mir nur in einer Rebootschleife endet, habe ich mal soeben den Patch auf das aktuelle Stable angewendet, einzig die Zeile

[ "$EXTERNAL_FREETZ_LIB_libpar2" == "y" ] && EXTERNAL_FILES+=" $LIBRARY_DIR/libpar2.so.0.0.1"

muss man manuell einfügen. Getestet habe ich es mit Moment aber noch nicht...

EDIT: TLS.cpp lässt sich nicht kompilieren, da es in openssl wohl eine Änderung gab (fehlendes #include?).
Was übrigens das Problem mit dem Reparieren angeht (anderer Thread), so fehlt evtl. im OpenWRT Binary der Patch aus Bug #8479 (openwrt)?

mfG.
 
Zuletzt bearbeitet:
Es gibt doch jetzt in Freetz die libstdc++
Dann könnte man es ja mit der versuchen, falls es mit uclibc++ wirklich nicht hinhaut.
 
Wie olistudent bereits schrieb, müsste man den Fehler entweder per zusätzlicher printfs einkreisen oder mit gdb debuggen.
Ich habe bisher versucht die aktuelle 0.8 Version von nzbget zu kompilieren, scheitere aber an meinen begrenzten Wissen über die Buildumgebung.
Mein Plan war es die notwendigen Pakete einfach per configure & make zu erstellen, ohne Integration als Freetzpaket. Leider lässt sich configure schon nicht davon abbringen includes & co. relativ zu /usr lesen, was zB. dazu führt, daß sich nzbget mit libpar2 nicht konfigurieren lässt. Desweiteren stolpert der Compiler über

mipsel-linux-uclibc/include/c++/4.4.6/mipsel-linux-uclibc/bits/ctype_base.h:45: error: expected ';' before '*' token

wenn man zB. ein #include <fstream> im Code hat.
 
Ich habe ähnliches versucht ;-).
Zum einen mal auf den Test-Zweig der 0.8-er Version zu gehen (aber das Ergebnis ist ein identischer Segfault).
Um mit gdb zu debuggen, müsste ich scheinbar auch alle Libraries entsprechend bauen, denn der Segfault kommt in der libc bei einem "strlen", und das habe ich noch nicht weiter verfolgt...

strace:
Code:
root@Speedport:/var/tmp# ./strace ./nzbget -c nzbget.conf hallo
execve("./nzbget", ["./nzbget", "-c", "nzbget.conf", "hallo"], [/* 209 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x2aaad000
open("/mod/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
[...]
open("/mod/lib/libc.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=693812, ...}) = 0
close(3)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=22660, ...}) = 0
mprotect(0x2aad9000, 4096, PROT_READ)   = 0
mprotect(0x2ae4f000, 4096, PROT_READ)   = 0
mprotect(0x2afd7000, 4096, PROT_READ)   = 0
mprotect(0x2aabc000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x4a6000
brk(0x4a7000)                           = 0x4a7000
getpid()                                = 2436
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=718941112}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=718941112}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|0x2ac91b0}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac90c4}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac89c4}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
getpid()                                = 2436
getrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=0}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|0x2ac91b0}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac90c4}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {SIG_DFL, [], SA_STACK|SA_INTERRUPT|SA_SIGINFO|0x2ac89c4}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
getcwd("/var/tmp", 1024)                = 9
brk(0x4a8000)                           = 0x4a8000
open("nzbget.conf", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, TIOCNXCL, 0x7ff91b10)          = -1 ENOTTY (Inappropriate ioctl for device)
brk(0x4a9000)                           = 0x4a9000
read(3, "$MAINDIR=/var/nzbg\nDestDir=${MAI"..., 4096) = 1304
read(3, "", 4096)                       = 0
close(3)                                = 0
stat64("/var/nzbg/dst", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
--- {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} (Segmentation fault) ---
+++ killed by SIGSEGV +++
Segmentation fault
root@Speedport:/var/tmp#

gdb:
Code:
root@Speedport:/var/tmp# ./gdb ./nzbget
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mipsel-linux"...
(gdb) run  -c nzbget.conf hallo
Starting program: /var/tmp/nzbget -c nzbget.conf hallo
warning: Cannot initialize thread debugging library: versions of libpthread and libthread_db do not match

Program received signal SIGSEGV, Segmentation fault.
0x2add60f0 in strlen () from /lib/libc.so.0
(gdb) bt full
#0  0x2add60f0 in strlen () from /lib/libc.so.0
No symbol table info available.
#1  0x00470408 in Util::ForceDirectories (szPath=0x0) at Util.cpp:279
	szParentPath = 0x4a7830 "/var/nzbg"
	p = 0x4a7839 ""
	szNormPath = 0x4a7818 "/var/nzbg/dst"
	iLen = 14
	buffer = {st_dev = 11, __pad1 = 0, __st_ino = 0, st_mode = 5016, st_nlink = 0, st_uid = 16877, st_gid = 2, st_rdev = 0, __pad2 = 0, st_size = 0, 
  st_blksize = 0, st_blocks = 2319282340788851738, st_atim = {tv_sec = 948851738, tv_nsec = 540000000}, st_mtim = {tv_sec = 948851738, tv_nsec = 540000000}, 
  st_ctim = {tv_sec = 4096, tv_nsec = 0}, st_ino = 0}
	bOK = true
#2  0x00000000 in ?? ()
No symbol table info available.
(gdb)
 
Ist denn in Util.cpp um die genannte Zeile nichts verdächtiges zu sehen?
 
Ich schau es mir nochmal an, konnte aber bisher (vielleicht aber auch nicht richtig geschaut) weder dort noch direkt folgend einen "verdächtigen" strlen Aufruf finden. In "ForceDirectories" sind zwar welche, aber die hatte ich zunächst ausgeschlossen, werde sie aber nochmal ins Visir nehmen.

Muss jetzt erstmal einen GDB ins Image hinein bauen, sonst kriege ich beim Debuggen Speicherprobleme....
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.