[构建失败] libtool
misaka00251 opened this issue · 3 comments
misaka00251 commented
This package has no problems in compiling, but will throw two errors when testing.
[39430s] F77 language support.
[39430s]
[39646s] 153: static library FAILED (f77demo.at:305)
[39885s] 154: shared library ok
[40177s] 155: shared and static together ok
[40178s]
[40178s] Fortran language support.
[40178s]
[40425s] 156: static library FAILED (fcdemo.at:319)
[40796s] 157: shared library ok
[41119s] 158: shared and static together ok
[41119s]
However, there is no such error when compiling locally. Also, I did the test manually and the output is the same as tests/testsuite
:
[root@openEuler-RISCV-rare fortran]# autoreconf
[root@openEuler-RISCV-rare fortran]# automake --add-missing
[root@openEuler-RISCV-rare fortran]# ./configure
[root@openEuler-RISCV-rare fortran]# make
[root@openEuler-RISCV-rare fortran]# ls
aclocal.m4 config.in.h~ cprogram fooc.o foof3.lo foo.h libfoo3.la libtool-2.4.6 Makefile.in
autom4te.cache config.log cprogram.c foof2.f foof3.o fprogram libfoo.la libtool.tar.xz stamp-h1
build-aux config.status cprogram.o foof2.lo foof.f fprogram.f libltdl m4 tests
config.h configure fooc.c foof2.o foof.lo fprogram.o libmix.la Makefile
config.in.h configure.ac fooc.lo foof3.f foof.o libfoo2.la libtool Makefile.am
[root@openEuler-RISCV-rare fortran]# ./fprogram
Welcome to GNU libtool Fortran demo!
Real programmers write in FORTRAN.
fsub called
fsubf called
fsub returned, saying that 2 * 2 = 4
fsub is ok!
fsub3 called
fsub3 returned, saying that 4 * 2 = 8
fsub3 is ok!
Full OBS log: https://pastebin.aosc.io/paste/sFIQ52f9Ea2u1NoudScOAg/raw
Repo: https://gitee.com/misaka00251/libtool/tree/0a8f69087c8f2780942c863df67477348a9735e9/
misaka00251 commented
/usr/bin/ld: ./.libs/libmix.a(foof.o): relocation R_RISCV_HI20 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ./.libs/libmix.a(foof2.o): relocation R_RISCV_HI20 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: unresolvable R_RISCV_CALL relocation against symbol `_gfortran_st_write@@GFORTRAN_8'
/usr/bin/ld: unresolvable R_RISCV_CALL relocation against symbol `_gfortran_st_write@@GFORTRAN_8'
是 cprogram 没编译出来,并不是 fprogram。
misaka00251 commented
Patch is coming, currently testing on local.