I was unable to reproduce this on Ubuntu 14.04.5
Note the default gcc is 4.8
gcc-4.9 can be installed, but no g++ nor gfortran.

Did you build Open MPI with the same compiler used to build libUtils.so and
a.out
What do
type gcc
ls -l /usr/bin/gcc
gcc —version
g++ —version
say ?

On top of the info previously requested by Jeff, can you also share a
minimal libUtils.c[pp] and test.cpp (with the build command line) so we can
reproduce the issue ?

Cheers,

Gilles

On Saturday, June 23, 2018, lille stor <lille.s...@gmx.com> wrote:

> Hi,
>
>
>
> When compiling a C++ source file named test.cpp that needs a shared
> library named libUtils.so (which in its turn needs Open MPI shared
> library, hence the parameter -Wl,-rpath-link,/home/dummy/openmpi/build/lib
> ) as follows:
>
> g++ test.cpp -lUtils -Wl,-rpath-link,/home/dummy/openmpi/build/lib
>
> An error is thrown /home/dummy/openmpi/build/lib/libopen-pal.so.20:
> undefined reference to pthread_atfork.
>
> I passed -pthread and -lpthread (before and after -lUtils) to g++ but
> none of these solved the error.
>
>
>
> Environment where this error is thrown:
> OS: Ubuntu 14.04
> Compiler: g++ 4.9
> MPI: Open MPI 2.1.3
>
>
>
> Thank you for your help,
>
> L.
>
>
>
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/devel

Reply via email to