Compilando para MAC

Started by OscarBraindeaD, April 01, 2009, 05:32:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

OscarBraindeaD

Hola a todos.

Para no dar el tostón en exclusiva a AnimaNegra y Splinter (gracias por vuestra ayuda y paciencia), lo pongo por aquí a ver si alguien puede echarme una mano.
Estoy intentando compilar Bennu para Mac OsX. 
He instalado  y al parecer correctamente, ya que conseguí compilar el Fenix 0.92:
-LibSDl
-LibSDL_mixer
-LibPNG
-LibZ
-LibUngif

Aún así no me lo compila, al hacer ./configure me muestra:
[code language="bennu"]
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
...
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for gzsetparams in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bgdrtm/Makefile
config.status: creating bgdrtm/src/Makefile
config.status: creating bgdc/Makefile
config.status: creating bgdc/src/Makefile
config.status: creating bgdi/Makefile
config.status: creating bgdi/src/Makefile
config.status: executing depfiles commands
[/code]

Sólo muestro lo que no dice "yes", etc... no sé si esta salida es correcta o se ve que está fallando algo.

El caso es que, al hacer make del invento, me muestra lo siguiente:
[code language="bennu"]
Making all in bgdrtm
Making all in src
/bin/sh ../../libtool --tag=CC   --mode=link gcc -O2 -finline-functions -fno-strict-aliasing -I/usr/local/include -Wall -DTARGET_MAC -I../../include -I../include -D__BGDRTM__ -DDEBUG -O2 -finline-functions -fno-strict-aliasing -I/usr/local/include -s -module -no-undefined -avoid-version -export-all-symbols  -o libbgdrtm.la -rpath /usr/local/lib libbgdrtm_la-dcbr.lo libbgdrtm_la-sysprocs.lo libbgdrtm_la-strings.lo libbgdrtm_la-dirs.lo libbgdrtm_la-copy.lo libbgdrtm_la-misc.lo libbgdrtm_la-instance.lo libbgdrtm_la-interpreter.lo libbgdrtm_la-debug.lo libbgdrtm_la-files.lo libbgdrtm_la-varspace_file.lo libbgdrtm_la-xctype.lo  -L/usr/local/lib
gcc  -o .libs/libbgdrtm.so -bundle  .libs/libbgdrtm_la-dcbr.o .libs/libbgdrtm_la-sysprocs.o .libs/libbgdrtm_la-strings.o .libs/libbgdrtm_la-dirs.o .libs/libbgdrtm_la-copy.o .libs/libbgdrtm_la-misc.o .libs/libbgdrtm_la-instance.o .libs/libbgdrtm_la-interpreter.o .libs/libbgdrtm_la-debug.o .libs/libbgdrtm_la-files.o .libs/libbgdrtm_la-varspace_file.o .libs/libbgdrtm_la-xctype.o  -L/usr/local/lib
Undefined symbols:
  "_gzclose", referenced from:
      _file_close in libbgdrtm_la-files.o
      _file_exists in libbgdrtm_la-files.o
  "_gzopen", referenced from:
      _file_open in libbgdrtm_la-files.o
      _file_open in libbgdrtm_la-files.o
      _file_open in libbgdrtm_la-files.o
  "_gzwrite", referenced from:
      _file_write in libbgdrtm_la-files.o
  "_gzread", referenced from:
      _file_read in libbgdrtm_la-files.o
  "_gzeof", referenced from:
      _file_eof in libbgdrtm_la-files.o
  "_gzseek", referenced from:
      _file_seek in libbgdrtm_la-files.o
  "_gzgets", referenced from:
      _file_qgets in libbgdrtm_la-files.o
      _file_gets in libbgdrtm_la-files.o
  "_gztell", referenced from:
      _file_pos in libbgdrtm_la-files.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [libbgdrtm.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
[/code]

He intentado meter en el path donde busca las librerías la dirección de la zlib por si fuese eso, pero tampoco da resultado por lo que se ve...

La cuestión es que soy tirando a nuevo en esto del make y del mac por lo que ando perdido.
Por cierto, esto ocurre compilando el core, con los módulos aún no me he puesto viendo el exitazo que tengo ;)

Muchas gracias y perdonad el tamaño del post!

Salud



SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

#2
Ups!

Te refieres a este -lz: "COMMON_LDFLAGS="-L/usr/local/lib -lz -lshlwapi"?
Así es como está puesto para windows, para mac he de ponerlo igual?

Y, otra cosa, a la hora de hacer los modules, dice que hay que poner:
./configure --with-bennu-prefix=<path donde se encuentran los fuentes del core>

Cuál es el prefijo de Bennu que hay que poner?

Lo siento, sé que estas preguntas son de novato total...

Muchas gracias!
Salud

SplinterGU

claro, para mac igual al de windows sin -lshlwapi

el configure para los modulos es

por ejemplo, si tenes todos los fuentes en:

/opt/bennugd/

y dentro 3 carpetas

core
modules
tools

el prefijo es /opt/bennugd/core

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

Muchas gracias!!!
Soy torpe y nuevo... una combinación explosiva!!!!
Esta tarde cuando llegue a casa lo pruebo a ver qué pasa.
Luego os cuento.

Salud

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

Maldición! sigue sin pasar el make... da el mismo error que antes...  ???
Adjunto como anexo la salida del ./configure y el make, a ver si se ve mejor así...




SplinterGU

modificaste el configure.in e hiciste el autoconf y automake?
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

Quote from: SplinterGU on April 02, 2009, 08:33:14 PM
modificaste el configure.in e hiciste el autoconf y automake?

parece que funciona!
Olvidé hacer autoconf!
El automake me da este error:
configure.in:55: version mismatch.  This is Automake 1.10,
configure.in:55: but the definition used by this AM_INIT_AUTOMAKE
configure.in:55: comes from Automake 1.10.1.  You should recreate
configure.in:55: aclocal.m4 with aclocal and run automake again.

Pero luego, haciendo ./configure y make, parece que sí crea los binarios!!!
Luego los probaré y haré los modules!
Muchas gracias!
Salud

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

#10
Hola de nuevo, siento ser tan cansino!

Bueno, no podía ser tan sencillo... ahora fallan los módulos.
>Modifico el configure.in incluyendo  COMMON_LIBS="$LIBS -lz" 
>ejecuto autoconf
>ejecuto automake (da el mismo error que antes)
>ejecuto ./configure --with-bennu-prefix=/Users/oscar/bennu/build38/core
>ejecuto make y muestra el error que hay en el documento adjunto...

Args, esto es un sin vivir  ;D

Gracias de nuevo




josebita

Fíjate splinter, que en las opciones de compilación no se incluye por ningún lado el "-lz". ¿Puede ser esto por lo que te acabo de pasar por PM?

SplinterGU

1 imagen vale mas que mil palabras


csplinter@splinter:~$ cd bennugd/
splinter@splinter:~/bennugd$ grep  COMMON_LIBS */*
modules/config.log:COMMON_LIBS=' -lc -lz -ldl'
modules/config.status:s,@COMMON_LIBS@,|#_!!_#| -lc -lz -ldl,g
modules/configure:COMMON_LIBS
modules/configure:        COMMON_LIBS="$COMMON_LIBS -lc -lz -ldl"
modules/configure:     COMMON_LIBS="$LIBS -lz -lshlwapi"
modules/configure:COMMON_LIBS!$COMMON_LIBS$ac_delim
modules/configure.in:        COMMON_LIBS="$COMMON_LIBS -lc -lz -ldl"
modules/configure.in:     COMMON_LIBS="$LIBS -lz -lshlwapi"
modules/configure.in:AC_SUBST(COMMON_LIBS)
modules/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
splinter@splinter:~/bennugd$ grep  COMMON_LIBS */*/*
modules/autom4te.cache/output.0:COMMON_LIBS
modules/autom4te.cache/output.0:        COMMON_LIBS="$COMMON_LIBS -lc -lz -ldl"
modules/autom4te.cache/output.0:     COMMON_LIBS="$LIBS -lz -lshlwapi"
modules/autom4te.cache/output.0:COMMON_LIBS!$COMMON_LIBS$ac_delim
modules/autom4te.cache/output.1:COMMON_LIBS
modules/autom4te.cache/output.1:        COMMON_LIBS="$COMMON_LIBS -lc -lz -ldl"
modules/autom4te.cache/output.1:     COMMON_LIBS="$LIBS -lz -lshlwapi"
modules/autom4te.cache/output.1:COMMON_LIBS!$COMMON_LIBS$ac_delim
modules/autom4te.cache/traces.0:m4trace:configure.in:76: -1- m4_pattern_allow([^COMMON_LIBS$])
modules/autom4te.cache/traces.1:m4trace:configure.in:74: -1- AC_SUBST([COMMON_LIBS])
modules/autom4te.cache/traces.1:m4trace:configure.in:74: -1- AC_SUBST_TRACE([COMMON_LIBS])
modules/autom4te.cache/traces.1:m4trace:configure.in:74: -1- m4_pattern_allow([^COMMON_LIBS$])
modules/libblit/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libblit/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libdraw/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libdraw/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libfont/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libfont/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libgrbase/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libgrbase/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libjoy/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libjoy/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libkey/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libkey/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libmouse/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libmouse/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/librender/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/librender/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libscroll/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libscroll/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libsdlhandler/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libsdlhandler/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libtext/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libtext/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libvideo/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libvideo/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/libwm/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/libwm/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_blendop/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_blendop/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_cd/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_cd/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_debug/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_debug/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_dir/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_dir/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_draw/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_draw/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_effects/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_effects/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_ffi/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_ffi/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_file/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_file/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_flic/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_flic/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_grproc/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_grproc/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_joy/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_joy/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_key/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_key/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_m7/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_m7/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_map/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_map/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_math/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_math/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_mem/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_mem/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_mouse/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_mouse/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_path/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_path/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_proc/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_proc/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_rand/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_rand/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_regex/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_regex/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_say/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_say/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_screen/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_screen/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_scroll/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_scroll/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_sort/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_sort/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_sound/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_sound/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_string/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_string/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_sys/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_sys/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_text/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_text/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_time/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_time/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_timers/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_timers/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_video/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_video/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
modules/mod_wm/Makefile:COMMON_LIBS =  -lc -lz -ldl
modules/mod_wm/Makefile.in:COMMON_LIBS = @COMMON_LIBS@
tools/moddesc/Makefile:moddesc_LDADD = $(COMMON_LIBS)
tools/moddesc/Makefile.am:moddesc_LDADD = $(COMMON_LIBS)
tools/moddesc/Makefile.in:moddesc_LDADD = $(COMMON_LIBS)
splinter@splinter:~/bennugd$
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

OscarBraindeaD

Holas!
Muchas gracias, lo he intentado de estas dos formas:

    darwin*)
        INCLUDES="-I/usr/local/include"
        COMMON_CFLAGS="-Wall -DTARGET_MAC"
   COMMON_LIBS="-L/usr/local/lib -lc -lz -ldl"
       ;;

y

    darwin*)
        INCLUDES="-I/usr/local/include"
        COMMON_CFLAGS="-Wall -DTARGET_MAC"
        COMMON_LIBS="-L/usr/local/lib"
   COMMON_LIBS="$COMMON_LIBS -lc -lz -ldl"
       ;;

y tampoco me ha funcionado... sigue error... ¡¡¡¡¡esto ya es algo personal!!!!!   ;D

[code language="bennu"]
Undefined symbols:
  "_c_lower", referenced from:
      _c_lower$non_lazy_ptr in libbgdrtm.a(libbgdrtm_la-strings.o)
  "_gzclose", referenced from:
      _file_close in libbgdrtm.a(libbgdrtm_la-files.o)
      _file_exists in libbgdrtm.a(libbgdrtm_la-files.o)
  "_c_type", referenced from:
      _c_type$non_lazy_ptr in libbgdrtm.a(libbgdrtm_la-sysprocs.o)
  "_gzopen", referenced from:
      _file_open in libbgdrtm.a(libbgdrtm_la-files.o)
      _file_open in libbgdrtm.a(libbgdrtm_la-files.o)
      _file_open in libbgdrtm.a(libbgdrtm_la-files.o)
  "_gzwrite", referenced from:
      _file_write in libbgdrtm.a(libbgdrtm_la-files.o)
  "_gzread", referenced from:
      _file_read in libbgdrtm.a(libbgdrtm_la-files.o)
  "_c_upper", referenced from:
      _c_upper$non_lazy_ptr in libbgdrtm.a(libbgdrtm_la-strings.o)
      _c_upper$non_lazy_ptr in libbgdrtm.a(libbgdrtm_la-sysprocs.o)
  "_gzeof", referenced from:
      _file_eof in libbgdrtm.a(libbgdrtm_la-files.o)
  "_gzseek", referenced from:
      _file_seek in libbgdrtm.a(libbgdrtm_la-files.o)
  "_gzgets", referenced from:
      _file_qgets in libbgdrtm.a(libbgdrtm_la-files.o)
      _file_gets in libbgdrtm.a(libbgdrtm_la-files.o)
  "_gztell", referenced from:
      _file_pos in libbgdrtm.a(libbgdrtm_la-files.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [libvideo.la] Error 1
make: *** [all-recursive] Error 1
[/code]

SplinterGU

1) adjunta toda la salida de la compilacion, incluido el configure (make > log 2>> log)
2) hace un ldd de la libz
Download Lastest BennuGD Release: http://www.bennugd.org/node/2