Building 32bit LAPACK 3.7.1 on 64bit Ubuntu 16.04

Post here if you have a question about the installation process

Building 32bit LAPACK 3.7.1 on 64bit Ubuntu 16.04

Postby Cavusa » Mon Aug 14, 2017 6:26 am


I'm trying to build the latest LAPACK library (3.7.1) on Ubuntu 16.04 64bit, for a 32bit application. My research into doing this showed that I should add the -m32 flags to the gfortran and gcc flags, or to the CC and gfortran lines in the file. The libraries are built, but remain 64bit.

When trying to link, the following error is displayed for what appears to be every object in the libraries, example:

Code: Select all
i386:x86-64 architecture of input file `<pathtoLib/liblapack.a(dgeqrf.f.o)>' is incompatible with i386 output

The instructions for installing LAPACK says that only the file needs to be modified, but I don't know if this is out of date for the latest version.

So far I've tried adding the -m32 flag to gcc CFLAGS and gfortran OPTS, adding -m32 to the CC and CFLAG lines, as well as adding -melf_i386 to the gfortran loader options, with no change in the output files architecture type.

All other lines in the file haven't been changed from the example provided.

I'm probably missing something fairly obvious, but I've been at this for a couple of days now, with no progress in sight, so any help would be greatly appreciated.


Posts: 1
Joined: Mon Aug 14, 2017 6:13 am

Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests