Gentoo Archives: gentoo-hardened

From: Yannis Kontekakis <tolis@×××××××××××.gr>
To: gentoo-hardened@l.g.o
Subject: [gentoo-hardened] erlang fails to install on kvm guest (illegal instruction)
Date: Tue, 20 Nov 2012 15:02:18
Message-Id: 50AB99AF.50302@foss.teithe.gr
1 Hello,
2
3 I am trying to install erlang on a hardened amd64 gentoo system running
4 on a kvm guest. The use flags and version of erlang are the following:
5
6 dev-lang/erlang-15.2 USE="hipe java kpoll odbc smp ssl -compat-ethread
7 -doc -emacs -halfword -sctp -tk -wxwidgets"
8
9 my CFLAGS are:
10 CFLAGS="-march=core2 -O2 -pipe"
11 CXXFLAGS="${CFLAGS}"
12
13 cat /proc/cpuinfo reports 4 cores of:
14
15 processor : 3
16 vendor_id : AuthenticAMD
17 cpu family : 6
18 model : 2
19 model name : QEMU Virtual CPU version 1.0
20 stepping : 3
21 microcode : 0x1000065
22 cpu MHz : 2100.278
23 cache size : 512 KB
24 fpu : yes
25 fpu_exception : yes
26 cpuid level : 4
27 wp : yes
28 flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
29 pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl pni cx16 popcnt
30 hypervisor lahf_lm svm abm sse4a
31 bogomips : 4200.55
32 TLB size : 1024 4K pages
33 clflush size : 64
34 cache_alignment : 64
35 address sizes : 40 bits physical, 48 bits virtual
36 power management:
37
38 the error message that emerge prints while dying:
39
40 === Entering application hipe
41 make[3]: Entering directory
42 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib/hipe/rtl'
43 (cd ../main && make hipe.hrl)
44 make[4]: Entering directory
45 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib/hipe/main'
46 sed -e "s;%VSN%;3.9;" ../../hipe/main/hipe.hrl.src >
47 ../../hipe/main/hipe.hrl
48 make[4]: Leaving directory
49 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib/hipe/main'
50 erlc -W +debug_info +inline -o../ebin hipe_rtl.erl
51 make[3]: *** [../ebin/hipe_rtl.beam] Illegal instruction
52 make[3]: Leaving directory
53 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib/hipe/rtl'
54 make[2]: *** [opt] Error 2
55 make[2]: Leaving directory
56 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib/hipe'
57 make[1]: *** [opt] Error 2
58 make[1]: Leaving directory
59 `/var/tmp/portage/dev-lang/erlang-15.2/work/otp_src_R15B/lib'
60 make: *** [secondary_bootstrap_build] Error 2
61 emake failed
62 * ERROR: dev-lang/erlang-15.2 failed (compile phase):
63 * (no error message)
64 *
65 * Call stack:
66 * ebuild.sh, line 93: Called src_compile
67 * environment, line 3965: Called die
68 * The specific snippet of code:
69 * emake -j1 || die;
70 *
71
72 And finally, dmesg reports:
73 beam.smp[27752] trap invalid opcode ip:54b49c00c4 sp:3d9f459d3f0 error:0
74 in beam.smp[54b48e4000+261000]
75
76 Emerging erlang on my desktop(a similar hardened gentoo setup) completes
77 successfully. The only thing I can think of is that something is wrong
78 with my CFLAGS(but this is just an assumption).
79
80 Any help would be appreciated
81
82 Regards,
83
84 Yannis

Replies

Subject Author
Re: [gentoo-hardened] erlang fails to install on kvm guest (illegal instruction) Alexander Tsoy <alexander@××××.me>