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

libui-ng? #48

Open
rubyFeedback opened this issue Jul 15, 2022 · 3 comments
Open

libui-ng? #48

rubyFeedback opened this issue Jul 15, 2022 · 3 comments

Comments

@rubyFeedback
Copy link

Did you guys have a look at libui-ng yet?

https://github.com/libui-ng/libui-ng

@msink
Copy link
Owner

msink commented Jul 15, 2022

Sure, when/if it will have significant advantages over andlabs, for now I do not see any.

@msink
Copy link
Owner

msink commented Jul 22, 2022

Just tried migratiing to libui-ng, and failed on first step - on windows linking failed:

lld-link: error: undefined symbol: std::__throw_bad_array_new_length()
>>> referenced by F:/msys64/mingw64/include/c++/12.1.0/bits\new_allocator.h:125
>>>               libui.a(windows_box.cpp.obj):(std::__new_allocator<boxChild>::allocate(unsigned long long, void const*))
>>> referenced by F:/msys64/mingw64/include/c++/12.1.0/bits\new_allocator.h:125
>>>               libui.a(windows_form.cpp.obj):(std::__new_allocator<formChild>::allocate(unsigned long long, void const*))
>>> referenced by F:/msys64/mingw64/include/c++/12.1.0/bits\new_allocator.h:125
>>>               libui.a(windows_grid.cpp.obj):(std::__new_allocator<gridChild*>::allocate(unsigned long long, void const*))
>>> referenced 18 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Googling and asking JetBrains team led me to
https://youtrack.jetbrains.com/issue/KT-51975/Native-lld-link-error-undefined-symbol-stdthrowbadarraynewlength

It is Kotlin/Native compiler bug, and for now and in near future there isn't easy fix for that.
The only known workaround is compiling libui by gcc 9.x, but I do not know how to do that on CI.

@msink
Copy link
Owner

msink commented Jul 26, 2022

Well, somehow solved issue above - linux and macos libs were dowloaded from CI artifacts, windows built locally by clang version bundled with Kotlin/Native.
https://github.com/msink/kotlin-libui/tree/libui-ng

Seems to work, now can add new functionality to bindings.

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

2 participants