Closed mrosemeier closed 9 years ago
Have you tried building via python setup.py install or are you just using make ? It looks like your link line does not include lapack (which is why you're missing "dgesv_", etc), and like it does have "main", (which it shouldn't for building the .so). -peter
From: mrosemeier notifications@github.com<mailto:notifications@github.com> Reply-To: WISDEM/pBEAM reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday, October 30, 2014 2:25 AM To: WISDEM/pBEAM pBEAM@noreply.github.com<mailto:pBEAM@noreply.github.com> Subject: [pBEAM] Missing libraries for compilation on Ubuntu 14.04 (#1)
Hi,
I am trying to compile the pBEAM on my Ubuntu 14.04 machine using the makefile scripts. The compilation of the src/pBEAM files works fine. However, there are some issues with the makefile for src/pyBEAM. I modified the makefile script as follows. Still I have the attached error from the compiler.
Do you have any idea which libraries are still missing? It seems to be a python related lib.
Regards, Malo
src/pyBEAM/makefile:
CXX = clang++ CFLAGS = -O2 PY_FRAMEWORK = /usr/include/python2.7 # /usr/lib/python2.7 BOOST_INCL = /usr/include BOOST_LIB = /usr/lib/x86_64-linux-gnu INCL = -I$(BOOST_INCL) -I$(PY_FRAMEWORK) -I../pBEAM LIB = $(BOOST_LIB)/libboost_python.a $(BOOST_LIB)/libboost_system.a $(BOOST_LIB)/libpython2.7.a -lpthread -lz -ldl -lutil #some python lib? OBJ = ../pBEAM/Poly.o ../pBEAM/myMath.o ../pBEAM/BeamFEA.o ../pBEAM/Beam.o
pybeam: pyBEAM.o $(CXX) pyBEAM.o $(OBJ) -Xlinker -E $(LIB) -o _pBEAM.so
.cpp.o: $(CXX) $(INCL) $(CFLAGS) -c $< -o $@
clean: rm -f *.o _pBEAM.so
compiler output:
mrosemeier@IWPC9064:~/workspace2014/pBEAM.git/src/pyBEAM$ make
clang++ -I/usr/include -I/usr/include/python2.7 -I../pBEAM -O2 -c pyBEAM.cpp -o pyBEAM.o
clang++ pyBEAM.o ../pBEAM/Poly.o ../pBEAM/myMath.o ../pBEAM/BeamFEA.o ../pBEAM/Beam.o -Xlinker -E /usr/lib/x86_64-linux-gnu/libboost_python.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libpython2.7.a -lpthread -lz -ldl -lutil -o _pBEAM.so
/usr/lib/x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function posix_tmpnam': (.text.unlikely+0x950): warning: the use of
tmpnam_r' is dangerous, better use mkstemp' /usr/lib/x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function
posix_tempnam':
(.text.unlikely+0xa44): warning: the use of tempnam' is dangerous, better use
mkstemp'
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function _start': (.text+0x20): undefined reference to
main'
../pBEAM/myMath.o: In function myMath::generalizedEigenvalues(bool, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, int, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)': myMath.cpp:(.text+0x326): undefined reference to
dsbgv_'
../pBEAM/myMath.o: In function myMath::solveSPDBLinearSystem(boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, int, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)': myMath.cpp:(.text+0x66d): undefined reference to
dpbsv_'
../pBEAM/myMath.o: In function myMath::solveLinearSystem(boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > const&, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >&)': myMath.cpp:(.text+0x81f): undefined reference to
dgesv_'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *\ [pybeam] Error 1
— Reply to this email directly or view it on GitHubhttps://github.com/WISDEM/pBEAM/issues/1.
Yes, sorry if you were confused by those makefiles. Those are only there for my own use to run some unit tests. The setup.py files are what you should use to build. You will need to install LAPACK and BLAS first.
should this issue be closed? @andrewning or @pgraf? please do if so
I'm closing this issue after our discussion, but if you are still having issues let us know.
Hi,
I am trying to compile the pBEAM on my Ubuntu 14.04 machine using the makefile scripts. The compilation of the src/pBEAM files works fine. However, there are some issues with the makefile for src/pyBEAM. I modified the makefile script as follows. Still I have the attached error from the compiler.
Do you have any idea which libraries are still missing? It seems to be a python related lib.
Regards, Malo
src/pyBEAM/makefile:
compiler output: