[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to build?

From: edgar
Subject: Re: How to build?
Date: Thu, 15 Apr 2021 02:51:25 +0000
User-agent: Roundcube Webmail

On 2021-04-13 20:03, edgar wrote:

I would like to know if somebody can help me, please. I got to the
part of compiling, but running the tests throws an error which I
haven't been able to figure out. Let me know the information that you
need. Below is the last part of what `make check' tells me. Thanks.

     CXXLD    dynamic_tas
    /usr/bin/ld: /usr/lib64/ undefined reference to
 ... removed content ...

After some days, I think I'm getting closer. The Makefile for tests uses libtool, and I was able to link with mpicxx alone with the addition of -shared. The expanded command from the Makefile for the dynamic_tas target is:

/bin/sh ../libtool --tag=CXX --mode=link /usr/bin/mpicxx -fPIC -fopenmp -O3 -march=amdfam10 -mtune=generic -O2 -D_FORTIFY_SOURCE=2 -O3 -std=c++14 -L/usr/lib -L/usr/lib/openmpi -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o dynamic_tas dynamic_tas.o ../src/ -lm -lsmumps -ldmumps -lcmumps -lzmumps -lqhull -llapack -lmpi_cxx -Wl,-rpath -Wl,/usr/lib -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,-rpath -Wl,/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -lmpi -lpthread -lmetis -lsuperlu -lesmumps -lptscotch -lptscotcherr -lscotch -lscotcherr -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lblas -lmetis

(I added some libraries by means of the LIBS environment variable [1]). By replacing that with this:

/usr/bin/mpicxx -shared -fPIC -fopenmp -O3 -march=amdfam10 -mtune=generic -O2 -D_FORTIFY_SOURCE=2 -O3 -std=c++14 -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o dynamic_tas dynamic_tas.o -Wl,-rpath -Wl,/usr/lib -Wl,-rpath -Wl,/usr/lib/openmpi -Wl,-rpath -Wl,/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -L/usr/lib -L/usr/lib/openmpi -L/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0 -Wl,--enable-new-dtags -lmpi_cxx ../src/.libs/ -lm -lqhull -llapack -lmpi_cxx -lmpi -lpthread -lsuperlu -lesmumps -lptscotch -lptscotcherr -lscotch -lscotcherr -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lblas -lmetis

, dynamic_tas was successfully created. I will now try and see if I can apply the same logic to other targets (of the tests/Makefile)

Aaaaand that's the penguin!


[2] Linking: undefined reference to: [3] Use ldd to check for statically linked libraries:
[4] Use shared libraries:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]