[email protected] escreveu: > Hi, Bero, I believe replacing gomp_init_num_threads function body from gcc-4.9.0/libgomp/config/linux/proc.c with the one from gcc-4.8.2/libgomp/config/linux/proc.c it will just work for this specific problem, but would probably be an pessimization for anything else that is not qemu emulation.
But we need a proper fix, for example, "cat /proc/cpuinfo" in the chroot is completely wrong, it shows 12 i7 cpus instead of an arm cpu..., and the gomp issue should be related, due to the quite more complex logic in gcc 4.9.0 checking number of cpus and number of threads per cpu (and of course it works in real hardware). > Fedya asked me to debug why rpm (and urpmi) were not working > on OpenMandriva arm after updating to gcc 4.9. > > The backtrace looks like this: > > --%<-- > Remote debugging using localhost:1235 > Reading symbols from > /home/fedya/openmandriva/home/fedya/root/lib/ld-linux-armhf.so.3...Reading > symbols from > /home2/fedya/openmandriva/home/fedya/root/usr/lib/debug/lib/ld-2.19.so.debug...done. > done. > Loaded symbols for > /home/fedya/openmandriva/home/fedya/root/lib/ld-linux-armhf.so.3 > 0xf67dfd00 in _start () > from /home/fedya/openmandriva/home/fedya/root/lib/ld-linux-armhf.so.3 > (gdb) c > Continuing. > > Program received signal SIGSEGV, Segmentation fault. > memset () at ../ports/sysdeps/arm/memset.S:53 > 53 sfi_breg r3, \ > (gdb) bt > #0 memset () at ../ports/sysdeps/arm/memset.S:53 > #1 0xf650b5da in __pthread_getaffinity_new (th=th@entry=4123619328, > cpusetsize=4, > cpuset=0xf008) at ../nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c:41 > #2 0xf60ca6d8 in gomp_init_num_threads () at > ../../../libgomp/config/linux/proc.c:93 > #3 0xf60c28b2 in initialize_env () at ../../../libgomp/env.c:1187 > #4 0xf67ea514 in call_init (env=<optimized out>, argv=<optimized out>, > argc=<optimized out>, l=<optimized out>) at dl-init.c:76 > #5 _dl_init (main_map=0xf67fe908, argc=1, argv=0xf6ffecf4, env=0xf6ffecfc) > at dl-init.c:124 > #6 0xf67dfd32 in _dl_start_user () > from /home/fedya/openmandriva/home/fedya/root/lib/ld-linux-armhf.so.3 > Backtrace stopped: previous frame identical to this frame (corrupt stack?) > (gdb) q > A debugging session is active. > > Inferior 1 [Remote target] will be killed. > > Quit anyway? (y or n) y > --%<-- Thanks, Paulo
