<trungnt2910[m]>
<x512[m]> "Be sure that -fPIE flag is not..." <- Removing all instances of `-fPIE` sure does solve things.
<trungnt2910[m]>
<x512[m]> "trungnt2910: https://dev.haiku-..." <- So according to this description app windows would draw to `Surface` and `Desktop` would decide which region to render, as well as setting some properties like position and Z-order of a `Surface`?
<trungnt2910[m]>
<x512[m]> "Be sure that -fPIE flag is not..." <- Why is that the case?
<x512[m]>
<trungnt2910[m]> "Why is that the case?" <- Because all executables in Haiku are technically shared libraries. The only difference that NULL entry point is allowed for shared libraries, but not for executables. Executable loading process is different from most UNIX-like systems: kernel do not load or even look at requested executable. Instead... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/rtCmQvvuMJNRHdGMEgFOXOFV>)
<x512[m]>
Haiku also do not support static executables.
<phschafft>
hm.
<x512[m]>
Ideally Haiku GCC should reject or ignore -fPIE flag.
<x512[m]>
Also -static flag.
<trungnt2910[m]>
> <@x512:matrix.org> Because all executables in Haiku are technically shared libraries. The only difference that NULL entry point is allowed for shared libraries, but not for executables. Executable loading process is different from most UNIX-like systems: kernel do not load or even look at requested executable. Instead that kernel... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/TtQefBRJWzXqfHTKqymKgrbN>)
<phschafft>
I mean they can be static as in they contain all they use. but they are still loaded the same way as any other executable?
<trungnt2910[m]>
phschafft: Not a good idea. Considering the unstable syscall ABI, containing `libroot.so` in a executable is not safe.
<trungnt2910[m]>
s/.so//
<x512[m]>
Executables are loaded directly by kernel in Linux. Statically linked executables are even not use any dynamic loader except kernel built-in.
<phschafft>
trungnt2910[m]: yes. totally with you there. I mean even on other systems static linked binaries are to be avoided in general case.
* phschafft
nods to x512[m].
<win8linux[m]>
x512[m]: Really?
<win8linux[m]>
Does Haiku not support static libs either?
<phschafft>
but I think the kernel still links some of the system stuff into the binary. like vdso.
<phschafft>
which kind of allows the kernel to be a bit more compatible with stuff like syscalls. but that still has limitations.
<x512[m]>
Haiku is similar to Windows with that. No executable files variations with different incompatible ABI.
<x512[m]>
win8linux[m]: Static libraries are supported, but core runtime libraries such as `libroot.so` must be dynamic.
<win8linux[m]>
Right, asked sincee I'
<win8linux[m]>
Right, asked since I could've sworn there are many packages in HaikuPorts that use static libs.
<x512[m]>
BeOS also have historical background of using various executable formats: PEF, PE, ELF.
<win8linux[m]>
<x512[m]> "Also -static flag." <- Also, what about packages that use `-static` in builds?
<x512[m]>
If using dynamic loader, Linux actually load 2 executables: target executable and runtime loader (called "program interpreter" in Linux).
<x512[m]>
win8linux[m]: It are broken.
<PulkoMandy>
win8linux[m], we are in the process of removing static libraries from most of the packages
<win8linux[m]>
Yeah, noticed that over the last couple days.
<trungnt2910[m]>
With a good package management that can clean dependencies maybe static libraries aren't really needed.
<PulkoMandy>
that is not directly related to the discussion here, but static libraries are not great from a security/updates point of view in the context of a package manager (if you want to fix a bug or security issue, you have to rebuild all packages using the library, instead of rebuilding just the library)
<trungnt2910[m]>
But on systems like Windows, I love static libraries.
<x512[m]>
There are no static ntdll for Windows.
<PulkoMandy>
yes, on windows it makes sense because each executable would ship its own copy of each dll it needs anyway. So there's no point in shared libraries if you don't actually share them
<trungnt2910[m]>
x512[m]: Only for third-party libraries.
<win8linux[m]>
Meanwhile in Linuxland, the general direction there seems to be moving towards more static libraries and container-based package management.
<trungnt2910[m]>
For HyClone, for example, I statically link zlib zstd and gmp.
<PulkoMandy>
win8linux[m], depends who you ask
<trungnt2910[m]>
And also I created libhpkg just for the sake of static linking.
<x512[m]>
For some cases like Clang using dynamic libraries may significantly slow down program load.
<PulkoMandy>
there are some projects and companies doing things just like on windows because that's how they know to do it
<trungnt2910[m]>
But I keep the dynamic libraries for standard system libraries.
<PulkoMandy>
but for example Debian has not changed their policies and is still doing shared libraries as usual
<PulkoMandy>
I think it is the same for most Linux distributions
<PulkoMandy>
so, as usual... Linux goes with "why not both?" and gives you too many choices
<win8linux[m]>
Was mainly referring to the rising popularity of Flatpak and Canonical's push for Snaps.
<PulkoMandy>
I don't have any of that on my Linux machines :)
<PulkoMandy>
(well I think I have one piece of software in a .appImage, that have not run in a while)
<win8linux[m]>
Oh yeah, AppImage too.
<x512[m]>
On Linux static libraries designed to be used for linking with executable and with shared libraries are ABI incompatible that introduce a mess.
<win8linux[m]>
Think that's why AppImages don't work on Linux distributions using musl.
<win8linux[m]>
As usual, it's a mess over in Linuxland.
<x512[m]>
<trungnt2910[m]> "So according to this description..." <- Something like that.
<trungnt2910[m]>
Nice. I don't know much about rendering graphics and stuff but if this project starts I will try to see where I can help. And I'll make a client as soon as there's a prototype.
<x512[m]>
For remote desktop use case Surface can be also used for passing window events such as minimize host window requesy.
HaikuUser has joined #haiku
<x512[m]>
Someone need to write a doumentation about Haiku executables ABI.
<shaka444[m]>
Anybody working on the RISC-V64 port? Looking for hardware recommendations -boards, laptop, tablet etc..
<Anarchos>
waddlesplash no more freebsd/realtekwifi kdl with hrev56929 \o/ Thanks a lot
hightower4 has quit [Ping timeout: 480 seconds]
benjismith has joined #haiku
<win8linux[m]>
Currently attempting to build a project on Haiku, however for whatever reason linking fails despite the supposedly missing LDFLAGS being present:
<trungnt2910[m]>
It does indeed not end with a new line.
<Begas_VM>
Not seeing any other error in the build for musicbrainz
<Begas_VM>
can't change that file as it's read-only ;)
<Begas_VM>
biab
bbjimmy has quit [Quit: Vision[]: i've been blurred!]
<x512[m]>
trungnt2910: Most of HyClone source files have no new line at end.
<trungnt2910[m]>
x512[m]: And I don't intend to compile it with GCC2.
<x512[m]>
But why do not insert new line?
<trungnt2910[m]>
Even if I decide to work on x86_gcc2 support in the future, HyClone files will be compiled with the latest GCC and only linked to libroot and runtime_loader through the C ABI and servercall interface.
<trungnt2910[m]>
x512[m]: Because the IDE doesn't do it by default.
<x512[m]>
Some special IDE?
bbjimmy has joined #haiku
<x512[m]>
It seems strange.
<trungnt2910[m]>
And I haven't seen any problems when not having new lines (except when following coding standards of other projects, of course).
<trungnt2910[m]>
x512[m]: Visual Studio Code.
nosycat has joined #haiku
<trungnt2910[m]>
x512[m]: If there is some problem with not having the new lines I'll add them. That's a task that probably takes 5 minutes and 10 lines of C#.
<trungnt2910[m]>
But currently as the codebase does not have any trailing new lines I'll just won't add them for new files to make it consistent.
<win8linux[m]>
<x512[m]> "win8linux: -lnetwork" <- Thanks, the program builds and links now.
<win8linux[m]>
Does Haiku have env vars?
<win8linux[m]>
Saw discussion in the past of Haiku not having those, but not quite sure.
<x512[m]>
win8linux[m]: Yes of course.
<Begas_VM>
trungnt2910[m], not asking to change anything for HyClone :) (maybe only for that one header) ;)
<Begasus>
musicbrainz (gcc2) is still being used by armyknife, so would be nice to still have it around
<Begas_VM>
hmm ... not updating it will make it dissapear also :)
<Begas_VM>
keeping the changes locale, no real bump there (nevertheless good to know)
<x512[m]>
Isn't GCC 2 already more than 20 years old?
<PulkoMandy>
trungnt2910[m], I think newline at end of file is or was part of the C standard. And also VSCode created problem in my team at work, we had a script to cat several files together and it didn't work as expected because some files were missing newlines. I'd recommend enabling this
<PulkoMandy>
(there's an option in VSCode settings)
<PulkoMandy>
but indeed C++11 removed that requirement
<win8linux[m]>
Is it possible to define an env var in a recipe for a program to always launch with or is it necessary to create a launch script to link in DeskBar?
<x512[m]>
Launch script is needed.
<win8linux[m]>
Ok
<phschafft>
line seperator vs. line terminator.
<phschafft>
DOS-ish thinking is that \r\n *seperates* two lines. while UNIX-ish thinking is that \n terminates the current line.
<phschafft>
so each line ends with a \n.
<phschafft>
if it doesn't end with one it's incomplete.
<Anarchos>
how to add some .pc files to pkg-config ? they lay on readonly /boot/system/lib
<phschafft>
you can add directories to pkg-config's search path via PKG_CONFIG_PATH
<phschafft>
for example I often use something like: ./configure --prefix=/home/phschafft/ROOT/ PKG_CONFIG_PATH=/home/phschafft/ROOT/lib/pkgconfig/
<Anarchos>
phschafft ok thanks
Anarchos has quit [Quit: Vision[]: i've been blurred!]
benjismith has quit []
freddietilley has quit [Quit: WeeChat 3.8]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Skipp_OSX has joined #haiku
<x512[m]>
> static_assert(B_SYSTEM_TIMEBASE == HAIKU_CLOCK_MONOTONIC, "Something in Haiku's ABI has changed.");
<x512[m]>
How dare someone can ever consider break Haiku API? 😀