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

Configure/Compile errors for 0.15.1 under macos #43

Open
wkechel opened this issue Mar 22, 2024 · 1 comment
Open

Configure/Compile errors for 0.15.1 under macos #43

wkechel opened this issue Mar 22, 2024 · 1 comment

Comments

@wkechel
Copy link

wkechel commented Mar 22, 2024

Error when trying to configure/compile on macos (here Sonoma 14.4):

autoconf
configure.ac:246: warning: AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS

Compilation fails:

...
-c `echo /opt/projects/prs/g480/src/rl_json-0.15.1/generic/parser.c` -o parser.o
In file included from /opt/projects/prs/g480/src/rl_json-0.15.1/generic/parser.c:1:
/opt/projects/prs/g480/src/rl_json-0.15.1/generic/rl_jsonInt.h:16:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.

The file is not present. I tried to use <machine/endian.h>, but this fails as well with all bexxxx-functions missing:

...
-c `echo /opt/projects/prs/g480/src/rl_json-0.15.1/generic/cbor.c` -o cbor.o
/opt/projects/prs/g480/src/rl_json-0.15.1/generic/cbor.c:46:18: error: call to undeclared function 'be32toh'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        uint32_t        uval = be32toh(*(uint32_t*)p);
...
@cyanogilvie
Copy link
Member

The endian conversion functions are only used by the WIP CBOR code, which I may end up factoring out of rl_json into its own extension. Despite the claims in the CBOR standard it really isn't close to a sort of binary serialisation of JSON, the impedance mismatch is large.

Since the CBOR work is the only change since version 0.14, I'd recommend rather using that release for now. Of course the right fix is to figure out how to portably implement efficient endian conversion, but since I don't have access to a MacOS or Windows platform that will take quite a bit of work, and I'm unfortunately committed with a work deadline at the moment, so it will be some time before I can address it properly.

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

No branches or pull requests

2 participants