En esta entrada detallo los pasos que he dado para intentar compilar un plugin de compiz, por si a alguien le resulta de utilidad (si esta intentando lo mismo y no quiere cometer los mismos errores).
No tengo apenas experiencia con gcc, y ninguna con make, autogen, etc, por lo que puede haber cosas que os resulten evidentes y para mi no lo sean. Si alguien tiene solucion para algo, le estaría mil veces agradecido.
Sigue en la pagina de la entrada…
Los plugins no parecen tener una estructura excesivamente complicada (para hacer alguna chorradita sencilla al menos), pero si no los puedes compilar y probar, te da lo mismo que lo mismo te da.
Lo primero fue intentar seguir las instrcciones del archivo INSTALL del cvs. Así que lo primero fue descargar todos los fuentes:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login#Sin password (presionar tecla enter)cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co app/compizcvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg logout
Sin embargo el autogen no iba bien, intale autogen, automake, libtool, y no hubo manera. Lo siguiente es la salida de script:
Script iniciado (jue 09 mar 2006 18:16:15 CET) ]0;lopez@corocota: ~/pru/app/compiz [?1h =lopez@corocota:~/pru/app/compiz$ ./autogen.sh [?1l >autoreconf: Entering directory `.'autoreconf: configure.ac: not using Gettextautoreconf: running: aclocal autoreconf: configure.ac: tracingautoreconf: running: libtoolize --copyPutting files in AC_CONFIG_AUX_DIR, `config'.libtoolize: `config.guess' exists: use `--force' to overwritelibtoolize: `config.sub' exists: use `--force' to overwritelibtoolize: `ltmain.sh' exists: use `--force' to overwriteautoreconf: running: /usr/bin/autoconfautoreconf: running: /usr/bin/autoheaderautoreconf: running: automake --add-missing --copy --no-forceautoreconf: Leaving directory `.'checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking whether to enable maintainer-specific portions of Makefiles... nochecking for style of include used by make... GNUchecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ANSI C... none neededchecking dependency style of gcc... gcc3checking for library containing strerror... none requiredchecking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ANSI C... (cached) none neededchecking dependency style of gcc... (cached) gcc3checking how to run the C preprocessor... gcc -Echecking build system type... i686-pc-linux-gnuchecking host system type... i686-pc-linux-gnuchecking for a sed that does not truncate output... /bin/sedchecking for egrep... grep -Echecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for /usr/bin/ld option to reload object files... -rchecking for BSD-compatible nm... /usr/bin/nm -Bchecking whether ln -s works... yeschecking how to recognise dependent libraries... pass_allchecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking dlfcn.h usability... yeschecking dlfcn.h presence... yeschecking for dlfcn.h... yeschecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... gcc3checking how to run the C++ preprocessor... g++ -Echecking for g77... nochecking for f77... nochecking for xlf... nochecking for frt... nochecking for pgf77... nochecking for fort77... nochecking for fl32... nochecking for af77... nochecking for f90... nochecking for xlf90... nochecking for pgf90... nochecking for epcf90... nochecking for f95... nochecking for fort... nochecking for xlf95... nochecking for ifc... nochecking for efc... nochecking for pgf95... nochecking for lf95... nochecking for gfortran... nochecking whether we are using the GNU Fortran 77 compiler... nochecking whether accepts -g... nochecking the maximum length of command line arguments... 32768checking command to parse /usr/bin/nm -B output from gcc object... okchecking for objdir... .libschecking for ar... archecking for ranlib... ranlibchecking for strip... stripchecking if gcc static flag works... yeschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPICchecking if gcc PIC flag -fPIC works... yeschecking if gcc supports -c -o file.o... yeschecking whether the gcc linker (/usr/bin/ld) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yesconfigure: creating libtoolappending configuration tag "CXX" to libtoolchecking for ld used by g++... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking for g++ option to produce PIC... -fPICchecking if g++ PIC flag -fPIC works... yeschecking if g++ supports -c -o file.o... yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yesappending configuration tag "F77" to libtoolchecking for ANSI C header files... (cached) yeschecking for stdlib.h... (cached) yeschecking sys/time.h usability... yeschecking sys/time.h presence... yeschecking for sys/time.h... yeschecking for unistd.h... (cached) yeschecking whether byte ordering is bigendian... nochecking for pkg-config... /usr/bin/pkg-configchecking pkg-config is at least version 0.9.0... yeschecking for COMPIZ... configure: error: Package requirements (libpng xcomposite xfixes xdamage xrandr ice sm libstartup-notification-1.0 >= 0.7) were not met.Consider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively you may set the COMPIZ_CFLAGS and COMPIZ_LIBS environment variablesto avoid the need to call pkg-config. See the pkg-config man page formore details. ]0;lopez@corocota: ~/pru/app/compiz [?1h =lopez@corocota:~/pru/app/compiz$ make [?1l >make: *** No se especificó ningún objetivo y no se encontró ningún makefile. Alto. ]0;lopez@corocota: ~/pru/app/compiz [?1h =lopez@corocota:~/pru/app/compiz$ [?1l >Script terminado (jue 09 mar 2006 18:17:59 CET)
Luego intenté compilar a pelo con gcc un plugin solo (que es lo que me interesa), pero el archivo resultante genera una violación de segmento al ejecutar compiz…
gcc -fPIC -I../include -c rotate.c -o rotate.ogcc -fPIC -share rotate.o -o librotate.so
Ya digo que no tengo mucha idea, así que puede ser que ni siquiera tenga sentido lo que he hecho XDD. Por cierto en algun punto del proceso bajé algunos archivos de cabecera:
/usr/include/X11/extensions/wget http://webcvs.freedesktop.org/*checkout*/xorg/lib/Xdamage/include/X11/extensions/Xdamage.h?rev=1.3/usr/include/X11/extensions/wget http://webcvs.freedesktop.org/*checkout*/xorg/xc/include/extensions/damagewire.h?rev=1.2.8.1/usr/include/X11/wget http://webcvs.freedesktop.org/*checkout*/xorg/xc/lib/X11/Xregion.h?rev=1.1/usr/include/mkdir libsn/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn.h?rev=1.1/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn-launchee.h?rev=1.4/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn-launcher.h?rev=1.6/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn-monitor.h?rev=1.6/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn-common.h?rev=1.3/usr/include/libsn/wget http://webcvs.freedesktop.org/*checkout*/startup-notification/startup-notification/libsn/sn-util.h?rev=1.2/usr/include/GL/wget http://webcvs.freedesktop.org/*checkout*/xorg/xc/extras/Mesa/include/GL/gl.h?rev=1.4/usr/include/GL/wget http://webcvs.freedesktop.org/*checkout*/xorg/xc/extras/Mesa/include/GL/glext.h?rev=1.1.1.5/usr/include/GL/wget http://webcvs.freedesktop.org/xorg/xc/extras/Mesa/include/GL/glx.h?rev=1.1.1.3&view=log/usr/include/GL/wget http://webcvs.freedesktop.org/xorg/xc/extras/Mesa/include/GL/glxext.h?rev=1.5&view=log
Un saludo, espero que mis errores os puedan servir de algo.
PD: Cualquier información de como compilar un plugin será recibida con los brazos abiertos.