Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: wrong SDL2 include on aarch64 ? #19677

Open
Randrianasulu opened this issue Apr 5, 2024 · 8 comments
Open

[Bug]: wrong SDL2 include on aarch64 ? #19677

Randrianasulu opened this issue Apr 5, 2024 · 8 comments
Labels
bug report Something is not working properly inactive No activity in a certain period of time upstream issue It is an upstream issue

Comments

@Randrianasulu
Copy link

Problem description

I tried to build bochs git from https://github.com/bochs-emu/Bochs

and run into problems with sdl2

editing /data/data/com.termux/files/usr/include/SDL2/SDL_cpuinfo.h so it does not include include <arm_neon.h> anymore fixed this build error.

What steps will reproduce the bug?

git clone https://github.com/bochs-emu/Bochs

./configure --prefix=/data/data/com.termux/files/usr --with-x11 --enable-usb --enable-ne2000 --enable-clgd54xx --enable-voodoo --enable-sb16 --enable-es1370 --with-sdl2 --enable-usb-ohci --enable-usb-xhci --enable-usb-ehci --enable-all-optimizations

then make -j8

it failed somewhere in cpu code

In file included from main.cc:45:
In file included from /data/data/com.termux/files/usr/include/SDL2/SDL.h:38:
In file included from /data/data/com.termux/files/usr/include/SDL2/SDL_cpuinfo.h:81:
/data/data/com.termux/files/usr/lib/clang/18/include/arm_neon.h:1775:47: error: no matching conversion for C-style cast from 'float32x2_t' (aka 'f32_t') to 'int8x8_t' (vector of 8 'int8_t' values)
 1775 |   __ret = (float32x2_t) __builtin_neon_vabs_v((int8x8_t)__p0, 9);
      |                                               ^~~~~~~~~~~~~~
./cpu/fpu/../softfloat3e/include/softfloat_types.h:59:5: note: candidate function                     59 |     operator uint32_t() const { return v; }
      |     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

What is the expected behavior?

compile finished sucessfully (after you set #define BX_HAVE_SOUND_OSS 0 in config.h and fix slirp err)

System information

termux-info:

 Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=32709
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.sau.edu.cn/termux/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.sau.edu.cn/termux/apt/termux-x11 x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
All packages up to date
termux-tools version:
1.41.2
Android version:
11
Kernel build information:
Linux localhost 4.14.193 #1 SMP PREEMPT Thu Jul 8 13:58:00 CST 2021 aarch64 Android
Device manufacturer:
DEXP
Device model:
K38
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51

@Randrianasulu Randrianasulu added bug report Something is not working properly untriaged labels Apr 5, 2024
@Biswa96
Copy link
Member

Biswa96 commented Apr 6, 2024

Could you provide the required dependencies to reproduce the issue? Also, would it be possible to reproduce the issue with termux provided bochs package here https://github.com/termux/termux-packages/tree/master/x11-packages/bochs ?

@Randrianasulu
Copy link
Author

at least x11 and sdl2 -static packages? Sorry, I have quite big installation. Also, I think softfloat3e only appeared in Bochs git (sources from very late December were fine without any alteration of sdl2 headers)

@Biswa96
Copy link
Member

Biswa96 commented Apr 6, 2024

I have reported the issue in upstream bochs-emu/Bochs#300

@Randrianasulu
Copy link
Author

@Biswa96 thanks, I pulled Bochs' git up to e1d67d9ce0d7818b32ac983717e36fd22106052d and it compiled clearly.

@Biswa96
Copy link
Member

Biswa96 commented Apr 7, 2024

But I still get the same compiler error as you mentioned.

@Biswa96
Copy link
Member

Biswa96 commented Apr 7, 2024

Are you compiling the project in Android device? The configure script detects the systems as aarch64-unknown-linux-gnu which means normal Linux systems. so, I added --build=aarch64-unknown-linux-android option with configure command for Android system.

@Randrianasulu
Copy link
Author

@Biswa96 yes,I compile from termux itself. I still have my hacked system include, but at least oss and slirp errors are gone?

i will try clean rebuild with --build option, but not right now, I want to sleep first.

@licy183 licy183 removed the untriaged label Apr 7, 2024
@licy183
Copy link
Member

licy183 commented Apr 7, 2024

Related: ucb-bar/berkeley-softfloat-3#12

@truboxl truboxl added the upstream issue It is an upstream issue label Apr 10, 2024
@stale stale bot added the inactive No activity in a certain period of time label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly inactive No activity in a certain period of time upstream issue It is an upstream issue
Projects
None yet
Development

No branches or pull requests

4 participants