project-navigation
Personal tools

Author Topic: Compile error in unix_main.c; some libs missing?  (Read 2909 times)

Offline rimo

  • Cannon Fodder
  • **
  • Posts: 8
    • View Profile
Compile error in unix_main.c; some libs missing?
« on: June 10, 2011, 01:42:29 pm »
Hi,
wanted to try the game again after a while.
I just set up my development environment on macos (snow leopard) via macports as described on wiki (but without the +universal tag, since it is a intel based macbook pro).
Checked out the latest version with git:
Code: [Select]
commit 0cd2abda8aec6c9950c4ecff7c988f38338d15a3
Author: Tamás Fehérvári <geever@users.sourceforge.net>
Date:   Wed Jun 8 20:05:21 2011 +0200

During compilation I got the following errors:
Code: [Select]
>make
===> CC [ufo] src/ports/unix/unix_main.c
src/ports/unix/unix_main.c:164: warning: ‘struct dl_phdr_info’ declared inside parameter list
src/ports/unix/unix_main.c:164: warning: its scope is only this definition or declaration, which is probably not what you want
src/ports/unix/unix_main.c: In function ‘find_matching_file’:
src/ports/unix/unix_main.c:169: warning: ISO C forbids nested functions
src/ports/unix/unix_main.c:169: warning: type qualifiers ignored on function return type
src/ports/unix/unix_main.c:169: warning: return type defaults to ‘int’
src/ports/unix/unix_main.c:169: warning: no previous declaration for ‘ElfW’
src/ports/unix/unix_main.c: In function ‘ElfW’:
src/ports/unix/unix_main.c:169: error: expected declaration specifiers before ‘*’ token
src/ports/unix/unix_main.c:170: error: expected declaration specifiers before ‘ElfW’
src/ports/unix/unix_main.c:171: error: expected declaration specifiers before ‘phdr’
src/ports/unix/unix_main.c:172: error: expected declaration specifiers before ‘for’
src/ports/unix/unix_main.c:172: error: expected declaration specifiers before ‘--’ token
src/ports/unix/unix_main.c:172: error: expected declaration specifiers before ‘phdr’
src/ports/unix/unix_main.c:182: error: expected declaration specifiers before ‘return’
src/ports/unix/unix_main.c:183: error: expected declaration specifiers before ‘}’ token
src/ports/unix/unix_main.c:186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
src/ports/unix/unix_main.c:238: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
src/ports/unix/unix_main.c:280: warning: type of ‘Phdr’ defaults to ‘int’
src/ports/unix/unix_main.c:280: error: expected ‘{’ at end of input
src/ports/unix/unix_main.c: In function ‘find_matching_file’:
src/ports/unix/unix_main.c:280: error: expected declaration or statement at end of input
src/ports/unix/unix_main.c: At top level:
src/ports/unix/unix_main.c:168: warning: unused variable ‘n’
src/ports/unix/unix_main.c:166: warning: unused variable ‘match’
make: *** [debug-darwin-i386/ufo/ports/unix/unix_main.c.o] Error 1

I guess there is something missing in my build environment. Here is what ./configure reports:
Code: [Select]
>./configure --disable-uforadiant
Found xvid.h
Found theora/theora.h
Found execinfo.h
Found bfd.h
Found sys/utsname.h
Could not find link.h
Found CUnit/Basic.h
Could not find mxml.h
Debug build
Compile for darwin
Compile for i386
Found cc cc
Found cxx c++
Using bindir /usr/local/bin
Using datadir /usr/local/games/ufoai
Using libdir /usr/local/lib
Using prefix /usr/local
Build modules:
Build cgame-multiplayer
Build cgame-skirmish
Build game
Build testall
Build ufo
Build ufo2map
Build ufoded
Build ufomodel
Disable uforadiant
Enable hard linked cgame
Setting custom data directory
Setting custom library directory

Two things were not found:
Code: [Select]
Could not find link.h
Could not find mxml.h
What libraries are needed for this two?