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

Haiku support #2697

Closed
wants to merge 27 commits into from
Closed

Haiku support #2697

wants to merge 27 commits into from

Conversation

extrowerk
Copy link

No description provided.

@extrowerk extrowerk changed the title WIP - Haiku support Haiku support Aug 20, 2017
@KalleZ
Copy link
Member

KalleZ commented Aug 28, 2017

I was thinking of removing support for BeOS2000 in the source of master and I'm wondering how much this will affect the PR if you could provide me with some data

@extrowerk
Copy link
Author

Afaik not at all, but let me look a bit better into this.

@extrowerk
Copy link
Author

@KalleZ : Haiku defines just HAIKU and not BEOS, so every code guarded by only ifdef BEOS could be deleted.

@KalleZ
Copy link
Member

KalleZ commented Aug 29, 2017

Thank you for checking, I will most likely cook up a patch tonight so it should be simple to fix merge conflicts e.g. getrusage()

@KalleZ
Copy link
Member

KalleZ commented Aug 29, 2017

@miqlas Please see my review comment too, seems like you are missing an extra & to prevent a build failure

@extrowerk
Copy link
Author

@KalleZ : thanks, but i don't see your review comment. Where is it?

@extrowerk
Copy link
Author

@KalleZ : looks ok to me. Thanks for cleanup.
A question: can you maybe help to fix the conflicts? I have absolutely no experiences with it and i don't want to mess things up.

@KalleZ
Copy link
Member

KalleZ commented Aug 29, 2017

I'm using TortoiseGit on Windows which does most of these issues for me in a GUI, but this Stackoverflow article should help you on the CLI:
https://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git

@extrowerk
Copy link
Author

extrowerk commented Aug 30, 2017

@KalleZ : i think i solved it, thanks for your help.
I have no idea, why travis failing, can you check it please?

@KalleZ
Copy link
Member

KalleZ commented Aug 30, 2017

The Travis failure is unrelated to this, so don't be afraid, as Travis is often giving the wrong impression :)

If you scroll to the bottom of the failed job, you can see its a SOAP test that fails

@extrowerk
Copy link
Author

@KalleZ: i just tested your BeOS cleanup commit yesterday, everything fine.
Can we get this merged?

@nikic
Copy link
Member

nikic commented Aug 31, 2017

@remicollet Any comments on this one? No problems with ifdefing code, but I'm a bit apprehensive about the buildsystem changes. Especially the added checks for develop/headers everywhere are concerning.

configure.ac Outdated
@@ -416,6 +416,7 @@ dnl are usually in libnsl
dnl Also, uClibc will bark at linking with glibc's libnsl.

PHP_CHECK_FUNC(socket, socket)
AC_CHECK_LIB(network, socket)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could amend the preceding PHP_CHECK_FUNC() instead.

PHP_CHECK_FUNC(socket, socket, network)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i'll fix this.

@extrowerk
Copy link
Author

Any news here?

@KalleZ
Copy link
Member

KalleZ commented Oct 23, 2017

Hi, is the patch all completed and well tested on your end?

@extrowerk
Copy link
Author

@KalleZ : better to test it again completly. I'll report back.

@KalleZ
Copy link
Member

KalleZ commented Oct 23, 2017

@nikic @remicollet still any concerns with the build system changes?

@extrowerk
Copy link
Author

@KalleZ : tested the patches, looks ok on Haiku.

@extrowerk
Copy link
Author

Any news here?

@weltling
Copy link
Contributor

I'd see the build system change indeed questionable, too, while the code change should be fine. Couldn't the path's topic be solved through symlinking, etc.?

Also reading this https://www.haiku-os.org/blog/kallisti5/2017-10-09_where_is_haiku_r1/ , looks like Haiku has to confront with more serious challenges than web development right now.

Thanks.

@waddlesplash
Copy link

@weltling huh? Just because some developers are off dealing with bigger problems doesn't mean that developers entirely unconnected to those problems (like @extrowerk here) can't work on other things. So I don't see how that's relevant.

Also no, the paths topic cannot be solved through symlinking. Haiku's main system hierarchy is read-only due to how our package manager works (and in a HaikuPorter chroot, things are even more locked down than normal, so symlinks could not even be added through another package.)

@weltling
Copy link
Contributor

@waddlesplash it is great someone still finds time to work on things. And of course things like Haiku is interesting. The issue i'd personally see right now, and that's why i linked that blog previously - the change with new paths is quite intrusive while the OS itself is still establishing the basic things. Once a patch is merged, is has to be supported by the PHP community, where the target status seems uncertain still :( If summing that up, it is concerning, as for me.

Are similar patches pushed to other projects, like postgres, cairo, glib, etc.? Could you link to them?

Thanks.

@waddlesplash
Copy link

The issue i'd personally see right now, and that's why i linked that blog previously - the change with new paths is quite intrusive while the OS itself is still establishing the basic things

Well, the path change occurred back in 2013 with the merge of the package manager. That was the last real "basic thing", and mostly all of the things in that blogpost are infrastructural (package buildbots vs. manual package building, etc.)

Are similar patches pushed to other projects, like postgres, cairo, glib, etc.? Could you link to them?

Yes: lighttpd, Rust, Swift, QEMU, Mono (although incomplete), libgit2, FreePascal, SDL2 (has had support since the BeOS days), Qt has had support for some years now, LMMS, mGBA. And I can find even more if you want...

@weltling
Copy link
Contributor

weltling commented Nov 27, 2017

Thanks for the links. Yep, for small libs it doesn't look that huge. I was also doing some research and found https://github.com/haikuports/haikuports. It looks like there's already some PHP version with a similar patch included https://github.com/haikuports/haikuports/tree/master/dev-lang/php.

I then went to check some other libs from haiku ports, too. Fe primarily it was interesting other software depending on same libs as PHP and what it requires. It turned out, fe that there's also gnupg and git, that depend on libcurl. Libcurl is listed as required in their *.recipe files, but i don't see any patches regarding licurl neither in the ports repo nor in the mainstream regarding Haiku. Same for example if looking at odt2txt and its libzip dependency. So the question that I immediately had - what is specifically different between PHP and those examples, that requires such an explicit patch for paths? Or in general, some ports list libs as a requirement, the build scripts are similar m4, but some projects in the ports using same libs are not patched at all neither in the core nor upstream.

Thanks.

@korli
Copy link

korli commented Nov 27, 2017

Libs and headers are usually available in the default search paths, configure checks the presence of libs and headers, eventually with pkg-config. PHP doesn't seem to follow this method which makes hard coded paths required. It would be indeed better to avoid hard coded paths.

@lazybullfrog
Copy link

Status on this? I've been working on haikuports recipes for > 7.1.x

Thanks everyone for all the hard work and planning to date on this!

@krakjoe
Copy link
Member

krakjoe commented May 10, 2021

This appears to have gone stale, so closing this.

@krakjoe krakjoe closed this May 10, 2021
@nikic
Copy link
Member

nikic commented May 10, 2021

FWIW in the meantime PHP has switched to using pkg-config for most libraries, so this is probably mostly resolved at this point.

If someone is still interested in this, I think it's okay to add ifdefs for haiku where necessary -- the main problematic part here were the ad-hoc build system changes.

@korli
Copy link

korli commented May 10, 2021

the current patchset at Haikuports is rather minimal:
https://github.com/haikuports/haikuports/blob/master/dev-lang/php/patches/php-7.4.16.patchset
the unichar problem should be gone in the next Haiku release, we'll follow up with a new PR by then.

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

Successfully merging this pull request may close these issues.

8 participants