The best way for this issue to get fixed is by filing a bug report and attaching the output you’ve seen while profiling. it seems quiet important from what you’ve described.
So where are the instructions for building on Haiku @Prognoz ?
The readme doesn’t really mention it at all. I looked at running the premake4/5 lua files. But don’t know anything about lua or what arguments should be supplied. I’ve got SDL2 and lua installed via pkgman.
The higher level goal I have to be able to edit code in a similar fashion to vscode, which I can just open a folder, and see all the sub-folders and files and search for strings globally. And find files easily. A lot of coder editors on Haiku just open single files per window and you have to dig through the folder heirarchy to open them all individually.
I continue distributing Haiku builds in the official repo, if you don’t need to build it manually just download the last version from here. I’m not personally testing the builds since I’m short of time to do it.
There are not build instructions but there’s a build script I use to build it so it’s as simple as running that script: ecode source is here and the script is located here, you’ll need premake5 and libSDL2 to build it (plus the C++ toolchain).
Edit: Performance is probably bad in Haiku due to the lack of GPU acceleration and the issues mentioned in this thread. But feel free to try it!
Seems to be running OK, slow launch though (compared to CudaText). Haiku 64bit R1B4.
EDIT:
Grabbed latest tagged sources to check a build, that went fine, but when opening a previous project it crashes.
Grabbed tags:
https://github.com/SpartanJ/eepp/archive/refs/tags/eepp-2.7.2.tar.gz
https://github.com/SpartanJ/SOIL2/archive/refs/tags/1.3.0.tar.gz
https://github.com/SpartanJ/efsw/archive/refs/tags/1.4.0.tar.gz
From syslog:
2024-06-26 08:23:13 KERN: 21843: DEBUGGER: abort() called
2024-06-26 08:23:13 KERN: debug_server: Thread 21843 entered the debugger: Debugger call: `abort() called'
2024-06-26 08:23:13 KERN: stack trace, current PC 0x5bfd775099 </boot/system/lib/libroot.so> _kern_debugger + 0x9:
2024-06-26 08:23:13 KERN: (0x7f8cd0976080) 0xd54ac1a711 </boot/system/lib/libstdc++.so.6.0.32> _ZN9__gnu_cxx27__verbose_terminate_handlerEv.cold + 0x5c
2024-06-26 08:23:13 KERN: (0x7f8cd09760c0) 0xd54ac29526 </boot/system/lib/libstdc++.so.6.0.32> _ZN10__cxxabiv111__terminateEPFvvE + 0x6
2024-06-26 08:23:13 KERN: (0x7f8cd09760d0) 0xd54ac29581 </boot/system/lib/libstdc++.so.6.0.32> _ZSt9terminatev + 0x11 (closest symbol)
2024-06-26 08:23:13 KERN: (0x7f8cd09760e0) 0xd54ac2a59f </boot/system/lib/libstdc++.so.6.0.32> __cxa_pure_virtual + 0x1f (closest symbol)
2024-06-26 08:23:13 KERN: (0x7f8cd09760f0) 0x1a5e0c4922e </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE2UI3CSS27StyleSheetPropertyAnimation13tweenPropertyEPNS0_8UIWidgetERKfPKNS1_18PropertyDefinitionERKSsSB_RKNS_4Math4Ease13InterpolationESt6vectorIdSaIdEERKjRKb + 0x47e
2024-06-26 08:23:13 KERN: (0x7f8cd0976230) 0x1a5e0c4b6f4 </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE2UI3CSS27StyleSheetPropertyAnimation8onUpdateERKNS_6System4TimeE + 0x224
2024-06-26 08:23:13 KERN: (0x7f8cd09762d0) 0x1a5e0c4c3d1 </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE2UI3CSS27StyleSheetPropertyAnimation6updateERKNS_6System4TimeE + 0xe1
2024-06-26 08:23:13 KERN: (0x7f8cd0976300) 0x1a5e09ba17c </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE5Scene13ActionManager6updateERKNS_6System4TimeE + 0x20c
2024-06-26 08:23:13 KERN: (0x7f8cd09763b0) 0x1a5e0bbc49d </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE5Scene9SceneNode6updateERKNS_6System4TimeE + 0x2d
2024-06-26 08:23:13 KERN: (0x7f8cd0976410) 0x1a5e0e05de2 </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE2UI11UISceneNode6updateERKNS_6System4TimeE + 0x82
2024-06-26 08:23:13 KERN: (0x7f8cd0976450) 0x1a5e0bb7643 </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE5Scene12SceneManager6updateERKNS_6System4TimeE + 0x33
2024-06-26 08:23:13 KERN: (0x7f8cd0976480) 0x1a5e0bb7681 </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE5Scene12SceneManager6updateEv + 0x21
2024-06-26 08:23:13 KERN: (0x7f8cd09764b0) 0x6a5149ec3f </Opslag/wip/eepp-eepp-2.7.2/bin/ecode> _ZN5ecode3App8mainLoopEv + 0x2f
2024-06-26 08:23:13 KERN: (0x7f8cd09764f0) 0x1a5e0ebb2eb </Opslag/wip/eepp-eepp-2.7.2/libs/haiku/x86_64/libeepp.so> _ZN2EE6Window6Window11runMainLoopESt8functionIFvvEEi + 0xbb
2024-06-26 08:23:13 KERN: (0x7f8cd0976530) 0x6a514b1ffd </Opslag/wip/eepp-eepp-2.7.2/bin/ecode> _ZN5ecode3App4initERKN2EE6System8LogLevelESsRKfRKSsbbbS9_bS9_NS_14FeaturesHealth12OutputFormatES9_bbbbSs + 0x28ad
2024-06-26 08:23:13 KERN: (0x7f8cd0976810) 0x6a5141decc </Opslag/wip/eepp-eepp-2.7.2/bin/ecode> main + 0x1fdc
2024-06-26 08:23:13 KERN: (0x7f8cd0978220) 0x6a514239af </Opslag/wip/eepp-eepp-2.7.2/bin/ecode> _start + 0x3f
2024-06-26 08:23:13 KERN: (0x7f8cd0978250) 0x6fcf41aae5 </boot/system/runtime_loader> runtime_loader + 0x105
2024-06-26 08:23:15 KERN: debug_server: Killing team 21843 (/Opslag/wip/eepp-eepp-2.7.2/bin/ecode)
2024-06-26 08:23:15 KERN: debug_server: TeamDebugHandler::Init(): Failed to get info for team 21843: Operation on invalid team
2024-06-26 08:23:15 KERN: debug_server: KillTeam(): Error getting info for team 21843: Operation on invalid team
2024-06-26 08:23:15 KERN: debug_server: Killing team 21843 ()
EDIT2:
Even with the tagged source for 0.5.2 it crashes, the archive supplied launched fine the first time, crashes too now.
PS. creating a package for it shouldn’t be too hard, but it should be more stable then it is atm. For the record, thanks for keeping track on Haiku builds! +1
EDIT3:
Could use a small SVG icon to convert to IOM
You can find multiple SVG variants of the ecode icon here: eepp/bin/assets/icon at develop · SpartanJ/eepp · GitHub
Thanks, that worked!
Too bad for the crashes, sometimes I get it to launch and open files, on a next run it crashes when opening the project again.
PS @Prognoz I can’t seem to type in the Terminal session?
For the record, created a ecode_bin package here already with the released haiku archive upstream
EDIT: Created a package from the 2.7.2 source archive, seems the 0.5.2 is build with this one?
Packaging done
I was finally able to run again ecode from Haiku thanks to beta 5 which works great from the VM. Thanks to that I was able to reproduce the very annoying crash and finally fixed it. A couple of days ago released version 0.6.1 but still had this bug, but I reuploaded the patched version again here and should not crash anymore at least because of that bug hehe.
PS @Prognoz I can’t seem to type in the Terminal session?
I cannot reproduce it, it works fine here.
For the record, created a ecode_bin package here already with the released haiku archive upstream
Cool! It’s possible to add the recipe to make available in Haiku repositories? That would be great.
Also, how did you change the binary icon? It’s possible to patch the binary from my build script?
Thanks for your help!
Came accross the package just yesterday checking on some backups, will grab the archive and try to build from source again, will get back to you on it. Thanks!
EDIT: the Haiku archive seems to be doing pretty well on a quick check, Terminal also working fine, time for a release in the depot I guess (maybe I’ll check a source build first)
For the icon I converted a svg icon to rdef file to be used in the recipe to package it (iirc)
@Prognoz the Haiku archive is at 0.6.1 (ecode) while the source is 2.8.1 (eepp), build is fine with either (also packaging), If I would push a recipe for this, what version would be needed?
Seems we have an old eepp (0.9.5) that only provides the library, current setup installs the full package, maybe we could drop the old one?
Ecode building Ecode
Did some more work on the packaging, the icon doesn’t need to be in the package (ecode.png), and the SDL2 library doesn’t seem to be needed (works with system installed one and seems to be linked to it).
/boot/system/apps/Ecode/lib> readelf -d libeepp.so
Dynamic section at offset 0xc13ca8 contains 27 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libSDL2-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libGL.so.1]
0x0000000000000001 (NEEDED) Shared library: [libnetwork.so]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libroot.so]
Recipe so far:
SUMMARY="Lightweight multi-platform code editor"
DESCRIPTION="ecode is a lightweight multi-platform code editor designed for modern hardware with \
a focus on responsiveness and performance. It has been developed with the hardware-accelerated \
eepp GUI, which provides the core technology for the editor. The project comes as the first \
serious project using the eepp GUI, and it's currently being developed to improve the eepp GUI \
library as part of one of its main objectives."
HOMEPAGE="https://github.com/SpartanJ/eepp"
COPYRIGHT="2023 Martín Lucas Golini"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/SpartanJ/eepp/archive/refs/tags/eepp-2.8.1.tar.gz"
CHECKSUM_SHA256="9b247c78f7d02a8be7844ec6cccb412dedf044b2151b30632bba03ffd347d67a"
SOURCE_DIR="eepp-eepp-2.8.1"
srcGitRev_2="229324688c26f1e31da0171f3f5193f12253619e"
SOURCE_URI_2="https://github.com/SpartanJ/soil2/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="6487667b9d0bbc72bbce80dc5bf92a365442d657e6c2b7e8f81d4c7cd2d242ea"
SOURCE_FILENAME_2="SOIL2-$srcGitRev_2.tar.gz"
SOURCE_DIR_2="SOIL2-$srcGitRev_2"
srcGitRev_3="aa4b29e5253adce75f6884573de4611869e09de8"
SOURCE_URI_3="https://github.com/SpartanJ/efsw/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="d970f17724f3e25dcd0c155bed800da59af57778d81c158cf84b8eab3e340bc8"
SOURCE_FILENAME_3="efsw-$srcGitRev_3.tar.gz"
SOURCE_DIR_3="efsw-$srcGitRev_3"
ADDITIONAL_FILES="ecode.rdef.in"
ARCHITECTURES="!all x86_64"
PROVIDES="
ecode = $portVersion
cmd:ecode = $portVersion
"
REQUIRES="
haiku
lib:libGL
lib:libSDL2_2.0
"
BUILD_REQUIRES="
haiku_devel
devel:libGL
devel:libSDL2_2.0
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc
cmd:make
cmd:premake5
"
BUILD()
{
cp -r $sourceDir2/* src/thirdparty/SOIL2
cp -r $sourceDir3/* src/thirdparty/efsw
cd projects/haiku/ecode
./build.app.sh
}
INSTALL()
{
mkdir -p $appsDir/Ecode
cp -rf ./projects/haiku/ecode/ecode.app/* $appsDir/Ecode
rm -f $appsDir/Ecode/lib/libSDL2*
rm -f $appsDir/Ecode/ecode.png
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local APP_NAME="Ecode"
local LONG_INFO="$SUMMARY"
local APP_SIGNATURE="application/x-vnd.ecode"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
-e "s|@APP_NAME@|$APP_NAME|" \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
$portDir/additional-files/ecode.rdef.in > ecode.rdef
addResourcesToBinaries ecode.rdef $appsDir/Ecode/ecode
addAppDeskbarSymlink $appsDir/Ecode/ecode Ecode
}
the Haiku archive is at 0.6.1 (ecode) while the source is 2.8.1 (eepp), build is fine with either (also packaging), If I would push a recipe for this, what version would be needed?
I guess we should use the ecode tag (0.6.1), but every time I release a new ecode version I tag a new eepp version, so it’s kinda the same right now, but let’s use ecode tag since that will be always future proof.
Seems we have an old eepp (0.9.5) that only provides the library, current setup installs the full package, maybe we could drop the old one?
Absolutely, I didn’t even know that existed, it’s like a 10 years old version of the library.
Ecode building Ecode
That’s beautiful! . I’ll be working soon in the debugger support, so hopefully soon we will debug ecode in ecode
Recipe so far:
Regarding the recipe I would use the ecode repository instead of eepp:
HOMEPAGE="https://github.com/SpartanJ/ecode"
COPYRIGHT="2024 Martín Lucas Golini"
SOURCE_URI="https://github.com/SpartanJ/eepp/archive/refs/tags/ecode-0.6.1.tar.gz"
SOURCE_DIR="eepp-ecode-0.6.1"
Did some more work on the packaging, the icon doesn’t need to be in the package (ecode.png), and the SDL2 library doesn’t seem to be needed (works with system installed one and seems to be linked to it).
Cool! Thanks for your help!
Why not use the 2.8.1 here, isn’t this the one you used to create the Haiku archive? I don’t see any downside for it atleast.
Yeah, no problem, they are pointing to the same commit so it’s the same!
64bit version available now in the depot.
Could you try after a “pkgman refresh”? I’m out for a while, will check later, build finished some time ago: Buildmaster Status
Found it, thanks. Not showing up on the web interface yet, but I guess that needs a little time to propagate.
It’s usually pretty quick but the web interface hasn’t updated in several weeks. Maybe @nielx knows what the problem is.
Strange thing is, updates on the Besly server are coming through fine, so it must be. something on the Haikuports server.
Still not shown there.
I filed #19101 (HDS website doesn't sync new packages) – Haiku for that and Andrew forwarded it to the admins. Though I’d have expected the admins to keep an eye on the Trac tickets that are in their wheelhouse anyway.