Hello, I am a fellow researcher and am working on the PPL library and using it for some extrapolation techniques. I have modified the source code and now when I compile this it seems to give some linking problems. More appropriately, its giving a symbol lookup error and undefined reference. Could you help me out with a solution to the above problem and let me know how to re compile the PPL library if I have made some modifications into it. Thanks and Regards, Vishal Lahoti.
Vishal Lahoti wrote:
I am a fellow researcher and am working on the PPL library and using it for some extrapolation techniques. I have modified the source code and now when I compile this it seems to give some linking problems. More appropriately, its giving a symbol lookup error and undefined reference.
Could you help me out with a solution to the above problem and let me know how to re compile the PPL library if I have made some modifications into it.
Dear Vishal, I assume you have read the library's documentation. We can certainly help you if you give us a way to reproduce the problem. All the best, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Thank you for your quick reokay. I've modified the following files in directory src: Polyhedron.defs.hh Polyhedron_widenings.cc Constraint_System.defs.hh Constraint_System.cc Constraint.defs.hh Constraint.cc You find a copy of these files in attachement. I have recompiled by doing: make make install (with prefix in my local directory) Then, I've written the following test in directory tests/Polyhedron: new2.cc And I've compiled it with the line CC=g++ -Wall -g CFLAGS=-I /home/lahoti/ppl-0.9.ext/src -I . -I /home/lahoti/ppl-0.9.ext/tests/ CLIBS=-L/home/lahoti/ppl-0.9.ext/tests/ -L. -L/home/lahoti/ppl-0.9.ext/lib/ -lppl -lppl_tests -lgmpxx -lgmp %.exe: $(CC) $(CFLAGS) $*.cc -o $*.exe $(CLIBS) There is no compilation error, but at the execution, I've obtained: ... ./new2.exe: symbol lookup error: ./new2.exe: undefined symbol: _ZN23Parma_Polyhedra_Library10Polyhedron25translation_extrapolationEjRKS0_S2_ Thank you for help, Vishal
Vishal Lahoti wrote:
I've modified the following files in directory src:
Polyhedron.defs.hh Polyhedron_widenings.cc Constraint_System.defs.hh Constraint_System.cc Constraint.defs.hh Constraint.cc
You find a copy of these files in attachement. I have recompiled by doing:
make make install
(with prefix in my local directory)
Then, I've written the following test in directory tests/Polyhedron:
new2.cc
And I've compiled it with the line
CC=g++ -Wall -g CFLAGS=-I /home/lahoti/ppl-0.9.ext/src -I . -I /home/lahoti/ppl-0.9.ext/tests/ CLIBS=-L/home/lahoti/ppl-0.9.ext/tests/ -L. -L/home/lahoti/ppl-0.9.ext/lib/ -lppl -lppl_tests -lgmpxx -lgmp
%.exe: $(CC) $(CFLAGS) $*.cc -o $*.exe $(CLIBS)
There is no compilation error, but at the execution, I've obtained:
... ./new2.exe: symbol lookup error: ./new2.exe: undefined symbol: _ZN23Parma_Polyhedra_Library10Polyhedron25translation_extrapolationEjRKS0_S2_
Dear Vishal, I don't see any attachment here. Perhaps you forgot? I also need to tell us more about the platform (architecture, operating system, GCC and GMP version) you are using. Your changes are relative to PPL 0.9, right? All the best, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Dear Roberto, I did send the attatchment. It is a tar ball of files. Perhaps the mailing list did not accept the attatchment I suppose. So I am resending the mail to your account. The changes were made in PPL 0.9. Other information Archietecture iX86 OS Fedora Core 4 GCC version 4.0.2 GMP version 4.1.4 Please find the file attatched. Once again, Thanks for your response. Best Regards, Vishal Lahoti On Sat, 10 Jun 2006, Roberto Bagnara wrote:
Vishal Lahoti wrote:
I've modified the following files in directory src:
Polyhedron.defs.hh Polyhedron_widenings.cc Constraint_System.defs.hh Constraint_System.cc Constraint.defs.hh Constraint.cc
You find a copy of these files in attachement. I have recompiled by doing:
make make install
(with prefix in my local directory)
Then, I've written the following test in directory tests/Polyhedron:
new2.cc
And I've compiled it with the line
CC=g++ -Wall -g CFLAGS=-I /home/lahoti/ppl-0.9.ext/src -I . -I /home/lahoti/ppl-0.9.ext/tests/ CLIBS=-L/home/lahoti/ppl-0.9.ext/tests/ -L. -L/home/lahoti/ppl-0.9.ext/lib/ -lppl -lppl_tests -lgmpxx -lgmp
%.exe: $(CC) $(CFLAGS) $*.cc -o $*.exe $(CLIBS)
There is no compilation error, but at the execution, I've obtained:
... ./new2.exe: symbol lookup error: ./new2.exe: undefined symbol: _ZN23Parma_Polyhedra_Library10Polyhedron25translation_extrapolationEjRKS0_S2_
Dear Vishal,
I don't see any attachment here. Perhaps you forgot? I also need to tell us more about the platform (architecture, operating system, GCC and GMP version) you are using. Your changes are relative to PPL 0.9, right? All the best,
Roberto
Vishal Lahoti wrote:
I did send the attatchment. It is a tar ball of files. Perhaps the mailing list did not accept the attatchment I suppose. So I am resending the mail to your account. The changes were made in PPL 0.9. Other information
Archietecture iX86 OS Fedora Core 4 GCC version 4.0.2 GMP version 4.1.4
Please find the file attatched. Once again, Thanks for your response.
Dear Vishal, the files you sent look strange: 1) new2.cc uses the same macros used by the PPL tests and is based on exactly the same assumptions. So it should be added to tests/Makefile.am to be compiled and linked properly. 2) makefile suggests that the intention is to use it as a stand-alone program. Assuming that 2) is what you want, I have edited new2.cc so as to obtain new3.cc (below the signature). It can be compiled and executed as follows: $ g++ -W -Wall new3.cc -lppl -lgmpxx -lgmp $ a.out *** ph1 *** A - B + C + E >= 0, A - B + D >= 0, C - D >= 0, -D + E >= 0, D >= 0 *** ph1 after one affine image *** A - B + 2*C + E >= 2, A - B + C + D >= 2, C - D >= 0, -D + E >= 0, D >= 0 *** ph1 after two affine image *** A - B + 3*C + E >= 4, A - B + 2*C + D >= 4, C - D >= 0, -D + E >= 0, D >= 0 extrapolation failed You will have to add the needed -L and -I options to the compilation command, if you install GMP and/or the PPL into a non standard place. All the best, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it #include <ppl.hh> #include <iostream> using namespace Parma_Polyhedra_Library; using namespace Parma_Polyhedra_Library::IO_Operators; using namespace std; int main() { Variable A(0); Variable B(1); Variable C(2); Variable M(3); Variable N(4); C_Polyhedron ph1(5); ph1.add_constraint(A-B+C+N >= 0); ph1.add_constraint(A-B+M >= 0); ph1.add_constraint(C >= M); ph1.add_constraint(N >= M); ph1.add_constraint(M >= 0); C_Polyhedron ph2(ph1); cout << "*** ph1 ***\n" << ph1.constraints() << endl; ph2.affine_image(A,A+2,1); ph2.affine_image(B,B+C,1); cout << "*** ph1 after one affine image ***\n" << ph2.constraints() << endl; C_Polyhedron ph3(ph2); ph3.affine_image(A,A+2,1); ph3.affine_image(B,B+C,1); cout << "*** ph1 after two affine image ***\n" << ph3.constraints() << endl; if(ph1.translation_extrapolation(3,ph2,ph3)) cout<<endl<<"hoooray"; else cout<<endl<<"extrapolation failed"; return 0; }
participants (2)
-
Roberto Bagnara -
Vishal Lahoti