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

Add Haiku support #56

Open
wants to merge 13 commits into
base: devel
Choose a base branch
from
Open

Add Haiku support #56

wants to merge 13 commits into from

Conversation

mmuman
Copy link

@mmuman mmuman commented Aug 12, 2018

This fixes and upstreams a port by @puckipedia done some years ago.

Didn't check the premake stuff yet (it seems we have a recipe for 4.4 but not 5 yet), but the Scons-built test do work.

@mlabbe
Copy link
Owner

mlabbe commented Dec 30, 2018

Thanks for sharing this pull request with me and apologies for taking so long to get back.

I don't have the Haiku experience to review or maintain but I am willing to maintain a contrib-haiku branch which merges Haiku updates from contributors.

Before I do this I would like to know if you are interested in supporting Haiku via premake when premake5 comes available (maybe it has by now)?

@mmuman
Copy link
Author

mmuman commented May 18, 2019

Oh I didn't reply yet… you're not the only one lagging ;-)

Not sure why you want to keep this in a separate branch…

We still have premake 4.4 in haikuports. Looks like 5 is now alpha, I guess someone will update the recipe…

@mmuman
Copy link
Author

mmuman commented May 18, 2019

I managed to build premake 5 alpha13 (alpha14 has a missing file).

@mmuman
Copy link
Author

mmuman commented May 18, 2019

But of course it won't work…

@mlabbe
Copy link
Owner

mlabbe commented Sep 28, 2019

I actually installed HaikuOS onto virtualbox tonight and attempted to compile it. I noticed this PR uses the deprecated Scons approach to compiling. Unfortunately, it also failed to build tests with link errors: undefined reference to 'operator new[](unsigned long). This is because gcc is being used to link instead of g++.

I haven't looked at the source code yet.

Is there any will to get this cleaned up? I would consider merging it if the code was of a maintainable quality and just worked for anyone who wanted to build it and its tests.

The first order of business is moving over to the existing Premake system. Let me know.

@mmuman
Copy link
Author

mmuman commented Sep 28, 2019

I got premake working but I still have to squash the PR

It's possible it doesn't link with the C++ library by default. You might want to try to build after running setarch x86 which will use the newer gcc than the 2.95.

@mlabbe
Copy link
Owner

mlabbe commented Sep 28, 2019

It doesn't work on my fresh install.

Let me know when premake support is in there and it works from a fresh checkout and provides build instructions that works from a fresh install and I'll check it out.

@mlabbe
Copy link
Owner

mlabbe commented Oct 5, 2019

This PR has merge conflicts and doesn’t build, and has had no comments in a week. In the interest of keeping NFD’s github page current, I’d like to hear a commitment to move this forward with a specific timeframe, or we can close this and try again later with a different PR.

@mmuman
Copy link
Author

mmuman commented Oct 6, 2019

Well I spent the time rebasing the PR on premake… time spent somewhere is not spent on project that's already been waiting for months.

I'll rebase and see.

Wait, which version did you install, beta, nightly? Did you take the gcc2h or a 64bit one?

@mmuman
Copy link
Author

mmuman commented Oct 6, 2019

I rebased but I can't get premake 5 alpha13 to work so I can't add the haiku-specific part yet:
Error: [string "src/base/_foundation.lua"]:57: [string "d/tools/dmd.lua"]:106: attempt to index a nil value

I'll try to make an alpha14 package with my patches…

@mmuman
Copy link
Author

mmuman commented Oct 16, 2019

I finally managed to get a usable premake5 package… but now I have to implement NFD_PickFolder

@mmuman
Copy link
Author

mmuman commented Oct 19, 2019

It should build now with gcc > 2.95 (I suppose you didn't use the official gcc2 hybrid image which is why you had the missing new()), but I'd still like to get gcc2 working. However it seems premake itself uses options that it doesn't understand properly.

@mlabbe
Copy link
Owner

mlabbe commented Oct 26, 2019

I'll check it out. What are the exact commands I should type in after doing a fresh install of the OS to get this fully built?

@mmuman
Copy link
Author

mmuman commented Oct 26, 2019

On latest nightly (gcc2h, I don't think the buildbot generated a premake package for the other ones) you should be able to:

pkgman install cmd:gcc_x86 cmd:ld_x86 premake_x86
setarch x86
cd build
premake5 --verbose dist
cd gmake_haiku
make verbose=1

puckipedia and others added 13 commits November 18, 2023 17:09
The members of the strucs where used after the looper deleted itself
(via PostMessage(B_QUIT_REQUESTED)), resuting in bad data.

So we copy the struct instead of getting a reference,
before deleting the looper.
We previously only returned the file names, not the full paths.
Note we want x86 build by default.

Only gcc>2 build works for some reason, I suppose premake
doesn't care about gcc2 and uses incompatible args, but we do.
@mmuman
Copy link
Author

mmuman commented Nov 18, 2023

I noticed ImHex that I want to port actually uses this as a git submodule…
Just rebased and fixed the build.

@mmuman
Copy link
Author

mmuman commented Nov 19, 2023

Oddly premake munges all the OBJDIR from all makefiles to remove the ../ for some reason, not sure what to do about this…

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

Successfully merging this pull request may close these issues.

3 participants