make.inc doesn't work

Post here if you have problem using the CMAKE build process

make.inc doesn't work

Postby xhudik » Sun Dec 07, 2014 8:58 am

Hi,

i was trying to compile Lapack 3.5.0 (also 3.4.2) with shared libraries support (-fPIC):
download tar
Code: Select all
untar
cd lapack-3.5.0
mkdir build_linux
cd build_linux/
cmake ../
cp ../INSTALL/make.inc.gfortran make.inc

vim make.inc # I have added -fPIC option in OPTS and NOOPT
Code: Select all
make
make test


and tried
Code: Select all
 readelf --relocs  TESTING/EIG/CMakeFiles/xeigtstz.dir/alareq.f.o | egrep '(GOT|PLT|JU?MP_SLOT)'

I got empty output (the file was not compiled with -fPIC)!!!

When I add -fPIC in CMakeCache.txt (CMAKE_Fortran_FLAGS:STRING='-fPIC -m64 -frecursive'), everything was correct:
Code: Select all
 readelf --relocs  TESTING/EIG/CMakeFiles/xeigtstz.dir/alareq.f.o | egrep '(GOT|PLT|JU?MP_SLOT)'
000000000166  000d00000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_read - 4
00000000017b  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
000000000187  000f00000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_read_done - 4
0000000001ee  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
000000000206  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
000000000212  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
00000000024f  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
00000000025b  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
000000000265  001200000004 R_X86_64_PLT32    0000000000000000 _gfortran_stop_numeric - 4
000000000335  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
00000000034a  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
000000000356  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
0000000003ab  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
0000000003c3  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
0000000003cf  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
0000000004de  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
0000000004f3  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
000000000508  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
000000000514  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
000000000569  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
000000000581  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
00000000058d  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
00000000066c  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
000000000678  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
0000000006d4  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
0000000006e9  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
000000000701  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
00000000070d  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4
00000000077e  001000000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write - 4
000000000796  000e00000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_cha - 4
0000000007ab  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
0000000007c3  001300000004 R_X86_64_PLT32    0000000000000000 _gfortran_transfer_int - 4
0000000007cf  001100000004 R_X86_64_PLT32    0000000000000000 _gfortran_st_write_don - 4


Question: is it bug that editing make.inc doesn't work even it is described as a proper way to set options? Or, am I missing something?

thanks, Tomas
xhudik
 
Posts: 1
Joined: Sun Dec 07, 2014 8:40 am

Return to CMAKE

Who is online

Users browsing this forum: No registered users and 1 guest