sonnenblen.de - Das unabhängige Sun User Forum

Software => Programmieren, Kompilieren => Thema gestartet von: signal_15 am 28. Mai 2009, 11:16:48

Titel: wrong ELF class: ELFCLASS64
Beitrag von: signal_15 am 28. Mai 2009, 11:16:48
Mahlzeit,

wieder mal das leidige thema mit dem kompilieren. diesmal versuche ich 'Bacula 3.0.1' zu uebersetzen und scheitere bereits bei den abhaengigkeiten. bevor bacula selbst uebersetzt wird, soll ein make im 'depkgs' verzeichnis durchlaufen, das jedoch beim uebersetzen von 'mtx-1.3.12' mit folgender fehlermeldung abbricht.
...
...
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h
config.status: config.h is unchanged
gmake[1]: Entering directory `/Download/bacula/bacula-3.0.1/depkgs/mtx-1.3.12'
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o mtx mtx.o mtxl.o
ld: fatal: file mtx.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to mtx
collect2: ld returned 1 exit status
gmake[1]: *** [mtx] Error 1
gmake[1]: Leaving directory `/Download/bacula/bacula-3.0.1/depkgs/mtx-1.3.12'
make: *** [mtx] Error 2
ismine/Download/bacula/bacula-3.0.1/depkgs$

google gibt mir zwar ein paar seiten, jedoch finde ich keine fuer mich passende loesung. bin fuer jede ein eingabe dankbar.

ct,
Titel: Re: wrong ELF class: ELFCLASS64
Beitrag von: erisch am 28. Mai 2009, 12:32:33
Sieht so aus als ob der Linker versucht 64bit mit 32bit libs zu linken, was nicht geht.
Vielleicht mal mtx.o und mtxl.o naeher analysieren.

Ausserdem sind in
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o mtx mtx.o mtxl.odie -L parameter sinnlos, aber das liegt sicher am Makefile.

Mfg. Erisch
Titel: Re: wrong ELF class: ELFCLASS64
Beitrag von: signal_15 am 28. Mai 2009, 12:37:48
was zum teufel bitteschoen ist gnu-autohell!?

ct,
Titel: Re: wrong ELF class: ELFCLASS64
Beitrag von: signal_15 am 28. Mai 2009, 12:47:18
Hallo erish,

du kennst mich ja, und meine wilden compiler-variablen.-) folgendes habe ich in meiner '~/.profile' auskommentiert.
 # CFLAGS="-mcpu=ultrasparc -m64 -O3"
 # CXXFLAGS="-mcpu=ultrasparc -m64 -O3"

das depkgs verzeichnis geloescht, wieder neu entpackt und nochmal ein make laufen lassen. und siehe da.
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  Makefile.in seems to ignore the --datarootdir setting
config.status: creating config.h
gmake[1]: Entering directory `/Download/bacula/bacula-3.0.1/depkgs/mtx-1.3.12'
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o mtx.o mtx.c
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o mtxl.o mtxl.c
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o mtx mtx.o mtxl.o
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o tapeinfo.o tapeinfo.c
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o tapeinfo tapeinfo.o mtxl.o
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o loaderinfo.o loaderinfo.c
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o loaderinfo loaderinfo.o mtxl.o
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o scsitape.o scsitape.c
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o scsitape scsitape.o mtxl.o
gcc -g -O2 -O6 -DVERSION="\"1.3.12\"" -I. -I.  -c -o scsieject.o scsieject.c
gcc -R/usr/local/lib -L/usr/local/lib -L/opt/SUNWspro/lib -o scsieject scsieject.o mtxl.o
gmake[1]: Leaving directory `/Download/bacula/bacula-3.0.1/depkgs/mtx-1.3.12'

===== build of mtx done =====


If you want to use mtx, you will probably want to
have it installed on your system. To do so, you must enter:

  gmake mtx-install

ct,
Titel: Re: wrong ELF class: ELFCLASS64
Beitrag von: linuxdomination am 28. Mai 2009, 12:50:08


tja die nervige betriebsblindheit...... ???
Titel: Re: wrong ELF class: ELFCLASS64
Beitrag von: erisch am 28. Mai 2009, 13:13:34
[...]
das depkgs verzeichnis geloescht, wieder neu entpackt und nochmal ein make laufen lassen. und siehe da.
[...]

ja, ein "gmake clean" wollte ich noch vorschlagen, ist mir aber zu spaet eingefallen.