Skip to content

Errors "`.rodata' can not be used when making a shared object " occurred when I typed "cmake .." and "make"! #4

@zengletian1491

Description

@zengletian1491

When I typed "cmake .." and "make", errors occurred as follows:
[ 58%] Linking CXX shared library libcvsba.so
/usr/bin/ld: /usr/local/lib/liblapack.a(dgeqrf.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblapack.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/CMakeFiles/cvsba.dir/build.make:217: recipe for target 'src/libcvsba.so' failed
make[2]: *** [src/libcvsba.so] Error 1
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/cvsba.dir/all' failed
make[1]: *** [src/CMakeFiles/cvsba.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I saw many solutions on the Internet, but they didn't work! Please give me some suggestions!Thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions