Page 1 of 1

error: ‘LAPACK_GLOBAL’ declared as function returning a func

PostPosted: Wed Nov 22, 2017 12:11 pm
by crobar

I'm trying to cross-compile lapack and lapacke for generic powerpc elf format, but get the following error.

Code: Select all
lapacke.h:145:22: error: ‘LAPACK_GLOBAL’ declared as function returning a function
 #define LAPACK_lsame LAPACK_GLOBAL(lsame,LSAME)

I'm building with gfortran and gcc. I am using the cross compilers for the powerpc-elf target.

Someone else described the same issue in another post:


Re: error: ‘LAPACK_GLOBAL’ declared as function returning a

PostPosted: Tue Nov 28, 2017 4:28 am
by crobar
(finishing post in reply due to spam filter)

I tried the fix in the linked post above but it makes no difference.

In order to get this stage of compilation I have used the following cmake options:

Code: Select all

# to strip '-rdynamic' flag which is not supported by the cross-compiler

# to add target processor
CMAKE_Fortran_FLAGS="${CMAKE_Fortran_FLAGS} -mcpu=750"


# to avoid cmake testing if forrtran compiler can build executables (which fails because the rdynamic flag is added by cmake)

# don't built testing (I think this creates executables which fail because of the '-rdynamic' option

I'm also using a cmake toolchain file, but I think the above options are the only ones that are likely to be important or unexpected.

Can anyone explain the problem and how I might work around it?

Re: error: ‘LAPACK_GLOBAL’ declared as function returning a

PostPosted: Thu Dec 07, 2017 6:50 am
by crobar
The solution to this is explained here: ... a-function