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

use raspberrypi 5 lime build error #1823

Open
dancemanUK opened this issue Jul 30, 2024 · 5 comments
Open

use raspberrypi 5 lime build error #1823

dancemanUK opened this issue Jul 30, 2024 · 5 comments

Comments

@dancemanUK
Copy link

dancemanUK commented Jul 30, 2024

pi@raspberrypi:~ $ lime create HelloWorld
pi@raspberrypi:~ $ ls
Bookshelf  Documents  haxelib     Music  Pictures  rpdiags.txt  Videos
Desktop    Downloads  HelloWorld  path   Public    Templates
pi@raspberrypi:~ $ cd HelloWorld
pi@raspberrypi:~/HelloWorld $ lime test neko
Called from lime/_internal/backend/native/NativeCFFI.hx line 632
Called from lime/system/CFFI.hx line 182
Called from lime/system/CFFI.hx line 305
Uncaught exception - Could not find lime.ndll. This file is provided with Lime's Haxelib releases, but not via Git. Please copy it from Lime's latest Haxelib release into either /home/pi/haxelib/lime/8,1,3/ndll/Linux or /home/pi/haxelib/lime/8,1,3/ndll/Linux64, as appropriate for your system. Advanced users may run `lime rebuild cpp` instead.
pi@raspberrypi:~/HelloWorld $ 
@joshtynjala
Copy link
Member

For Raspberry Pi, things are a bit more involve than other platforms. You can't use Neko, HashLink, or other runtimes. You need to use the rpi target specifcally. Additionally, the rpi target doesn't currently work correctly with Lime 8.1 and older. You're going to need to check out the Lime git repository and rebuild lime.ndll for Raspberry Pi.

git clone https://github.com/openfl/lime.git --recurse-submodules
cd lime
haxelib dev lime .
lime rebuild rpi -clean -release -nocffi

Then, in your project, you should be able to run:

lime test rpi

@dancemanUK
Copy link
Author

对于Raspberry Pi来说,事情比其他平台更复杂一些。您不能使用 Neko、HashLink 或其他运行时。您需要专门使用目标。此外,目标目前无法在 Lime 8.1 及更早版本中正常工作。您将需要查看 Lime git 存储库并为 Raspberry Pi 重建 lime.ndll。rpi``rpi

git clone https://github.com/openfl/lime.git --recurse-submodules
cd lime
haxelib dev lime .
lime rebuild rpi -clean -release -nocffi

然后,在您的项目中,您应该能够运行:

lime test rpi

Thank you , I will download the development version and retest it

@gepatto
Copy link
Contributor

gepatto commented Jul 31, 2024

You will also need to use hxcpp from git on a raspberry pi 5 running 64bit os. This morning a bug was fixed that made all 64bit haxe cpp apps crash on the pi4/5 crash. Also you might have to check out the 8.2.0-Dev branch of my fork of lime (gepatto/lime) because (64bit) raspberry pi support is not yet official and my fork handles the proper selection of 32/64 bit flags.

@dancemanUK
Copy link
Author

actuate: [1.9.0]
box2d: [1.2.3]
flixel-addons: [3.2.3]
flixel-demos: [3.2.0]
flixel-templates: [2.7.0]
flixel-tools: [1.5.1]
flixel-ui: [2.6.1]
flixel: [5.8.0]
format: [3.7.0]
hxcpp: 4.3.2 [git]
hxp: [1.3.0]
layout: [1.2.1]
lime-samples: [7.0.0]
lime: 8.1.3 [dev:/home/pi/lime]
openfl-samples: [8.7.0]
openfl: [9.3.4]

