bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29435] Building openblas with binutils 2.38 leads to "ELF


From: fxcoudert at gcc dot gnu.org
Subject: [Bug binutils/29435] Building openblas with binutils 2.38 leads to "ELF load command address/offset not properly aligned"
Date: Mon, 01 Aug 2022 19:27:57 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29435

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
How to reproduce:

1. Download and extract OpenBLAS-0.3.20 from
https://github.com/xianyi/OpenBLAS/archive/v0.3.20.tar.gz

2. Run:
$ DYNAMIC_ARCH=1 TARGET=CORE2 make libs netlib shared

3. Create a test.c file:

$ cat test.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "cblas.h"

int main(void) {
  int i;
  double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
  double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
  double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
  cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
              3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
  for (i = 0; i < 9; i++)
    printf("%lf ", C[i]);
  printf("\\n");
  if (fabs(C[0]-11) > 1.e-5) abort();
  if (fabs(C[4]-21) > 1.e-5) abort();
  return 0;
}


4. Compile and run:

$ gcc test.c -I ./build2 -L ./build2 -lopenblas -pthread && ./a.out
./a.out: error while loading shared libraries: libopenblas.so.0: cannot open
shared object file: No such file or directory


PS: If Openblas is built without DYNAMIC_ARCH=1, then the library produced
works.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]