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 failed on FreeBSD-14 which use clang15 as cc #29

Open
wenheping opened this issue Jun 30, 2023 · 1 comment
Open

Build failed on FreeBSD-14 which use clang15 as cc #29

wenheping opened this issue Jun 30, 2023 · 1 comment
Labels
question Further information is requested

Comments

@wenheping
Copy link

the failed build log:

===> Building for rhonabwy-1.1.11
[ 25% 1/4] /usr/bin/cc -Drhonabwy_EXPORTS -I/usr/local/include -I/usr/ports/security/rhonabwy/work/rhonabwy-1.1.11/include -I/usr/ports/security/rhonabwy/work/.build -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Werror -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -std=gnu99 -fPIC -Wextra -Wconversion -MD -MT CMakeFiles/rhonabwy.dir/src/jwe.c.o -MF CMakeFiles/rhonabwy.dir/src/jwe.c.o.d -o CMakeFiles/rhonabwy.dir/src/jwe.c.o -c /usr/ports/security/rhonabwy/work/rhonabwy-1.1.11/src/jwe.c
FAILED: CMakeFiles/rhonabwy.dir/src/jwe.c.o
/usr/bin/cc -Drhonabwy_EXPORTS -I/usr/local/include -I/usr/ports/security/rhonabwy/work/rhonabwy-1.1.11/include -I/usr/ports/security/rhonabwy/work/.build -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Werror -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -std=gnu99 -fPIC -Wextra -Wconversion -MD -MT CMakeFiles/rhonabwy.dir/src/jwe.c.o -MF CMakeFiles/rhonabwy.dir/src/jwe.c.o.d -o CMakeFiles/rhonabwy.dir/src/jwe.c.o -c /usr/ports/security/rhonabwy/work/rhonabwy-1.1.11/src/jwe.c
In file included from /usr/ports/security/rhonabwy/work/rhonabwy-1.1.11/src/jwe.c:47:
In file included from /usr/local/include/nettle/bignum.h:50:
/usr/local/include/gmp.h:1875:30: error: operand of ? changes signedness: 'const int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return __GMP_ABS (__gmp_z->_mp_size);

/usr/local/include/gmp.h:446:37: note: expanded from macro '__GMP_ABS'
#define __GMP_ABS(x)   ((x) >= 0 ? (x) : -(x))
                                  ^
/usr/local/include/gmp.h:1875:10: error: operand of ? changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return __GMP_ABS (__gmp_z->_mp_size);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/gmp.h:446:42: note: expanded from macro '__GMP_ABS'
#define __GMP_ABS(x)   ((x) >= 0 ? (x) : -(x))
                                       ^~~~
2 errors generated.
ninja: build stopped: subcommand failed.

Any suggestion ?
@babelouest
Copy link
Owner

It seems that clang has issues with the -Wextra -Wconversion flag, but I don't know if rhonabwy can do something about that.

As a workaround, you can try to disable the extra warnings in the cmake script here: https://github.com/babelouest/rhonabwy/blob/master/CMakeLists.txt#L170

@babelouest babelouest added the question Further information is requested label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants