5
I'm trying to compile VLC from this GitHub repo on my Allwinner device (ARM Cortex-A8 NEON with armhf kernel and about 380 MB of RAM) using instructions provided here.
I keep getting segfaults, so I created a swap partition like this:
root@lianro:~/# dd if=/dev/zero of=/swap bs=1M count=1024
root@linaro:~/# mkswap -c /swap
root@linaro:~/# swapon /swap
It got better; instead of breaking randomly after about one minute it breaks randomly after a long time, last time it almost finished but I got a segfault on one of the last modules.
Swap doesn't seem to be used at all at any point during the compilation. I have plenty of disk space free.
What can be the problem?
Can you post the lines leading up to the segmentation fault? Does it always segfault at the same location? Does
– Hennes – 2013-07-27T16:56:09.267echo 2 > /proc/cpu/alignment
help? (If it does you have an alignment bug. X86 architecture allows this albeit with a big performance impact. Other architectures often require you do do it right. Tools/programs which get ported often run into these problems. (Though without the error I am just guessing).When you say that swap isn't being used, how do you know? Anything in dmesg relating to oom-killer? – Flup – 2013-07-27T17:12:50.180
I just ran top in another terminal while compiling. Physical memory is almost full but swap is empty during compilation. I finally managed to compile it all just by trying a few times in a row. The whole process took me almost 4 hours, good thing it doesn't need to recompile already compiled modules! – NotGaeL – 2013-07-27T17:58:13.187
@Hennes the segfaults are random, the lines leading to it are all
cc somemodule
and the compiler displays a message saying it's a segfault and it cannot trace the problem and it must be SO related.echo 2 > /proc/cpu/alignment
didn't help – NotGaeL – 2013-07-27T18:03:25.587@Flup I forgot:
dmesg|grep oom
shows nothing. – NotGaeL – 2013-07-27T18:12:22.6501You might find it easier to set up a cross compile configuration on your main machine. Doing this using something like chroot/schroot might make it significantly simpler. I know that there are instructions on setting up Ubuntu for cross compiling onto the Raspberry Pi (another ARM platform) so it should be possible. – KayEss – 2013-08-01T03:07:45.777
If you're compiling with Android as the target OS, there should be binaries available for your device already, also. – Suchipi – 2013-08-04T16:49:56.500