mpimd-csc / flexiblas

FlexiBLAS - A BLAS and LAPACK wrapper library with runtime exchangeable backends. This is only a mirror of https://gitlab.mpi-magdeburg.mpg.de/software/flexiblas-release
https://www.mpi-magdeburg.mpg.de/projects/flexiblas
GNU Lesser General Public License v3.0
36 stars 7 forks source link

CMakeLists set unsupported flags for Apple which break the build: -export_dynamic #37

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago
/opt/local/bin/gcc-mp-12 -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -fPIC -std=c99 -fstack-protector-strong -fstack-clash-protection -D_FILE_OFFSET_BITS=64  -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -L/opt/local/lib -lMacportsLegacySupport -rdynamic -Wl,-export_dynamic -o ../lib/libflexiblas_apple.dylib -install_name /opt/local/lib/libflexiblas_apple.dylib CMakeFiles/flexiblas_apple.dir/backends/generic/backend.c.o  -Wl,-rpath,/opt/local/lib -Wl,-framework,Accelerate -lgfortran 
gcc-mp-12: note: rdynamic is not supported
ld: unknown option: -export_dynamic
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libflexiblas_openblasopenmp.dylib] Error 1
grisuthedragon commented 1 year ago

I tested FlexiBLAS 3.3.1 with gcc/gfortran 13 on MacOS X/13 on x86_64 and everything works fine. I did not get the error above. So first check your setup and give some details to reproduce the error.

Even with gcc12 from macports I do not obtain this error.

barracuda156 commented 1 year ago

I tested FlexiBLAS 3.3.1 with gcc/gfortran 13 on MacOS X/13 on x86_64 and everything works fine. I did not get the error above. So first check your setup and give some details to reproduce the error.

Even with gcc12 from macports I do not obtain this error.

This is a linker error, not a compiler error. This flag is not supported at least by some versions of Apple linker. The build works perfectly fine without it – it is redundant and best and breaking for some configs.

grisuthedragon commented 1 year ago

I know that this is a linker error, but at compile time and not at runtime. At compile-time it works for me perfectly without breaking anything. Can you give some details on which system you obtained this error.?