From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
linux-sparse@vger.kernel.org
Subject: Re: Compile errors with LLVM v17
Date: Tue, 16 Jan 2024 00:50:33 +0000 [thread overview]
Message-ID: <8d6c2b91-87cc-4252-bc4e-13cce7c9ff6c@ramsayjones.plus.com> (raw)
In-Reply-To: <91bbfbf8-d84d-4b4e-861d-c1cdbfcd56e6@moroto.mountain>
On 15/01/2024 10:32, Dan Carpenter wrote:
> I upgraded my Debian system and started getting compile errors with LLVM
> version 17. Apparently those APIs will need to be changed.
> https://llvm.org/docs/OpaquePointers.html
Yep, I recently updated to LLVM version 14 and these APIs are shown
as deprecated (sparse-llvm is still built):
$ make
Makefile:170: Your system does not have sqlite3, disabling semind
Makefile:192: Your system does not have gtk3/gtk2, disabling test-inspect
CC compile.o
...
CC sparse-llvm.o
sparse-llvm.c: In function ‘get_sym_value’:
sparse-llvm.c:305:25: warning: ‘LLVMConstGEP’ is deprecated [-Wdeprecated-declarations]
305 | result = LLVMConstGEP(data, indices, ARRAY_SIZE(indices));
| ^~~~~~
In file included from /usr/lib/llvm-14/include/llvm-c/Core.h:18,
from sparse-llvm.c:6:
/usr/lib/llvm-14/include/llvm-c/Core.h:2157:18: note: declared here
2157 | LLVMValueRef LLVMConstGEP(LLVMValueRef ConstantVal,
| ^~~~~~~~~~~~
/usr/lib/llvm-14/include/llvm-c/Deprecated.h:29:3: note: in definition of macro ‘LLVM_ATTRIBUTE_C_DEPRECATED’
29 | decl __attribute__((deprecated))
| ^~~~
sparse-llvm.c: In function ‘calc_gep’:
sparse-llvm.c:488:9: warning: ‘LLVMBuildInBoundsGEP’ is deprecated [-Wdeprecated-declarations]
488 | addr = LLVMBuildInBoundsGEP(builder, base, &off, 1, name);
| ^~~~
In file included from /usr/lib/llvm-14/include/llvm-c/Core.h:18,
from sparse-llvm.c:6:
/usr/lib/llvm-14/include/llvm-c/Core.h:3904:18: note: declared here
3904 | LLVMValueRef LLVMBuildInBoundsGEP(LLVMBuilderRef B, LLVMValueRef Pointer,
| ^~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-14/include/llvm-c/Deprecated.h:29:3: note: in definition of macro ‘LLVM_ATTRIBUTE_C_DEPRECATED’
29 | decl __attribute__((deprecated))
| ^~~~
sparse-llvm.c: In function ‘output_op_load’:
sparse-llvm.c:714:9: warning: ‘LLVMBuildLoad’ is deprecated [-Wdeprecated-declarations]
714 | target = LLVMBuildLoad(fn->builder, addr, name);
| ^~~~~~
In file included from /usr/lib/llvm-14/include/llvm-c/Core.h:18,
from sparse-llvm.c:6:
/usr/lib/llvm-14/include/llvm-c/Core.h:3892:18: note: declared here
3892 | LLVMValueRef LLVMBuildLoad(LLVMBuilderRef, LLVMValueRef PointerVal,
| ^~~~~~~~~~~~~
/usr/lib/llvm-14/include/llvm-c/Deprecated.h:29:3: note: in definition of macro ‘LLVM_ATTRIBUTE_C_DEPRECATED’
29 | decl __attribute__((deprecated))
| ^~~~
sparse-llvm.c: In function ‘output_op_call’:
sparse-llvm.c:822:9: warning: ‘LLVMBuildCall’ is deprecated [-Wdeprecated-declarations]
822 | target = LLVMBuildCall(fn->builder, func, args, n_arg, name);
| ^~~~~~
In file included from /usr/lib/llvm-14/include/llvm-c/Core.h:18,
from sparse-llvm.c:6:
/usr/lib/llvm-14/include/llvm-c/Core.h:3992:18: note: declared here
3992 | LLVMValueRef LLVMBuildCall(LLVMBuilderRef, LLVMValueRef Fn,
| ^~~~~~~~~~~~~
/usr/lib/llvm-14/include/llvm-c/Deprecated.h:29:3: note: in definition of macro ‘LLVM_ATTRIBUTE_C_DEPRECATED’
29 | decl __attribute__((deprecated))
| ^~~~
LD sparse-llvm
$
Since I don't know anything about LLVM, I have been compiling like so:
$ make LLVM_CONFIG=false
just to suppress the warnings (and it runs 42 less tests!). I have been
meaning to implement a make variable to suppress the sparse-llvm build
which can be placed into 'local.mk' ... but, well I never seem to have
enough round tuits! :)
ATB,
Ramsay Jones
prev parent reply other threads:[~2024-01-16 0:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 10:32 Compile errors with LLVM v17 Dan Carpenter
2024-01-16 0:50 ` Ramsay Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d6c2b91-87cc-4252-bc4e-13cce7c9ff6c@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=dan.carpenter@linaro.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox