Software > Programmieren, Kompilieren
TME - The Machine Emulator (Sun-2/3/4) kompilieren
escimo:
Alles zum ausflippen: warum kann man unter Gentoo TME "einwandfrei" aus den Quellen übersetzen aber Ubuntu "zickt" in der 32-Bit chroot-Umgebung rum. Und da habe ich GLIB 2.0 und GTK 1.2 ohne Probleme übersetzen und installieren können unterhalb /usr/local...
Der Compiler erkennt die folgenden Zeilen als Fehler und bricht ab, da beim Kompilieren der Schalter -Werror gesetzt ist:
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# make
make all-recursive
make[1]: Entering directory `/home/sx/projects/tme/tme-0.6'
Making all in tme
make[2]: Entering directory `/home/sx/projects/tme/tme-0.6/tme'
Making all in generic
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/tme/generic'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme/generic'
Making all in ic
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/tme/ic'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme/ic'
Making all in machine
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/tme/machine'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme/machine'
Making all in scsi
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/tme/scsi'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme/scsi'
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/tme'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme'
make[2]: Leaving directory `/home/sx/projects/tme/tme-0.6/tme'
Making all in libltdl
make[2]: Entering directory `/home/sx/projects/tme/tme-0.6/libltdl'
make all-am
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/libltdl'
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/libltdl'
make[2]: Leaving directory `/home/sx/projects/tme/tme-0.6/libltdl'
Making all in libtme
make[2]: Entering directory `/home/sx/projects/tme/tme-0.6/libtme'
make all-am
make[3]: Entering directory `/home/sx/projects/tme/tme-0.6/libtme'
if /bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT misc.lo -MD -MP -MF ".deps/misc.Tpo" \
-c -o misc.lo `test -f 'misc.c' || echo './'`misc.c; \
then mv ".deps/misc.Tpo" ".deps/misc.Plo"; \
else rm -f ".deps/misc.Tpo"; exit 1; \
fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c misc.c -o misc.o
if /bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT threads-sjlj.lo -MD -MP -MF ".deps/threads-sjlj.Tpo" \
-c -o threads-sjlj.lo `test -f 'threads-sjlj.c' || echo './'`threads-sjlj.c; \
then mv ".deps/threads-sjlj.Tpo" ".deps/threads-sjlj.Plo"; \
else rm -f ".deps/threads-sjlj.Tpo"; exit 1; \
fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT threads-sjlj.lo -MD -MP -MF .deps/threads-sjlj.Tpo -c threads-sjlj.c -o threads-sjlj.o
if /bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT memory-auto.lo -MD -MP -MF ".deps/memory-auto.Tpo" \
-c -o memory-auto.lo `test -f 'memory-auto.c' || echo './'`memory-auto.c; \
then mv ".deps/memory-auto.Tpo" ".deps/memory-auto.Plo"; \
else rm -f ".deps/memory-auto.Tpo"; exit 1; \
fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT memory-auto.lo -MD -MP -MF .deps/memory-auto.Tpo -c memory-auto.c -o memory-auto.o
if /bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT module.lo -MD -MP -MF ".deps/module.Tpo" \
-c -o module.lo `test -f 'module.c' || echo './'`module.c; \
then mv ".deps/module.Tpo" ".deps/module.Plo"; \
else rm -f ".deps/module.Tpo"; exit 1; \
fi
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I. -I. -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -D_TME_IMPL -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -g -O2 -Wundef -Wall -Werror -MT module.lo -MD -MP -MF .deps/module.Tpo -c module.c -o module.o
cc1: warnings being treated as errors
module.c: In function 'tme_module_open':
module.c:245: error: format not a string literal and no format arguments
module.c:255: error: format not a string literal and no format arguments
module.c:297: error: format not a string literal and no format arguments
module.c:322: error: format not a string literal and no format arguments
make[3]: *** [module.lo] Error 1
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/libtme'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/sx/projects/tme/tme-0.6/libtme'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sx/projects/tme/tme-0.6'
make: *** [all] Error 2
(intrepid)root@inovo:~/projects/tme/tme-0.6# uname -a
Linux inovo 2.6.27-16-generic #1 SMP Tue Dec 1 19:26:23 UTC 2009 i686 GNU/Linux
--- Ende Code ---
Google brachte mir folgendes:
https://wiki.ubuntu.com/CompilerFlags#-Wformat%20-Wformat-security
Da ich den Code nicht anfassen will, schlägt mir die Seite folgendes vor:
--- Zitat ---Disabled with -Wno-format-security or -Wformat=0 in CPPFLAGS.
--- Ende Zitat ---
Nun muss ich nur noch eine Stelle finden wo ich das geeignetermaßen einfüge... :-\
escimo:
--- Zitat ---Nun muss ich nur noch eine Stelle finden wo ich das effektiv einfüge... :-\
--- Ende Zitat ---
Folgendes brachte keine Erfolg:
* configure.in: CPPFLAGS = ... -Wformat=0
* Makefile: CPPFLAGS = ... -Wformat=0
Dann habe ich es mit einer Setzen der Umgebungsvariable probiert:
(Shell)> # export CPPFLAGS = " ${CPPFLAGS-} -Wformat=0 "
Nach "sh ./configure --disable-shared -with-x"
und "make" habe ich jetzt folgende Fehler (hier man kommt zumindest etwas weiter):
--- Code: ---...
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I. -I. -D_TME_IMPL -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/include/X11 -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG -Wformat=0 -Wundef -Wall -Werror -MT gtk-mouse.lo -MD -MP -MF .deps/gtk-mouse.Tpo -c gtk-mouse.c -o gtk-mouse.o
cc1: warnings being treated as errors
gtk-mouse.c: In function '_tme_gtk_mouse_mouse_event':
gtk-mouse.c:170: error: implicit declaration of function '_tme_gtk_mouse_warp_pointer'
make[3]: *** [gtk-mouse.lo] Error 1
make[3]: Leaving directory `/home/sx/projects/tme/tme-0.6/host/gtk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/sx/projects/tme/tme-0.6/host'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sx/projects/tme/tme-0.6'
make: *** [all] Error 2
--- Ende Code ---
Wenn das so weitergeht, bin ich nächstes Jahr immer noch nicht fertig und da ist es bekanntlich nicht mehr lange hin... :P
erisch:
ich glaube mit dem rausschmeissen von -Werror ersparst du dir ne Menge Arbeit. Ansonsten Header finden der _tme_gtk_mouse_warp_pointer enthaelt und #includen.
Mfg. Erisch
escimo:
Hi Erisch,
danke für den Tipp. Ich habe in der Datei "configure.in" den Schalter "-Werror" rausgenommen:
--- Zitat ----Werror
Make all warnings into hard errors. Source code which triggers
warnings will be rejected.
--- Ende Zitat ---
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# make
cd . && /bin/bash /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
/home/sx/projects/tme/tme-0.6/missing: line 46: aclocal-1.7: command not found
WARNING: `aclocal-1.7' is missing on your system. You should only need it if
you modified `acinclude.m4' or `configure.in'. You might want
to install the `Automake' and `Perl' packages. Grab them from
any GNU archive site.
cd . && \
/bin/bash /home/sx/projects/tme/tme-0.6/missing --run automake-1.7 --gnu Makefile
aclocal.m4:48: error: m4_defn: undefined macro: _m4_divert_diversion
aclocal.m4:48: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
automake-1.7: autoconf failed with exit status: 1
make: *** [Makefile.in] Error 1
--- Ende Code ---
Jetzt findet der beim Build das Kommando aclocal-1.7 nicht. Hat das System vollkommen recht, unter diesem Namen gibt es das auch nicht:
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# which aclocal
/usr/bin/aclocal
(intrepid)root@inovo:~/projects/tme/tme-0.6# aclocal --version
aclocal (GNU automake) 1.10.1
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey@redhat.com>
and Alexandre Duret-Lutz <adl@gnu.org>.
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /usr/bin/aclocal
lrwxrwxrwx 1 root root 25 2009-09-30 18:45 /usr/bin/aclocal -> /etc/alternatives/aclocal
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /etc/alternatives/aclocal
lrwxrwxrwx 1 root root 21 2009-09-30 18:45 /etc/alternatives/aclocal -> /usr/bin/aclocal-1.10
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /usr/bin/aclocal-1.10
-rwxr-xr-x 1 root root 31139 2008-05-03 02:38 /usr/bin/aclocal-1.10
--- Ende Code ---
Und das geht jetzt munter so weiter:
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# grep -inR "aclocal-1.7" ./*
./bus/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./bus/sbus/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./bus/multibus/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./config.log:2693:ACLOCAL='${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7'
./config.status:538:s,@ACLOCAL@,${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7,;t t
./generic/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./host/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./host/posix/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./host/gtk/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./host/bsd/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./ic/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./ic/ieee754/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./ic/sparc/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./ic/m68k/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./libltdl/Makefile:39:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/libltdl/missing --run aclocal-1.7
./libltdl/config.status:490:s,@ACLOCAL@,${SHELL} /home/sx/projects/tme/tme-0.6/libltdl/missing --run aclocal-1.7,;t t
./libltdl/config.log:1613:ACLOCAL='${SHELL} /home/sx/projects/tme/tme-0.6/libltdl/missing --run aclocal-1.7'
./libtme/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./machine/sun4/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./machine/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./machine/sun3/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./machine/sun2/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./machine/sun/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./scsi/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./serial/Makefile:74:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tme/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tme/machine/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tme/scsi/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tme/generic/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tme/ic/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tmesh/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
./tools/Makefile:43:ACLOCAL = ${SHELL} /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
--- Ende Code ---
Da muss ich wohl noch so einiges anpassen ::)
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# make clean
cd . && \
/bin/bash /home/sx/projects/tme/tme-0.6/missing --run automake-1.7 --gnu Makefile
aclocal.m4:48: error: m4_defn: undefined macro: _m4_divert_diversion
aclocal.m4:48: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
automake-1.7: autoconf failed with exit status: 1
make: *** [Makefile.in] Error 1
(intrepid)root@inovo:~/projects/tme/tme-0.6# which automake
/usr/bin/automake
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /usr/bin/automake
lrwxrwxrwx 1 root root 26 2009-09-30 18:45 /usr/bin/automake -> /etc/alternatives/automake
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /etc/alternatives/automake
lrwxrwxrwx 1 root root 22 2009-09-30 18:45 /etc/alternatives/automake -> /usr/bin/automake-1.10
(intrepid)root@inovo:~/projects/tme/tme-0.6# ls -l /usr/bin/automake-1.7
lrwxrwxrwx 1 root root 22 2009-12-16 18:45 /usr/bin/automake-1.7 -> /usr/bin/automake-1.10
--- Ende Code ---
escimo:
--- Code: ---(intrepid)root@inovo:~/projects/tme/tme-0.6# make
cd . && /bin/bash /home/sx/projects/tme/tme-0.6/missing --run aclocal-1.7
acinclude.m4:35: warning: underquoted definition of AC_CHECK_ALIGNOF
acinclude.m4:35: run info '(automake)Extending aclocal'
acinclude.m4:35: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:173: warning: macro `AM_PATH_GTK' not found in library
acinclude.m4:35: error: m4_defn: undefined macro: _m4_divert_diversion
acinclude.m4:35: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal-1.7: autom4te failed with exit status: 1
make: *** [aclocal.m4] Error 1
--- Ende Code ---
Naja, das will ja nun überhaupt nicht - nur am meckern. Die Sources sind beim Versuch sie zu kompilieren fast so schlimm wie ich. Ich sehe mich schon ein Gentoo oder RedHat in einer VM installieren, da ich davon ausgehe, der Build funktioniert in einer anderen GNU/Linux-Distribution.
Und das alles nur, um
1) meine SPARCstation2 mitnehmen zu können, wo ich mit dem Laptop hingehe
2) für den Fall eines Hardware-Tods der SPARCstation2 ich noch einen Hauch von SunOS4@SPARC und SPARCompiler-Kit habe
Wenn ich wüsste wo ich anfangen muss, würde ich mir meinen eigenen SPARC-Emulator schreiben und der geht dann nur unter den von mir genutzten Betriebssystem(-Varianten) :P
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln