Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 705918

Summary: app-emulation/bochs-2.6.10[avx]: undefined reference to `create_corei7_icelake_u_cpuid(BX_CPU_C*)'
Product: Gentoo Linux Reporter: Zdenek Sojka <zsojka>
Component: Current packagesAssignee: Luca Barbato <lu_zero>
Status: CONFIRMED ---    
Severity: normal CC: jstein, scott
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Attachments: build.log
emerge --info output

Description Zdenek Sojka 2020-01-20 09:00:13 UTC
Created attachment 603788 [details]

# emerge -vp bochs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] app-emulation/bochs-2.6.10::gentoo  USE="3dnow X avx* ncurses readline sdl smp x86-64 -debugger -doc -gdb (-svga) -vnc" 0 KiB

Build fails to link:

x86_64-pc-linux-gnu-g++ -o bochs -O2 -pipe -march=native -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -pthread -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DBX_PLUGIN_PATH=\"/usr/lib64/bochs/plugins\" -DBX_SHARE_PATH=\"/usr/share/bochs\" -Wl,-O1 -Wl,--as-needed logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o crc.o bxthread.o -Wl,--export-dynamic  iodev/libiodev.a iodev/usb/libusb.a iodev/network/libnetwork.a cpu/libcpu.a cpu/avx/libavx.a cpu/cpudb/libcpudb.a memory/libmemory.a gui/libgui.a disasm/libdisasm.a /usr/lib64/ cpu/fpu/libfpu.a -lSDL -lpthread -ldl -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/usr/lib64
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cpu/libcpu.a(init.o): in function `BX_CPU_C::initialize()': undefined reference to `create_corei7_icelake_u_cpuid(BX_CPU_C*)'
collect2: error: ld returned 1 exit status

Adding --enable-evex to ./configure prevents the issue.
Comment 1 Zdenek Sojka 2020-01-20 09:00:45 UTC
Created attachment 603790 [details]
emerge --info output
Comment 2 Norman Back 2020-09-08 07:09:45 UTC
I confirm this issue.

[ebuild     U ~] app-emulation/bochs-2.6.10::gentoo [2.6.9-r1::local] USE="X avx debugger ncurses readline sdl smp vnc x86-64 -3dnow -doc -gdb (-svga) (-usb%) (-usb-ohci%) (-usb-xhci%)" 0 KiB

I've not tried the suggested fix yet.
Comment 3 Norman Back 2020-09-08 10:10:03 UTC
        $(use_enable avx evex) \
        $(use_enable avx) \

in the ebuild fixes the issue.
Comment 4 Norman Back 2020-09-08 10:11:43 UTC
Looks like this may have been fixed upstream.
Comment 5 Zdenek Sojka 2020-11-15 14:37:57 UTC
I can confirm adding
$(use_enable avx evex) \
as suggested, fixes the issue.
The ebuild can otherwise, after renaming, be used for bochs-2.6.11 build.
Comment 6 Andreas Thalhammer 2021-03-04 17:24:52 UTC
(In reply to Zdenek Sojka from comment #5)
> The ebuild can otherwise, after renaming, be used for bochs-2.6.11 build.

I requested a version bump, renaming 2.6.10 -> 2.6.11 works on my system (amd64), see Bug #774195
Comment 7 Andreas Thalhammer 2021-03-04 17:32:55 UTC
From the changelog:

- Bugfixes for CPU emulation correctness
  - Many critical bugfixes for Protection Keys, AVX512*, VMX/SVM, SHA, GFNI emulation