Installed LLVM, Clang and polly through http://polly.llvm.org/polly.sh.
after installation, clang is working fine however polly is not getting recognized.
is there and path that must be set.
I had the same issue when I use the manual method (https://polly.llvm.org/get_started.html) to build llvm with polly and clang.
Then I used the polly.sh script to build everything and now everything works fine. I didn't have to set any path. Just installed after running the script.
Related
I have spent a few hours trying to get the built-from-sources version of clang (v15) to work with the memtag sanitiser. For those of you who don't know what that is, it is simply a version of the address sanitiser that leverages the Memory Tagging features of ARM.
Anyway, while I can use it normally with the repository version of clang (v10), using the version built from sources just does not work.
Here is the command I use for both: clang main.c -S -march=armv8+memtag -fsanitize=memtag with clang which is either the repository-version or the built-from-sources version. Although the former works seamlessly, the latter does not.
I've tried to built llvm with different parameters, but none seemed to have done the trick. Here's my current building configuration:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;openmp;polly;pstl;compiler-rt" -DLLVM_TARGETS_TO_BUILD="AArch64" ../llvm
I wonder if there is some parameter I have to specify to build clang with this sanitiser enabled.
PS: using the -fsanitize=memtag flag does not give any error: with the built version of clang it simply does not insert the instrumentation code.
If anybody is able to give me some insight I would really appreciate it. Thanks ;)
I need to upgrade glib for a specific project. It currently uses glib 2.28.8. I have three problems.
I've never used meson and ninja before, so I checked glib's INSTALL.in and it just said to run meson _build followed by ninja -C _build. So I ran meson _build and got the following output:
$ meson _build
The Meson build system
Version: 0.47.2
Source dir: /srv/devel/build/glib-2.65.0
Build dir: /srv/devel/build/glib-2.65.0/_build
Build type: native build
meson.build:227: WARNING: Identifier 'in' will become a reserved keyword in a future release. Please rename it.
meson.build:227:14: ERROR: Expecting eol got id.
if vs_crt_opt in ['mdd', 'mtd']
So the basic build doesn't work. Why?
For our purposes, we use the following configure command:
PKG_CONFIG_PATH=$(OUTPUT_DIR)/lib/pkgconfig ./configure --prefix=$(OUTPUT_DIR) --disable-dtrace --disable-selinux ac_cv_path_MSGFMT=/bin/true CPPFLAGS="-fPIC -I$(OUTPUT_DIR)/include" LDFLAGS="-L$(OUTPUT_DIR)/lib" --enable-static --disable-shared
How do I specify that in meson?
I will also need to build in Windows. Any gotchas there?
Thanks!
EDIT: I tried older versions of glib, going back to 2.62.0 and when I run meson _build I get the error meson.build:1:0: ERROR: Meson version is 0.47.2 but project requires >= 0.49.2.. So that's probably a big part of the problem for question (1). This is running on CentOS 6 & 7, so I'll probably have to get and install a current meson package.
So the basic build doesn't work. Why?
You correctly figured this out in your edit: GLib 2.64 requires Meson 0.49.2, and it seems that Meson 0.47.2 is so old as to not be able to correctly parse GLib’s meson.build.
It looks from your build output that you’re trying to build GLib 2.65.0. Note that 2.65 is an unstable release series. Even minor versions of GLib (2.62.x, 2.64.x, etc.) are stable; odd ones are unstable. Using an unstable release is fine, as long as you know what you’ve signed up for: it may contain bugs, and new APIs introduced in that unstable series may change or be removed before the first stable release (in the case of 2.65.x, the corresponding first stable release will be 2.66.0).
For our purposes, we use the following configure command:
You’ll want something like:
meson --prefix "$(OUTPUT_DIR)" -Dselinux=disabled -Ddefault_library=static _build
You can see from the b_staticpic option’s default value that -fPIC is the default for static libraries, so (I believe) doesn’t need to be explicitly specified.
There should be no need to disable dtrace support since it’s disabled by default. If you did need to disable it, you’d do that with -Ddtrace=false.
The custom -L and -I arguments should be covered by use of --prefix.
Overriding the msgfmt tool to disable internationalisation is not a supported way of building GLib and you’re on your own with that one.
There is some good documentation on the built-in options in Meson here and here.
I will also need to build in Windows. Any gotchas there?
That’s too broad a question to be answered on StackOverflow.
I am trying to build my project (iPad app) from go agent. While building from command line, I am getting below error.
Error log:
Requested but did not find extension point with identifier Xcode.IBBuildSupport.AssetCatalog.AssetTagScanner.TypeExtension
go-agent: error: Initialization failed.
Reason: Required content for platform watchOS is missing
I am not using/referring to any of watchOS related libraries. Any one faced similar kind of error?
This seems to be a problem in GoCD to do with an environment variable that is being set by the GoCD agent.
A Github issue has been opened to fix this.
Meantime, if you have a look at the chat there you'll see that the original reporter has found a workaround, which is to call unset CFProcessPath before invoking the xcodebuild command.
In my case, I changed the custom command I was using to:
unset CFProcessPath; bundle exec fastlane build_for_test
and the build is passing
(I tried using a separate command for the unset CFProcessPath, but the environment variables appear to revert between them - so I was forced to combine the two).
I tried to compile code to ledger Nano S like there https://ledger.readthedocs.io/en/0/nanos/setup.html and I have a problem. When I run the "make .." command, it says "fno-jump-tables unknown argument". I see that it compiles by clang 3.9 but I download clang's latest version and link env variable to it like in the example. I have tried to download clang 6.0, 7.0, 4.0 and latest.
My question: how to update clang in docker to compile my code without error?
If you follow the guide you mentioned and trying to compile blue-app-helloworld app you should take a look at its Makefile at first. At the 48th and the 60th lines you'll see the path it looks for clang binaries. So, if you want to use different version of clang for the build process you could do the following:
Install clang-4.0 as it's described here. Before that you'll need to pre-install some default packages
Edit the Makefile:
The 48th line should be set to: CLANGPATH := /usr/bin/
The 60th line should be set to: CC := $(CLANGPATH)clang-4.0
Run the build as it's described in the guide by executing:
make BOLOS_ENV=/opt/ledger-blue/ BOLOS_SDK=/home/nanos-secure-sdk
You'll see app.elf and app.hex files in the bin folder.
I am trying to install clang from source following the instructions as given in http://clang.llvm.org/get_started.html ( Steps 1-4 and 7) in Ubuntu 14.04
Inside the build directory , I ran make which succeeded. I wasn't sure what to do after that , so I ran make install inside the build directory, following which I got this cmake error:
There is no executable named clang in /build/bin folder anyway, but I can find others like clang-check, clang-query, etc. What's going wrong?
PS: My main requirment is to experiment with alpha security checkers of clang analyzer and also write my own checker later.