[go: up one dir, main page]

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

Build error with Clang on 10.6–10.7: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations #514

Open
barracuda156 opened this issue Mar 14, 2024 · 0 comments

Comments

@barracuda156
Copy link
[ 72%] Building C object CMakeFiles/picotls-minicrypto.dir/deps/cifra/src/poly1305.c.o
/opt/local/bin/clang-mp-16  -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/deps/cifra/src/ext -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/deps/cifra/src -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/deps/micro-ecc -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/deps/picotest -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/build -I/opt/local/libexec/openssl3/include -I/opt/local/include -std=c99 -Wall -O2 -g  -pipe -I/opt/local/libexec/openssl3/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -DPICOTLS_USE_BROTLI=1 -DPTLS_HAVE_FUSION=1 -DPTLS_HAVE_MBEDTLS=1 -arch x86_64 -mmacosx-version-min=10.7 -MD -MT CMakeFiles/picotls-minicrypto.dir/deps/cifra/src/poly1305.c.o -MF CMakeFiles/picotls-minicrypto.dir/deps/cifra/src/poly1305.c.o.d -o CMakeFiles/picotls-minicrypto.dir/deps/cifra/src/poly1305.c.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/deps/cifra/src/poly1305.c
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/lib/fusion.c:989:16: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if ((ctx = aligned_alloc(32, ctx_size)) == NULL)
               ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_picotls/picotls/work/picotls-eb013f761bf1dc3da244322d8569f57b33a95178/lib/fusion.c:989:16: note: include the header <stdlib.h> or explicitly provide a declaration for 'aligned_alloc'
1 error generated.

Something does not work here as supposed with Clang on 10.6–10.7. (With GCC it works, since I have it building on 10.6.)
Notice that stdlib.h is included in fusion.c, however Clang is not happy.

@kazuho Could you take a look, please?

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

1 participant