* [Buildroot] problem with new package partimage
@ 2010-12-08 17:28 Jomas Nash
2010-12-09 10:58 ` Jomas Nash
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jomas Nash @ 2010-12-08 17:28 UTC (permalink / raw)
To: buildroot
Hi everybody,
I tried to create a buildroot package of partimage (http://www.partimage.org
).
It is a backup/restore program for partitions.
After some patches I got it to compile under buildroot ( Latest 2010-11 ).
However, when I run partimage on my selfmade litle linux (intel i686) system
(kernel, buildroot, busybox, partimage (and dependencies))
the backup part works ok. But the restore fails.
When I run dmesg it gives:
[ 276.515102] partimage[1997]: segfault at 0 ip b77123ee sp bf928384 error
6 in libuClibc-0.9.31.so[b76e8000+3b000]
Has someone an idea how to solve this problem ?
Is it partimage related or uClibc related?
Any help will be apreciated.
Here's some background information:
1. When I restore the backup with a static version of partimage (Compiled on
a "normal" system with libc ) the restore works.
2. With the buildroot version of partimage at the point where a popup should
apear (just before the restore starts), the system freezes for a few minutes
and then crashes.
3. partimage needs slang. The buildroot has an old slang-mini. Can this
cause the problem?
4. I had to patch partimage to comile it under buildroot. Here is the patch
that make it
possible to compile partimage under buildroot. ( Large file and WChar should
be enabled in buildroot )
Here is the patch:
diff -rupN old/package/Config.in new/package/Config.in
--- old/package/Config.in 2010-12-03 21:19:04.000000000 +0100
+++ new/package/Config.in 2010-12-03 21:16:55.000000000 +0100
@@ -349,6 +349,7 @@ endmenu
endmenu
menu "Miscellaneous"
+source "package/partimage/Config.in"
source "package/ng-spice-rework/Config.in"
source "package/shared-mime-info/Config.in"
endmenu
diff -rupN old/package/partimage/Config.in new/package/partimage/Config.in
--- old/package/partimage/Config.in 1970-01-01 01:00:00.000000000 +0100
+++ new/package/partimage/Config.in 2010-12-03 21:16:55.000000000 +0100
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_PARTIMAGE
+ bool "partimage"
+ help
+ Backup program
+
diff -rupN old/package/partimage/partimage-0.6.9-john.patch
new/package/partimage/partimage-0.6.9-john.patch
--- old/package/partimage/partimage-0.6.9-john.patch 1970-01-01
01:00:00.000000000 +0100
+++ new/package/partimage/partimage-0.6.9-john.patch 2010-12-03
21:16:55.000000000 +0100
@@ -0,0 +1,90 @@
+diff -rupN partimage-0.6.9/configure partimage-0.6.9-patched/configure
+--- partimage-0.6.9/configure 2010-07-25 17:31:49.000000000 +0200
++++ partimage-0.6.9-patched/configure 2010-11-21 12:37:11.000000000
+0100
+@@ -18771,7 +18771,7 @@ if test "${ac_cv_func_setpgrp_void+set}"
+ $as_echo_n "(cached) " >&6
+ else
+ if test "$cross_compiling" = yes; then :
+- as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5
++ echo "cannot check setpgrp when cross compiling" "$LINENO" 5
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+diff -rupN partimage-0.6.9/src/client/gui_text.cpp
partimage-0.6.9-patched/src/client/gui_text.cpp
+--- partimage-0.6.9/src/client/gui_text.cpp 2010-07-25
17:30:31.000000000 +0200
++++ partimage-0.6.9-patched/src/client/gui_text.cpp 2010-11-21
12:38:57.000000000 +0100
+@@ -497,7 +497,7 @@ int CSavingWindow::create(const char *sz
+ m_labelStatsSpeed = newtLabel(1, 11, "");
+ m_labelStatsSpace = newtLabel(1, 12, "");
+
+- m_progressSaving = newtScale(1, 18, 70, 100);
++ m_progressSaving = newtScale(1, 18, 70, 100, 0);
+ m_labelPercent = newtLabel(72, 18, "");
+
+ m_formMain = newtForm(NULL, NULL, 0);
+@@ -760,7 +760,7 @@ int CRestoringWindow::create(char *szDev
+ m_labelStatsSpeed = newtLabel(1, 11, "");
+ m_labelStatsSpace = newtLabel(1, 12, "");
+
+- m_progressRestoring = newtScale(1, 18, 70, 100);
++ m_progressRestoring = newtScale(1, 18, 70, 100, 0);
+ m_labelPercent = newtLabel(72, 18, "");
+
+ m_formMain = newtForm(NULL, NULL, 0);
+diff -rupN partimage-0.6.9/src/client/interface_newt.cpp
partimage-0.6.9-patched/src/client/interface_newt.cpp
+--- partimage-0.6.9/src/client/interface_newt.cpp 2010-07-25
17:30:31.000000000 +0200
++++ partimage-0.6.9-patched/src/client/interface_newt.cpp 2010-11-21
12:54:02.000000000 +0100
+@@ -611,7 +611,7 @@ static void set_lb_cursor(newtComponent
+ char *filesel(char *dr)
+ {
+ newtComponent lb, b1, b2, b3, l1, l2, f, f1;
+- const char *enr2, *enr3;
++ char *enr2, *enr3;
+ char *curv;
+ char curvv[PATH_MAX]; // stupid, but who cares...
+ int i, cnt;
+diff -rupN partimage-0.6.9/src/client/main.cpp
partimage-0.6.9-patched/src/client/main.cpp
+--- partimage-0.6.9/src/client/main.cpp 2010-07-25 17:30:31.000000000
+0200
++++ partimage-0.6.9-patched/src/client/main.cpp 2010-11-21
12:41:17.000000000 +0100
+@@ -198,8 +198,7 @@ int main(int argc, char *argv[])
+
+ // initialize language for i18n
+ setlocale(LC_ALL, "");
+- bindtextdomain (PACKAGE, LOCALEDIR);
+- textdomain (PACKAGE);
++
+
+ // Very important: do not remove (else, uncompatible image will be
produced)
+ if (checkStructSizes() == -1)
+diff -rupN partimage-0.6.9/src/client/partimage.h
partimage-0.6.9-patched/src/client/partimage.h
+--- partimage-0.6.9/src/client/partimage.h 2010-07-25 17:30:31.000000000
+0200
++++ partimage-0.6.9-patched/src/client/partimage.h 2010-11-21
12:40:31.000000000 +0100
+@@ -19,7 +19,6 @@
+ #define PARTIMAGE_H
+
+ #include <errno.h>
+-#include <libintl.h> // intl translation
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <time.h>
+@@ -77,7 +76,7 @@ extern bool g_bSigInt;
+ extern bool g_bSigKill;
+
+ #ifdef OS_LINUX
+- #define i18n(X) gettext(X)
++ #define i18n(X) (X)
+ #else
+ #define i18n(X) (X)
+ #endif
+diff -rupN partimage-0.6.9/src/server/partimaged-main.cpp
partimage-0.6.9-patched/src/server/partimaged-main.cpp
+--- partimage-0.6.9/src/server/partimaged-main.cpp 2010-07-25
17:30:31.000000000 +0200
++++ partimage-0.6.9-patched/src/server/partimaged-main.cpp 2010-11-21
12:42:52.000000000 +0100
+@@ -231,8 +231,6 @@ int main(int argc, char *argv[])
+
+ // initialize language for i18n
+ setlocale(LC_ALL, "");
+- bindtextdomain (PACKAGE, LOCALEDIR);
+- textdomain (PACKAGE);
+
+ g_dwDebugLevel = DEFAULT_DEBUG_LEVEL;
+ g_nDebugThreadMain = getpid();
diff -rupN old/package/partimage/partimage.mk new/package/partimage/
partimage.mk
--- old/package/partimage/partimage.mk 1970-01-01 01:00:00.000000000
+0100
+++ new/package/partimage/partimage.mk 2010-12-03 21:16:55.000000000
+0100
@@ -0,0 +1,12 @@
+PARTIMAGE_VERSION:=0.6.9
+PARTIMAGE_SOURCE:=partimage-$(PARTIMAGE_VERSION).tar.bz2
+PARTIMAGE_SITE:=
http://sourceforge.net/projects/partimage/files/stable/0.6.9
+PARTIMAGE_CONF_OPT:= --disable-ssl
+PARTIMAGE_DEPENDENCIES = bzip2 newt zlib lzo
+
+define PARTIMAGE_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 $(@D)/src/client/partimage
$(TARGET_DIR)/usr/bin/partimage
+ $(INSTALL) -m 0755 $(@D)/src/server/partimaged
$(TARGET_DIR)/usr/bin/partimaged
+endef
+
+$(eval $(call AUTOTARGETS,package,partimage))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101208/60f8b9e9/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] problem with new package partimage
2010-12-08 17:28 [Buildroot] problem with new package partimage Jomas Nash
@ 2010-12-09 10:58 ` Jomas Nash
2010-12-09 14:17 ` Jomas Nash
2010-12-09 15:40 ` Jomas Nash
2 siblings, 0 replies; 6+ messages in thread
From: Jomas Nash @ 2010-12-09 10:58 UTC (permalink / raw)
To: buildroot
Hi,
I updated the buildroot packages newt -> newt-0.52.12 and slang ->
slang2-2.2.2 (these are the most recent ones) and then I compiled partimage
again.
It did not help. The program crashes at the same point.
Anybody has a suggestion what to do?
Kind regards,
Jomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101209/3eb9ac21/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] problem with new package partimage
2010-12-08 17:28 [Buildroot] problem with new package partimage Jomas Nash
2010-12-09 10:58 ` Jomas Nash
@ 2010-12-09 14:17 ` Jomas Nash
2010-12-09 15:40 ` Jomas Nash
2 siblings, 0 replies; 6+ messages in thread
From: Jomas Nash @ 2010-12-09 14:17 UTC (permalink / raw)
To: buildroot
Hi,
Lionel Landwerlin advised me to run the program under gdb (thanks for the
advice).
So I tried this but i get an error in gdb.
1. I start gdb: gdb partimage
2. The debugger starts and I type: run
Then I see an error message in gdb: /root/exec /usr/bin/partimage : No
such file or directory
partimage is in /usr/bin , So how can I debug my program?
Please help.
Kind regards,
Jomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101209/9c494f59/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] problem with new package partimage
2010-12-08 17:28 [Buildroot] problem with new package partimage Jomas Nash
2010-12-09 10:58 ` Jomas Nash
2010-12-09 14:17 ` Jomas Nash
@ 2010-12-09 15:40 ` Jomas Nash
2010-12-09 19:34 ` Thomas Petazzoni
2010-12-09 19:44 ` Pkun
2 siblings, 2 replies; 6+ messages in thread
From: Jomas Nash @ 2010-12-09 15:40 UTC (permalink / raw)
To: buildroot
Hi everybody,
I found another strange thing with partimage.
When I start partimage and run 'ps' in an other terminal, I see that 3
instances of partimage are running.
like:
1117 partimage -S etc...
1118 partimage -S
1119 partimage -S
All three lines have the same parameters
At my "normal" linux system (ubuntu) there is only one instance of partimage
when I start it
Has anybody an idea what can cause this?
It looks like partimge does not want to be compiled in buildroot.
Kind regards,
Jomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101209/0c0b8e35/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] problem with new package partimage
2010-12-09 15:40 ` Jomas Nash
@ 2010-12-09 19:34 ` Thomas Petazzoni
2010-12-09 19:44 ` Pkun
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2010-12-09 19:34 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 9 Dec 2010 16:40:21 +0100
Jomas Nash <jomasnash@gmail.com> wrote:
> I found another strange thing with partimage.
> When I start partimage and run 'ps' in an other terminal, I see that
> 3 instances of partimage are running.
> like:
>
> 1117 partimage -S etc...
> 1118 partimage -S
> 1119 partimage -S
>
> All three lines have the same parameters
> At my "normal" linux system (ubuntu) there is only one instance of
> partimage when I start it
>
>
> Has anybody an idea what can cause this?
Busybox ps probably show all the threads by default, while the normal
ps shows only processes and hides all their threads.
> It looks like partimge does not want to be compiled in buildroot.
This sentence simply doesn't make sense. It's not because there is a
bug somewhere that "partimage does not want to be compiled in
Buildroot".
Regards!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] problem with new package partimage
2010-12-09 15:40 ` Jomas Nash
2010-12-09 19:34 ` Thomas Petazzoni
@ 2010-12-09 19:44 ` Pkun
1 sibling, 0 replies; 6+ messages in thread
From: Pkun @ 2010-12-09 19:44 UTC (permalink / raw)
To: buildroot
2010/12/9 Jomas Nash <jomasnash@gmail.com>
> Hi everybody,
>
> I found another strange thing with partimage.
> When I start partimage and run 'ps' in an other terminal, I see that 3
> instances of partimage are running.
> like:
>
>
> 1117 partimage -S etc...
> 1118 partimage -S
> 1119 partimage -S
>
> All three lines have the same parameters
> At my "normal" linux system (ubuntu) there is only one instance of
> partimage when I start it
>
>
> Has anybody an idea what can cause this?
> It looks like partimge does not want to be compiled in buildroot.
>
> Kind regards,
> Jomas
>
>
The uclibc config has some setting to make uclibc more compatible with
glibc. Try it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101209/dae24213/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-09 19:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 17:28 [Buildroot] problem with new package partimage Jomas Nash
2010-12-09 10:58 ` Jomas Nash
2010-12-09 14:17 ` Jomas Nash
2010-12-09 15:40 ` Jomas Nash
2010-12-09 19:34 ` Thomas Petazzoni
2010-12-09 19:44 ` Pkun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox