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

src/history.cpp:273:29: error: 'bzero' was not declared in this scope on illumos #5461

Closed
Mno-hime opened this issue Jan 1, 2019 · 10 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@Mno-hime
Copy link

Mno-hime commented Jan 1, 2019

Build of fish 3.0.0 on OpenIndiana 2018.10 (illumos kernel) fails with:

  CXX      obj/history.o
src/history.cpp: In static member function 'static bool history_file_contents_t::read_from_fd(int, void*, size_t)':
src/history.cpp:273:29: error: 'bzero' was not declared in this scope
         bzero(ptr, remaining);
                             ^

#include <strings.h> in src/history.cpp fixed it for me.

illumos bzero(3C) man page: https://illumos.org/man/3c/bzero.

@mqudsi
Copy link
Contributor

mqudsi commented Jan 2, 2019

I used to make it a point to periodically build fish on Solaris, but was forced to stop when the build system broke in the switch to CMake, then that was fixed and fish 3.0 was released before I had a chance to do so.
Is that typically sufficient for OpenIndiana?

@mqudsi mqudsi closed this as completed in ef23923 Jan 2, 2019
@zanchey zanchey added this to the fish-3.1 milestone Jan 2, 2019
@zanchey zanchey added the bug Something that's not working as intended label Jan 2, 2019
@Mno-hime
Copy link
Author

Mno-hime commented Jan 2, 2019

Is that typically sufficient for OpenIndiana?

I am sorry, I don't understand what you mean...

The easier way to get OpenIndiana is to get it via Vagrant (https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/doc/vagrant.md) or install it to VM from ISO.

Then one can proceed to the build system: https://wiki.openindiana.org/oi/Building+with+oi-userland.

@mqudsi
Copy link
Contributor

mqudsi commented Jan 2, 2019

My question, simply put, if it builds on Solaris is that typically good enough to build on OpenIndiana?

@mqudsi
Copy link
Contributor

mqudsi commented Jan 2, 2019

(Also, bzero(3) is deprecated and there's no reason for us to be using it anyway. I changed this over to memset(3) instead, which presumably fixes the problem.)

@Mno-hime
Copy link
Author

Mno-hime commented Jan 2, 2019

Core OSes do not share code for some 10 years, naturally they diverge, so, it's increasingly similar to building on FreeBSD and assuming it works on DragonFly BSD. It may work, it may not. We are happy if you test on any illumos distribution (e.g. OpenIndiana) and are ready to help you in this regard.

@Mno-hime
Copy link
Author

Mno-hime commented Jan 2, 2019

The fix worked for me. Thanks!

@stellarpower
Copy link

stellarpower commented Feb 8, 2020

This is still present on 3.0.2, I am building on OmniOS and using the CMake build system (configure/make failed but could have been a trivial problem). I am happy to ditch the 3.0 branch and build 3.1b1, but plan to make this into a package and contribute it, so wasn't sure if 3.1 breaks any compatibilities or may be more desireable to install for end users, esp. if currently still in beta stage.

Can the bzero call here be changed to a memset then, and if so, is it worth making this change in the 3.0 line at all?
EDIT: It can and should be replaced, so I guess my question is would a fix to the 3.0 branch be worthwhile, or is development purely on 3.1 now?

@mqudsi - within the illumos world, as far as I know, different distributions are more or less specialised, and have a greater or fewer number of packages that will build as-is, or with few modifications - @Mno-hime would know better than me, but I think certain illumos OSs are seen as better candidates as a reference OS for building software for the illumos kernel.

@zanchey
Copy link
Member

zanchey commented Feb 8, 2020

There are no plans to release a 3.0.3; I'd definitely recommend waiting for 3.1.0 (which is imminent).

@stellarpower
Copy link

Fine by me, I started building 3.1 last night and hit some error so will look that up later, but if there's no reason for anyone not to want the newer version then am happy to get that rolling and when 3.1.0 is out, package that up. Actually, if all goes well with it, would it be desirable to aim for subsequent releases to be compatible for illumos without patching? If 3.1 builds nicely for me on Omni and also works for OpenIndiana and SmartOS as minimum, could perhaps run regressions against any new releases and see if they can be fixed in time for inclusion such that in the future it works out of the box?

@zanchey
Copy link
Member

zanchey commented Feb 28, 2020

If 3.1 builds nicely for me on Omni and also works for OpenIndiana and SmartOS as minimum, could perhaps run regressions against any new releases and see if they can be fixed in time for inclusion such that in the future it works out of the box?

Yes, we would welcome that!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

4 participants