Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
2.3.54 is now in gitorious. That one works better with debootstrap. I don't know how I debootstrap seemed to go thru yesterday with .53, because today it certainly didn't. Anyway, .54 seems to run most (if not all?) postinstall steps, but I get some failures to the log. I'm not sure if those are fatal or not, and don't have more time for debugging today, sorry. Lauri On Apr 18, 2012, at 7:28 PM, ext tuxor1...@web.de wrote: I don't know what caused it in the first place. But the perl-errors concerning @INC vanished completely after an update to 2.3.53. Still sb2 -eR ./debootstrap/debootstrap --second-stage fails, but there are only three lines left in ./debootstrap/debootstrap.log: tar: dev/null: Cannot mknod: File exists tar: dev: Cannot utime: Operation not permitted tar: Exiting with failure status due to previous errors Before the update I had dozens of lines concerning mknod. Good work so far. Seems like we're getting somewhere :) Am 18.04.2012 16:37, schrieb Lauri T. Aarnio: Sorry, I couldn't reproduce that problem here. Without knowing more about your configuration it is quite difficult to guess. Please start by verifying that sb2 sb2-show path /usr/share/perl/5.12/strict.pm gives sensible results. But 2.3.53 is now in gitorious, please try that one. It has several fixes and even some added consistency checks. Again, as usual, everything seems to work OK for me..please keep sending the bug reports when something doesn't work for you. Lauri ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
Sorry, I couldn't reproduce that problem here. Without knowing more about your configuration it is quite difficult to guess. Please start by verifying that sb2 sb2-show path /usr/share/perl/5.12/strict.pm gives sensible results. But 2.3.53 is now in gitorious, please try that one. It has several fixes and even some added consistency checks. Again, as usual, everything seems to work OK for me..please keep sending the bug reports when something doesn't work for you. Lauri On Apr 17, 2012, at 11:56 PM, ext tuxor1...@web.de wrote: Perfect, thank you! The same applies to ./sb2d/Makefile for -lm. After that it builds fine. Unfortunately I'm running into a new error now when running sb2-init: sb2-init: Creating Debian build system settings for this target: Can't locate strict.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /usr/bin/dpkg-architecture line 21. BEGIN failed--compilation aborted at /usr/bin/dpkg-architecture line 21. Can't locate strict.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /usr/bin/dpkg-architecture line 21. BEGIN failed--compilation aborted at /usr/bin/dpkg-architecture line 21. But strict.pm actually is in my @INC: $ ls -l /usr/share/perl/5.12/strict.pm -rw-r--r-- 1 root root 879 2011-09-06 10:22 /usr/share/perl/5.12/strict.pm How is that possible? Am 17.04.2012 22:24, schrieb lauri.t.aar...@nokia.com: Right, I'd need to remove -ldl from CFLAGS and add it to the end of the line which reads $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^. About Qemu versions: The general rule is that always take the latest one. I don't know any reasons why you should not use 1.0 (I'm still using something older in my testing environment, but that is a different thing; when developing SB2, I'm trying to minimize changes i.e. SB2 is the only component which gets regular updates, others are frozen currently. That really simplifies regression testing) Lauri ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
On Apr 16, 2012, at 10:37 PM, ext tuxor1...@web.de wrote: hello everyone, I'm trying to setup an ARM cross-compiling environment inside of an i386 Xubuntu machine. What I do is: # build scratchbox2 from source # build qemu from source # setup environment in $ROOTFS $ cd $ROOTFS $ sb2-init -n -c $HOME/sbox2/bin/qemu/bin/qemu-arm /path/to/arm-linux-gcc $ fakeroot /usr/sbin/debootstrap --variant=scratchbox --foreign --arch armel wheezy $ROOTFS http://ftp.de.debian.org/debian $ sb2 -eR ./debootstrap/debootstrap --second-stage The last command fails. It doesn't create any output. I think that debootstrap used to work, so something has been changed. Since you seem to be using the old-but-stable version of SB2, it shouldn't be that...maybe debootstrap has been evolving, maybe it is something else, but the good news is that this can be handled with a newer SB2 + some patches that I have been implementing today: Instead I get lots of lines like this in $ROOTFS/debootstrap/debootstrap.log: tar: dev/kmem: Cannot mknod: Permission denied tar: dev/mem: Cannot mknod: Permission denied tar: dev/core: Cannot open: File exists tar: dev/null: Cannot utime: Operation not permitted It seems to me like the problem is, that /dev is not remapped: $ sb2 -eR sb2-show path /dev /dev = /dev No, that isn't the problem; mapping /dev to real /dev is intentional. Since SB2 has been designed to work without root privileges, the real /dev must be used. Instead, some operations like mknod() must be mapped elsewhere. Latest development versions can create simulated device nodes, and those are perfect for solving this problem, too. There were similar issues with /dev ca. three months ago, and some additional mapping rules were added to the obs-rpm-install mode. All that is in the 2.3_development branch. I just copied those special /dev rules to the emulate mode, and added a few additional rules (debootstrap wanted to create symlinks to /dev, something which rpm didn't do, etc). Now debootstrap --second-stage passes here. There are some messages, but the exit code is 0 and it seems to have succeeded. I'll add these changes to the next development version, 2.3.53. I'll need to do some additional testing, but probably I can release that tomorrow. I tried the install mapping, but ended up with this: $ sb2 -m install -R sb2-show path /dev sb2: Error: Failed to find out how /home/tuxor/sbox2/bin/qemu/bin/qemu-arm should be started install mode has been obsoleted. It still exists in 2.2, but isn't in 2.3 and won't come back, I think. # build scratchbox2 from source $ git clone git://gitorious.org/scratchbox2/scratchbox2.git Please use sources from the 2.3 branch: git checkout -b 2.3_development origin/2.3_development (Once the fix to this debootstrap problem is ready, it will available only in that branch. 2.3 should be quite mature, all mechanisms needed for fixing this are only in that branch, and it isn't feasible to try to backport all necessary things to 2.2) # build qemu from source $ git clone git://git.savannah.nongnu.org/qemu.git $ cd qemu $ git checkout v0.13.0 -b devel_env That is a really old version, too. You'll probably want to get a fresh Qemu from qemu.org. Lauri ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
Thanks for your fast response, Lauri. Unfortunately the build process of sb2 fails now completely for me. But I have a new setup of Xubuntu 11.10 i386 - it could also be related to that: This is how I'm trying to build scratchbox2 at the moment: $ git clone git://gitorious.org/scratchbox2/scratchbox2.git $ cd scratchbox2 $ git checkout -b 2.3_development origin/2.3_development $ ./autogen.sh $ ./configure --prefix=$HOME/sbox2/bin/scratchbox $ make install And this is the error message that make install produces: [ARCHIVE] luaif/liblua.a [CC] sb2d/libsupport.o [CC] utils/sb2dctl.o [LD] utils/sb2dctl utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__ping__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:50: undefined reference to `dlsym' utils/sb2dctl.o: In function `main': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:96: undefined reference to `dlopen' utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__init2__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:45: undefined reference to `dlsym' Looks like a flag -ldl is missing somewhere. Any ideas? Shell I use the latest qemu from the 1.0 branch or stick to the legacy 0.15 branch? ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
I don't know why linking of sb2dctl fails for you. -ldl is present in utils/Makefile: $(D)/sb2dctl: override CFLAGS := $(CFLAGS) -Wall -W -Werror \ -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS) \ -I$(SRCDIR)/include -ldl and I have tested building that on debian squeeze and wheezy, and on one older Ubuntu (probably it was lucid), no problems with those. Haven't tested with Xubuntu 11.10, though. Please run make with V set to something (e.g. V=y make) and it will print out what it is doing. Lauri From: scratchbox-users-boun...@lists.scratchbox.org [scratchbox-users-boun...@lists.scratchbox.org] on behalf of ext tuxor1...@web.de [tuxor1...@web.de] Sent: Tuesday, April 17, 2012 21:45 To: scratchbox-users@lists.scratchbox.org Subject: Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping Thanks for your fast response, Lauri. Unfortunately the build process of sb2 fails now completely for me. But I have a new setup of Xubuntu 11.10 i386 - it could also be related to that: This is how I'm trying to build scratchbox2 at the moment: $ git clone git://gitorious.org/scratchbox2/scratchbox2.git $ cd scratchbox2 $ git checkout -b 2.3_development origin/2.3_development $ ./autogen.sh $ ./configure --prefix=$HOME/sbox2/bin/scratchbox $ make install And this is the error message that make install produces: [ARCHIVE] luaif/liblua.a [CC] sb2d/libsupport.o [CC] utils/sb2dctl.o [LD] utils/sb2dctl utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__ping__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:50: undefined reference to `dlsym' utils/sb2dctl.o: In function `main': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:96: undefined reference to `dlopen' utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__init2__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:45: undefined reference to `dlsym' Looks like a flag -ldl is missing somewhere. Any ideas? Shell I use the latest qemu from the 1.0 branch or stick to the legacy 0.15 branch? ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
I'm helpless about this as well. gcc is correctly called with -ldl as we can see from the verbose output: gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -Wp,-MT,utils/sb2dctl.o -Wp,-MMD,utils/.sb2dctl.o.d -o utils/sb2dctl.o -c utils/sb2dctl.c gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -o utils/sb2dctl sb2d/libsupport.o utils/sb2dctl.o rule_tree/rule_tree_rpc_client.o sblib/sb_log.o utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__ping__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:50: undefined reference to `dlsym' utils/sb2dctl.o: In function `main': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:96: undefined reference to `dlopen' utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__init2__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:45: undefined reference to `dlsym' collect2: ld returned 1 exit status My main machine is a x86_64 Fedora 16 and here it's building fine using the exact same procedure... Would you recommend qemu 0.15 or 1.0? ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
On 4/17/2012 3:44 PM, tuxor1...@web.de wrote: I'm helpless about this as well. gcc is correctly called with -ldl as we can see from the verbose output: gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -Wp,-MT,utils/sb2dctl.o -Wp,-MMD,utils/.sb2dctl.o.d -o utils/sb2dctl.o -c utils/sb2dctl.c gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -o utils/sb2dctl sb2d/libsupport.o utils/sb2dctl.o rule_tree/rule_tree_rpc_client.o sblib/sb_log.o utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__ping__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:50: undefined reference to `dlsym' utils/sb2dctl.o: In function `main': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:96: undefined reference to `dlopen' utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__init2__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:45: undefined reference to `dlsym' collect2: ld returned 1 exit status My main machine is a x86_64 Fedora 16 and here it's building fine using the exact same procedure... Would you recommend qemu 0.15 or 1.0? ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users I had similar problems recently and the answer if was given when querying it was as follows - it's not screwed up... It's a change in GCC that requires that you do your GNU Make and other build files when linking correctly. --as-needed is turned on by default and if you're putting your .so's in front of the .o files in your link order, it skips things. that a possible solution for you? bst rgrds Russell ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
Right, I'd need to remove -ldl from CFLAGS and add it to the end of the line which reads $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^. About Qemu versions: The general rule is that always take the latest one. I don't know any reasons why you should not use 1.0 (I'm still using something older in my testing environment, but that is a different thing; when developing SB2, I'm trying to minimize changes i.e. SB2 is the only component which gets regular updates, others are frozen currently. That really simplifies regression testing) Lauri From: scratchbox-users-boun...@lists.scratchbox.org [scratchbox-users-boun...@lists.scratchbox.org] on behalf of ext Russell Keith Davis [rkda...@burninghorse.com] Sent: Tuesday, April 17, 2012 22:53 To: Discussion related to using of Scratchbox Subject: Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping On 4/17/2012 3:44 PM, tuxor1...@web.demailto:tuxor1...@web.de wrote: I'm helpless about this as well. gcc is correctly called with -ldl as we can see from the verbose output: gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -Wp,-MT,utils/sb2dctl.o -Wp,-MMD,utils/.sb2dctl.o.d -o utils/sb2dctl.o -c utils/sb2dctl.c gcc -g -O2 -O2 -g -Wall -W -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/include -I/home/tuxor/sbox2/src/scratchbox2/luaif/lua-5.1.4/src -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Wall -W -Werror -I/home/tuxor/sbox2/src/scratchbox2/preload -Ipreload/ -Wmissing-prototypes -Wstrict-prototypes -I/home/tuxor/sbox2/src/scratchbox2/include -ldl -o utils/sb2dctl sb2d/libsupport.o utils/sb2dctl.o rule_tree/rule_tree_rpc_client.o sblib/sb_log.o utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__ping__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:50: undefined reference to `dlsym' utils/sb2dctl.o: In function `main': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:96: undefined reference to `dlopen' utils/sb2dctl.o: In function `call_sb2__ruletree_rpc__init2__': /home/tuxor/sbox2/src/scratchbox2/utils/sb2dctl.c:45: undefined reference to `dlsym' collect2: ld returned 1 exit status My main machine is a x86_64 Fedora 16 and here it's building fine using the exact same procedure... Would you recommend qemu 0.15 or 1.0? ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.orgmailto:Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users I had similar problems recently and the answer if was given when querying it was as follows - it’s not screwed up… It’s a change in GCC that requires that you do your GNU Make and other build files when linking correctly. –as-needed is turned on by default and if you’re putting your .so’s in front of the .o files in your link order, it skips things. that a possible solution for you? bst rgrds Russell ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users
Re: [Scratchbox-users] debootstrap --second-stage fails because of /dev/ mapping
Perfect, thank you! The same applies to ./sb2d/Makefile for -lm. After that it builds fine. Unfortunately I'm running into a new error now when running sb2-init: sb2-init: Creating Debian build system settings for this target: Can't locate strict.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /usr/bin/dpkg-architecture line 21. BEGIN failed--compilation aborted at /usr/bin/dpkg-architecture line 21. Can't locate strict.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at /usr/bin/dpkg-architecture line 21. BEGIN failed--compilation aborted at /usr/bin/dpkg-architecture line 21. But strict.pm actually is in my @INC: $ ls -l /usr/share/perl/5.12/strict.pm -rw-r--r-- 1 root root 879 2011-09-06 10:22 /usr/share/perl/5.12/strict.pm How is that possible? Am 17.04.2012 22:24, schrieb lauri.t.aar...@nokia.com: Right, I'd need to remove -ldl from CFLAGS and add it to the end of the line which reads $(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^. About Qemu versions: The general rule is that always take the latest one. I don't know any reasons why you should not use 1.0 (I'm still using something older in my testing environment, but that is a different thing; when developing SB2, I'm trying to minimize changes i.e. SB2 is the only component which gets regular updates, others are frozen currently. That really simplifies regression testing) Lauri ___ Scratchbox-users mailing list Scratchbox-users@lists.scratchbox.org http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users