Re: [isl-dev] PPCG configure options On Ubuntu 22.04

30 views
Skip to first unread message
Message has been deleted

Sven Verdoolaege

unread,
Nov 27, 2024, 1:32:15 PM11/27/24
to Ranganhar Smith, isl Development
On Wed, Nov 27, 2024 at 12:29:32AM -0800, Ranganhar Smith wrote:
> Hello.
> I'm currently building PPCG and I want to use my own compiled clang to
> specify the --with-clang-prefix options at
> “/home/ranganhar/llvm-project/build/bin/clang”, when I use the option
> --with-clang- perfix=/home/ranganhar/llvm-project/build, configure reports

This sounds like the path where you built clang.
You should point to the path where you installed clang.

> an error:
> checking whether /home/ranganhar/llvm-project/build/bin/clang can find
> standard include files... yes
> checking for clang/Basic/SourceLocation.h... no
> configure: error: clang header file not found

If the above doesn't help, then send isl/interface/config.log
or pet/config.log (whichever contains the above error).

skimo

Ranganhar Guo

unread,
Nov 30, 2024, 3:15:28 AM11/30/24
to isl Development
Thanks for your reply! 
The main purpose is to debug ( by single-step debugging) the function in clang namespace which is called in file pet.cc( pet/pet.cc line 1256 ).The function named ParseAST( ), is realized in LLVM. 
The linked libraries seems to be dynamically linked. So I want to change the prefix of clang, using it built by myself.
Now I have some question about pointing the path where I installed clang.
I want to use the clang I have built in llvm-project rather than installed by apt-get.
I use option "--with-clang-perfix=/home/ranganhar/llvm-project/build --with-clang=/home/ranganhar/llvm-project" to specify the clang path, after rebuilding, reinstalling, It doesn't work. I can't do single-step debugging into the function ParseAST();
What can I do for this problem?
Thank you!
Ranganhar
17ff296f158180e9ec88b231c41df4a.png

Sven Verdoolaege

unread,
Nov 30, 2024, 6:28:36 AM11/30/24
to Ranganhar Guo, isl Development
On Sat, Nov 30, 2024 at 12:15:28AM -0800, Ranganhar Guo wrote:
> Thanks for your reply!
> The main purpose is to debug ( by single-step debugging) the function in
> clang namespace which is called in file pet.cc( pet/pet.cc line 1256 ).The
> function named ParseAST( ), is realized in LLVM.
> The linked libraries seems to be dynamically linked. So I want to change
> the prefix of clang, using it built by myself.
> Now I have some question about pointing the path where I installed clang.
> I want to use the clang I have built in llvm-project rather than installed
> by apt-get.
> I use option "--with-clang-perfix=/home/ranganhar/llvm-project/build

First off, the option is called --with-clang-prefix, not --with-clang-perfix.
Second, are you sure /home/ranganhar/llvm-project/build is where you
*installed* LLVM?

> --with-clang=/home/ranganhar/llvm-project" to specify the clang path, after

There is no need to set --with-clang if --with-clang-prefix is already set and
the value you specify is invalid (although I guess it doesn't check for that).

It's probably best to post pet/config.log anyway.

Post the output of

./libtool --mode=execute ldd ppcg

and of

rm pet/libpet.la && make -C pet libpet.la V=1

skimo

Sven Verdoolaege

unread,
Dec 1, 2024, 5:25:32 PM12/1/24
to Ranganhar Guo, isl Development
Please keep the mailing list in CC.
Otherwise, I may not notice your message.

> rm pet/libpet.la && make -C pet libpet.la V=1 [19:51:47]
> make: Entering directory '/home/ranganhar/ppcg_test_folder/ppcg/pet'
> /bin/bash ./libtool --tag=CXX --mode=link g++ -I. -I./include -I/usr/lib/llvm-14/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ranganhar/ppcg_test_folder/ppcg/isl/include -I/home/ranganhar/ppcg_test_folder/ppcg/isl/include -g -O2 -version-info 10:8:0 -L/usr/lib/llvm-14/lib -R/usr/lib/llvm-14/lib -o libpet.la -rpath /home/ranganhar/ppcg_test_folder/ppcg/lib aff.lo array.lo clang.lo context.lo expr.lo expr_arg.lo expr_plus.lo filter.lo id.lo inlined_calls.lo inliner.lo isl_id_to_pet_expr.lo killed_locals.lo loc.lo nest.lo options.lo patch.lo pet_expr_to_isl_pw_aff.lo print.lo tree.lo tree2scop.lo scan.lo scop.lo scop_plus.lo skip.lo substituter.lo summary.lo value_bounds.lo version.lo pet.lo ../isl/libisl.la -lclangFrontend -lclangSerialization -lclangParse -lclangSema -lclangAPINotes -lclangEdit -lclangAnalysis -lclangAST -lclangLex -lclangASTMatchers -lclangDriver -lclangBasic -lLLVM-14.0.0 -L/usr/lib/llvm-14/lib

So you're linking against the system LLVM,
but this is not surprising...

> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
>
> It was created by pet configure 0.11.8, which was
> generated by GNU Autoconf 2.71. Invocation command line was
>
> $ ./configure --disable-option-checking --prefix=/home/ranganhar/ppcg_test_folder/ppcg --with-clang-perfix=/home/ranganhar/llvm-project/build --with-clang=/home/ranganhar/llvm-project --with-isl-builddir=../isl --with-isl=build --with-clang=system --cache-file=/dev/null --srcdir=.

...since you didn't specify the --with-clang-prefix option
(instead specifying the non-existent --with-clang-perfix option).

skimo
Reply all
Reply to author
Forward
0 new messages