Hi Ward,

Ward Poelmans <wpoel...@gmail.com> writes:

> Hi Loris,
>
> On 23/03/2020 13:25, Loris Bennett wrote:
>> 
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 
>> 'omp_get_num_threads'
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 'GOMP_barrier'
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 
>> 'omp_get_thread_num'
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 'GOMP_parallel'
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 'omp_get_wtime'
>> ../lib/.libs/libgretl-1.0.so: error: undefined reference to 
>> 'omp_set_num_threads'
>> collect2: error: ld returned 1 exit status
>
> This means the linker is not pulling in `-lgomp`. I guess because
> `-fopenmp` is not used? The lines you show here above the errors are
> probably unrelated (can happen if you're not using -j1).

Thanks for the hint.  Here's the part of the log with --parallel=1:

libtool: link: (cd ".libs" && rm -f "libgretl-1.0.so.32" && ln -s 
"libgretl-1.0.so.32.0.0" "libgretl-1.0.so.32")
libtool: link: (cd ".libs" && rm -f "libgretl-1.0.so" && ln -s 
"libgretl-1.0.so.32.0.0" "libgretl-1.0.so")
libtool: link: ( cd ".libs" && rm -f "libgretl-1.0.la" && ln -s 
"../libgretl-1.0.la" "libgretl-1.0.la" )
make[1]: Leaving directory 
`/trinity/shared/easybuild/build/gretl/2020a/foss-2019a/gretl-2020a/lib'
make -C cli
make[1]: Entering directory 
`/trinity/shared/easybuild/build/gretl/2020a/foss-2019a/gretl-2020a/cli'
mkdir .deps
gcc -c -O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -I.. -I.. 
-I../lib/src  
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/include/glib-2.0 
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/lib/glib-2.0/include
 -I/trinity/shared/easybuild/software/PCRE/8.43-GCCcore-8.2.0/include   
-DLOCALEDIR=\"/trinity/shared/easybuild/software/gretl/2020a-foss-2019a/share/locale\"
 -DHAVE_CONFIG_H gretlcli.c
gcc -O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -I.. -I.. 
-I../lib/src  
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/include/glib-2.0 
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/lib/glib-2.0/include
 -I/trinity/shared/easybuild/software/PCRE/8.43-GCCcore-8.2.0/include   
-DLOCALEDIR=\"/trinity/shared/easybuild/software/gretl/2020a-foss-2019a/share/locale\"
 -DHAVE_CONFIG_H -MM gretlcli.c > .deps/gretlcli.d
gcc -c -O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -I.. -I.. 
-I../lib/src  
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/include/glib-2.0 
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/lib/glib-2.0/include
 -I/trinity/shared/easybuild/software/PCRE/8.43-GCCcore-8.2.0/include   
-DLOCALEDIR=\"/trinity/shared/easybuild/software/gretl/2020a-foss-2019a/share/locale\"
 -DHAVE_CONFIG_H complete.c
gcc -O2 -ftree-vectorize -march=native -fno-math-errno -fopenmp -I.. -I.. 
-I../lib/src  
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/include/glib-2.0 
-I/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/lib/glib-2.0/include
 -I/trinity/shared/easybuild/software/PCRE/8.43-GCCcore-8.2.0/include   
-DLOCALEDIR=\"/trinity/shared/easybuild/software/gretl/2020a-foss-2019a/share/locale\"
 -DHAVE_CONFIG_H -MM complete.c > .deps/complete.d
../libtool --mode=link gcc -mavx -Winline  
-L/trinity/shared/easybuild/software/MPFR/4.0.2-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/ImageMagick/7.0.8-46-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/GtkSourceView/3.24.11-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/GMP/6.1.2-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/libxml2/2.9.8-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/FFTW/3.3.8-gompi-2019a/lib 
-L/trinity/shared/easybuild/software/ScaLAPACK/2.0.2-gompi-2019a-OpenBLAS-0.3.5/lib
 -L/trinity/shared/easybuild/software/OpenBLAS/0.3.5-GCC-8.2.0-2.31.1/lib 
-L/trinity/shared/easybuild/software/GCCcore/8.2.0/lib64 
-L/trinity/shared/easybuild/software/GCCcore/8.2.0/lib -o gretlcli gretlcli.o 
complete.o \
../lib/libgretl-1.0.la -lreadline -lncurses
libtool: link: gcc -mavx -Winline -o .libs/gretlcli gretlcli.o complete.o  
-L/trinity/shared/easybuild/software/MPFR/4.0.2-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/ImageMagick/7.0.8-46-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/GtkSourceView/3.24.11-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/GMP/6.1.2-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/libxml2/2.9.8-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/FFTW/3.3.8-gompi-2019a/lib 
-L/trinity/shared/easybuild/software/ScaLAPACK/2.0.2-gompi-2019a-OpenBLAS-0.3.5/lib
 -L/trinity/shared/easybuild/software/OpenBLAS/0.3.5-GCC-8.2.0-2.31.1/lib 
-L/trinity/shared/easybuild/software/GCCcore/8.2.0/lib64 
-L/trinity/shared/easybuild/software/GCCcore/8.2.0/lib 
../lib/.libs/libgretl-1.0.so 
-L/trinity/shared/easybuild/software/XZ/5.2.4-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/zlib/1.2.11-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/binutils/2.31.1-GCCcore-8.2.0/lib 
-L/trinity/shared/easybuild/software/gettext/0.19.8.1/lib 
-L/trinity/shared/easybuild/software/GLib/2.60.1-GCCcore-8.2.0/lib -lopenblas 
/trinity/shared/easybuild/software/libxml2/2.9.8-GCCcore-8.2.0/lib/libxml2.so 
-ldl -lz 
/trinity/shared/easybuild/software/XZ/5.2.4-GCCcore-8.2.0/lib/liblzma.so 
-lglib-2.0 
/trinity/shared/easybuild/software/GMP/6.1.2-GCCcore-8.2.0/lib/libgmp.so 
/trinity/shared/easybuild/software/FFTW/3.3.8-gompi-2019a/lib/libfftw3.so -lm 
-lpthread -lcurl -lrt -lreadline -lncurses -Wl,-rpath 
-Wl,/trinity/shared/easybuild/software/gretl/2020a-foss-2019a/lib -Wl,-rpath 
-Wl,/trinity/shared/easybuild/software/libxml2/2.9.8-GCCcore-8.2.0/lib 
-Wl,-rpath -Wl,/trinity/shared/easybuild/software/XZ/5.2.4-GCCcore-8.2.0/lib 
-Wl,-rpath -Wl,/trinity/shared/easybuild/software/GMP/6.1.2-GCCcore-8.2.0/lib 
-Wl,-rpath -Wl,/trinity/shared/easybuild/software/FFTW/3.3.8-gompi-2019a/lib
../lib/.libs/libgretl-1.0.so: error: undefined reference to 'GOMP_barrier'
../lib/.libs/libgretl-1.0.so: error: undefined reference to 'omp_get_wtime'
../lib/.libs/libgretl-1.0.so: error: undefined reference to 
'omp_set_num_threads'
../lib/.libs/libgretl-1.0.so: error: undefined reference to 'GOMP_parallel'
../lib/.libs/libgretl-1.0.so: error: undefined reference to 'omp_get_thread_num'
../lib/.libs/libgretl-1.0.so: error: undefined reference to 
'omp_get_num_threads'
collect2: error: ld returned 1 exit status

So the libraries seem to get build OK, but linking the client against
them seems to fail, despite the fact that all the calls to 'gcc' seem to
have the option '-fopenmp' set.

Any ideas?

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.benn...@fu-berlin.de

Reply via email to