error: ‘LAPACK_GLOBAL’ declared as function returning a func

Post here if you have a question about the installation process

error: ‘LAPACK_GLOBAL’ declared as function returning a func

Postby crobar » Wed Nov 22, 2017 12:11 pm

Hi,

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:

http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=4564


Thanks!
crobar
 
Posts: 3
Joined: Wed Nov 22, 2017 11:42 am

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

Postby crobar » Tue Nov 28, 2017 4:28 am

(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
LAPACKE=ON

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

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

CMAKE_CROSSCOMPILING=1

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

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


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?
crobar
 
Posts: 3
Joined: Wed Nov 22, 2017 11:42 am

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

Postby crobar » Thu Dec 07, 2017 6:50 am

The solution to this is explained here: https://stackoverflow.com/questions/474 ... a-function
crobar
 
Posts: 3
Joined: Wed Nov 22, 2017 11:42 am


Return to Installation

Who is online

Users browsing this forum: Google [Bot] and 2 guests