Compiler errors

Hello there, starting this topic so we maybe could collect some errors we run into and maybe some solution to the problems :slight_smile:
Atm I’m working on a recipe for chafa, where I get the next error on “__int32_t”
error: unknown type name '__int32_t'; did you mean 'u_int32_t'?
using “u_int32_t” does the trick, but I’m pretty sure it’s not the correct solution (have been looking in which header it could be using but didn’t find it yet.

For something like this i create BuildLOG for years (time of alpha 4.1 iirc)

4 Likes

Nice tool, but I can’t react there if you run into a problem I guess?

It is for saving porting efforts, so people can learn something. Many times people porting things to beos/haiku they change the make file and other options without give this out to the included source and the community.

Where possible patches are pushed upstream and if not needed anymore removed from the repository.
Haikuports contains lots of work from people changing and patching, all those are visible for the community.
If you would want to port libfoo or update it you can find valuable information there (wouldn’t be the first time I hit into something and found a solution there) :slight_smile:

Trying to install the app gives me an error: “nothing provides yabbesly”, it needs to fetch that from the besly repo?
EDIT even after adding the repo with pkgman it doesn’t find yabbesly. my guess that the requirement in the package is wrong and it should be “libyab” instead of “yabbesly”, installing libyab works and the app launches.
But then I’m presented with an empty app, so I can’t find any information there on how others did the trick?

Oh, so i need to rebuild it. I will do it this evening

1 Like

I have rebuild the program with official yab version as dependencies. And now for booth architectures 32bit and 64bit

2 Likes

The u on u_int32_t stands for unsigned. I’m not sure without looking at the code but maybe it needs a signed 32-bit integer?

1 Like

@korli replied to the PR just a while back, but thanks for stepping in, seems the sollution was to add "typedef int32_t __int32_t" in the source file, ps this was only needed for 32bit Haiku :slight_smile:

This is a glibc internal type, see https://code.woboq.org/userspace/glibc/bits/stdint-intn.h.html#int32_t

1 Like

Someone may run into this at one point, now we could find the solution here also :slight_smile:

Another error when trying to build “task” error: 'timegm' was not declared in this scope
Offending line is:


Replacing timegm with time_t seems to solve the problem?

Timegm should be available in the bsd headers, try to include the features.h, or define _DEFAULT_SOURCE.

On chafa, got a reply from the maintainer:

I think it would be better to just change the instances of __int32_t to guint32.

No luck on either adding “#include <features.h>”, “#define _DEFAULT_SOURCE” or “#define _BSD_SOURCE” so far (in the source file)

Will check morning.

1 Like

Well i forgot about it… then today!

This did the trick for me:


////////////////////////////////////////////////////////////////////////////////

+#define _DEFAULT_SOURCE
#include <cmake.h>

So add the define before the includes…

1 Like

or define on the commandline

1 Like