Compiling group: native-toolkit-openal
g++ -Ilib/openal/ -Ilib/custom/openal/alc/ -Ilib/openal/alc/ -Ilib/custom/openal/build/ -Ilib/openal/common/ -Ilib/custom/openal/include/ -Ilib/openal/include/ -DAL_ALEXT_PROTOTYPES -D_LARGEFILE_SOURCE -D_LARGE_FILES -DNOMINMAX -Ilib/custom/sdl/include/ -Ilib/sdl/include/ -Ilib/sdl/include/configs/rpi/ -DHAVE_SDL2 -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500 -mfpu=neon -fcommon -fPIC -fvisibility=hidden -pthread -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -I/home/pi/haxelib/hxcpp/git/include ... tags=[haxe,static]

  • lib/openal/common/alcomplex.cpp
  • lib/openal/alc/effects/distortion.cpp
  • lib/openal/alc/backends/alsa.cpp
  • lib/openal/alc/backends/pulseaudio.cpp
    Error: g++: error: unrecognized command-line option ‘-mfpu=neon’
    pi@raspberrypi:~/lime $
wechat_20240801025649

@dancemanUK
Copy link
Author

pi@raspberrypi:/lime $ git switch 8.2.0-Dev
分支 '8.2.0-Dev' 设置为跟踪 'origin/8.2.0-Dev'。
切换到一个新分支 '8.2.0-Dev'
pi@raspberrypi:
/lime $ git pull
已经是最新的。
pi@raspberrypi:/lime $ haxelib dev lime .
Development directory set to /home/pi/lime
pi@raspberrypi:
/lime $ lime rebuild rpi -clean -release -nocffi
Compiling group: lime
g++ -Iinclude -Ilib/custom/cairo/src/ -Ilib/custom/cairo/configs/linux/ -Ilib/cairo/src/ -DLIME_CAIRO -DHAVE_CONFIG_H -DCAIRO_HAS_FT_FONT -Ilib/curl/include/ -DLIME_CURL -DCURL_STATICLIB -Ilib/efsw/include/ -DLIME_EFSW -Ilib/freetype/include -DLIME_FREETYPE -Ilib/harfbuzz/src -DLIME_HARFBUZZ -Ilib/hashlink/src -DLIBHL_EXPORTS -Ilib/custom/jpeg/ -Ilib/jpeg/ -DLIME_JPEG -Ilib/lzma/src -DLIME_LZMA -Ilib/custom/ogg/include/ -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_OGG -Ilib/openal/include/ -DLIME_OPENAL -DLIME_OPENALSOFT -DAL_LIBTYPE_STATIC=1 -DAL_ALEXT_PROTOTYPES -DLIME_OPENGL -Ilib/custom/png/ -Ilib/png/ -Ilib/zlib/ -DLIME_PNG -Ilib/sdl/include/ -Ilib/sdl/include/configs/rpi/ -DHAVE_LIBC -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/usr/include/libdrm -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/local/include -ldrm -lgbm -Wl,--no-undefined -lm -ldl -ldrm -lpthread -lrt -DLIME_SDL -DHAVE_STDIO_H -Ilib/tinyfiledialogs/ -DLIME_TINYFILEDIALOGS -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_VORBIS -DLIME_ZLIB -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -I/home/pi/haxelib/hxcpp/git/include ... tags=[haxe,static]

  • src/media/codecs/vorbis/VorbisBindings.cpp
  • src/math/ColorMatrix.cpp
  • src/system/ValuePointer.cpp
  • src/media/containers/WAV.cpp
    Error: In file included from include/math/ColorMatrix.h:5,
    from ./src/math/ColorMatrix.cpp:1:
    include/system/CFFI.h:6:10: fatal error: hl.h: 没有那个文件或目录
    6 | #include <hl.h>
    | ^~~~~~
    compilation terminated.
    Error: In file included from include/utils/Bytes.h:5,
    from include/media/codecs/vorbis/VorbisFile.h:5,
    from ./src/media/codecs/vorbis/VorbisBindings.cpp:1:
    include/system/CFFI.h:6:10: fatal error: hl.h: 没有那个文件或目录
    6 | #include <hl.h>
    | ^~~~~~
    compilation terminated.
    pi@raspberrypi:~/lime $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants