DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.15k stars 259 forks source link

undefined reference to `mpfr_get_q' cross compile #98

Closed cute-duck closed 3 years ago

cute-duck commented 3 years ago

Describe the bug /home/yc/rockchip_rk3308_addFortran_0804_sdk/bin/aarch64-rockchip-linux-gnu-gcc -L/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/lib -shared -Wl,-soname -Wl,libsliplu.so.1 -Wl,--no-undefined slip_matrix_div.o slip_create_mpq_array.o SLIP_free.o SLIP_LU_factorize.o SLIP_realloc.o slip_matrix_mul.o slip_get_largest_pivot.o slip_ref_triangular_solve.o SLIP_backslash.o slip_create_mpz_array.o slip_get_nonzero_pivot.o SLIP_LU_solve.o slip_back_sub.o slip_cumsum.o slip_get_pivot.o SLIP_malloc.o slip_sparse_collapse.o SLIP_calloc.o slip_dfs.o slip_get_smallest_pivot.o SLIP_matrix_allocate.o slip_sparse_realloc.o slip_cast_array.o slip_expand_double_array.o SLIP_gmp.o SLIP_matrix_copy.o SLIP_matrix_check.o slip_cast_matrix.o slip_expand_mpfr_array.o SLIP_initialize.o SLIP_matrix_free.o slip_check_solution.o slip_expand_mpq_array.o SLIP_initialize_expert.o SLIP_matrix_nnz.o SLIP_create_default_options.o SLIP_finalize.o SLIP_LU_analysis_free.o slip_permute_x.o slip_permute_b.o slip_create_mpfr_array.o slip_forward_sub.o SLIP_LU_analyze.o slip_reach.o -o /mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/lib/libsliplu.so.1.0.2 -lm -lrt -Wl,-rpath=/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/lib -lgfortran -lsuitesparseconfig -lamd -lcolamd -lm -lgmp -lmpfr SLIP_gmp.o: In function SLIP_mpfr_get_q': SLIP_gmp.c:(.text+0x234c): undefined reference tompfr_get_q' collect2: error: ld returned 1 exit status Makefile:69: recipe for target '/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/lib/libsliplu.so.1.0.2' failed make[3]: [/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/lib/libsliplu.so.1.0.2] Error 1 make[3]: Leaving directory '/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/SLIP_LU/Lib' Makefile:53: recipe for target 'library' failed make[2]: [library] Error 2 make[2]: Leaving directory '/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/SLIP_LU/Lib' Makefile:24: recipe for target 'C' failed make[1]: *** [C] Error 2 make[1]: Leaving directory '/mnt/d/ceres_rk/SuiteSparse-5.10.1/SuiteSparse-5.10.1/SLIP_LU' Makefile:18: recipe for target 'go' failed

To Reproduce undefined reference to `mpfr_get_q'

Expected behavior cross compile success

Screenshots 16E59B9E-B4EF-4efc-BA90-32779A3CE85C

Desktop (please complete the following information):

Additional context i had saw some problem about the mpfr_get_q,the anwser is low version mpfr,but my mpfr version is above 4.0

cute-duck commented 3 years ago

image forget see libmpfr version,this is a Screenshots.and readelf libmpfr.so can not see mpfr_get_q function, you can see the first picture

DrTimothyAldenDavis commented 3 years ago

You must be linking against an old version of libmpfr, because mpfr_get_q appears in the latest MPFR library but not in older ones.

On Thu, Aug 5, 2021 at 10:43 PM cute-duck @.***> wrote:

[image: image] https://user-images.githubusercontent.com/20561247/128452578-02ba61d2-2d0b-462c-b7de-7338b3aa1cbb.png forget see libmpfr version,this is a Screenshots.and readelf libmpfr.so can not see mpfr_get_q function, you can see the first picture

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/98#issuecomment-893978175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYIIOMRTWAD46DSB7UTRHTT3NK6BANCNFSM5BVCZQ2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

cute-duck commented 3 years ago

Thank you , i mistake the version of mpfr, the suffix is not the real version number, compile success with 4.0 mpfr