Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 705918 - app-emulation/bochs-2.6.10[avx]: undefined reference to `create_corei7_icelake_u_cpuid(BX_CPU_C*)'
Summary: app-emulation/bochs-2.6.10[avx]: undefined reference to `create_corei7_icelak...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-20 09:00 UTC by Zdenek Sojka
Modified: 2021-03-27 15:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,80.36 KB, text/x-log)
2020-01-20 09:00 UTC, Zdenek Sojka
Details
emerge --info output (emerge--info.log,6.85 KB, text/x-log)
2020-01-20 09:00 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2020-01-20 09:00:13 UTC
Created attachment 603788 [details]
build.log

# 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/libltdl.so 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()':
init.cc:(.text+0x446): 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
Adding:
        $(use_enable avx evex) \
After:
        $(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.
https://sourceforge.net/p/bochs/bugs/1416/
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:
http://svn.code.sf.net/p/bochs/code/tags/REL_2_6_11_FINAL/bochs/CHANGES

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