Incidencia #8678

NCSのコンパイル中にエラーが発生する(Linux AMD64)
Abrir Fecha: 2006-07-19 01:00 Última actualización: 2006-07-19 15:35

Informador:
(Anónimo)
Propietario:
Tipo:
Estado:
Open [Owner assigned]
Componente:
(Ninguno)
Hito:
(Ninguno)
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
1

Details

linux(AMD64)でNCSがbuildできません。
shared libraryを作成する際に必要な-fPIC オプションが落
ちていることが原因かもしれません。

行った作業:
./configure
make

発生する場所:
libs/mod_ncs.so
のコンパイル中。最後は

g++ -shared -nostdlib
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtbeginS.o
.libs/setup.o .libs/nmake.o .libs/nlink.o .libs/npp.o
.libs/ne.o .libs/nstim-pmatch.o .libs/nstim-input.o
.libs/nstim-numget.o .libs/nstim.o .libs/screen.o
.libs/nlist.o .libs/nsclst.o .libs/ncal.o .libs/nout.o
.libs/nasgn.o .libs/ndelay.o .libs/nerase.o
.libs/ngetp.o .libs/ninteg.o .libs/npara.o
.libs/ntime.o .libs/nchgbuff.o -Wl,--rpath
-Wl,/home/yoshito/src/satellite-4.2.3/lib/common/.libs
-Wl,--rpath -Wl,/usr/local/satellite4/lib -pthread
-L/home/yoshito/src/satellite-4.2.3/modules/ncs/lib/common
-lncsc ../../../lib/common/.libs/libsatellite.so
-lpthread -ldl -L/usr/lib/gcc/x86_64-linux-gnu/4.0.3
-L/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../lib64
-L/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../..
-L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.0.3/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/4.0.3/../../../../lib64/crtn.o
-pthread -pthread -pthread -Wl,-soname -Wl,mod_ncs.so
-o .libs/mod_ncs.so

です。


発生するエラー:
/usr/bin/ld:
/home/yoshito/src/satellite-4.2.3/modules/ncs/lib/common/libncsc.a(scf.o):
relocation R_X86_64_32 against `a local symbol' can not
be used when making a shared object; recompile with -fPIC
/home/yoshito/src/satellite-4.2.3/modules/ncs/lib/common/libncsc.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status


確認した環境:
Ubuntu Linux 6.06(LTS) AMD64
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
automake (GNU automake) 1.4-p6
GNU Make 3.81beta4
libc6 2.3.6-0ubuntu20

Ticket History (2/2 Histories)

2006-07-19 01:00 Updated by: None
  • File 1524: ncs.log is attached
2006-07-19 15:35 Updated by: orrisroot
Comentario
Logged In: YES
user_id=8064

おそらく static library と dynamic library を混ぜてコンパイ
ルしようとしているのが問題かと思います.
NCS の依存ライブラリを全て dynamic library に変更するのがよ
いのですが,NCS 実行中にシミュレーション実行バイナリを作成し
た後シンボルの解決ができない問題が発生したためこのような形に
なっています.
解決策を検討してみます.

Attachment File List

  • ncs.log(43KB)
    • NCSをmakeしたときのlogです。

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar