project-navigation
Personal tools

Author Topic: Compiling on Catalina  (Read 9381 times)

Offline Greno Zee

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Compiling on Catalina
« on: April 18, 2020, 09:58:24 pm »
Hi, since the latest available Mac build contains the bug that prevents finishing missions when there are stunned aliens, I thought I'd try to make a build myself.
I have never made a build of anything that on a mac, on windows very few times about 25 years ago.

I'm on Catalina and there were few hick-ups when following the guide to the point but I was able to find solutions ore figure it out until now. I'd be grateful if anyone knows how I can solve the problems.
First, if I understand right Makefile.local is generated automatically during the execution of configure. This file contained this section, causing the build process to just say nothing to be done:
cgame-campaign_DISABLE ?= yes
cgame-multiplayer_DISABLE ?= yes
cgame-skirmish_DISABLE ?= yes
game_DISABLE ?= yes
memory_DISABLE ?= yes
testall_DISABLE ?= yes
ufo_DISABLE ?= yes
ufo2map_DISABLE ?= yes
ufoded_DISABLE ?= yes
ufomodel_DISABLE ?= yes
uforadiant_DISABLE ?= yes
ufoslicer_DISABLE ?= yes

I commented this out and managed to get moving. Wonder though why this happened, kind of throws an orange flag in my head.

So, I executed the make command. Got tons of warnings, lots of them regarding deprecated opengl calls and huge amount of these:
warning: unknown warning option '-Wimplicit-fallthrough=2'; did you mean '-Wimplicit-fallthrough'? [-Wunknown-warning-option]

But ok, I suppose warnings are not critical. But then the build process with this:
===> LD [testall]
ld: library not found for -llibcurl
clang: error: linker command failed with exit code 1 (use -v to see invocation)


I've been searching and searching but no idea what to do. I'd appreciate any help, thanks in advance.

Offline Greno Zee

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Re: Compiling on Catalina
« Reply #1 on: April 20, 2020, 12:05:20 am »
I think I finally figured out what to do. Will post a summary of all the steps that differed from the Wiki article later.

Now I ran into another issue:
src/tools/radiant/libs/gtkutil/window.h:25:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>


I have searched my system and found several gtk.h files. Two of them are in different versions of Mono, one here:
/opt/local/include/gtk-2.0/gtk

This should be the one the include statement gets resolved to, no?
Internet search provides several suggestions none of which I understand well enough to be able to proceed.

Again, any hints are much appreciated.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Compiling on Catalina
« Reply #2 on: April 21, 2020, 03:13:59 pm »
Hi,

The ./configure script might have disabled building of all game components if it found a dependency missing like curl. That can be the reason for the "nothing to do" part. Check your ./configure output closely (you can attach it here also if you need a second opinion.)

-Wimplicit-fallback: Probably GCC version difference. Older versions may not supported multiple warning levels?

-llibcurl: the linker could not find the shared object of curl to link. You can try the --with-embedded-libcurl configure option or ensure that your system curl is properly installed and found.

gtk: /opt/local/include may not be in the default include search directories. You may need to adjust that. Please also note that gtk is only needed for the Map Editor which you can disable via configure script --disable-uforadiant


I hope this helped.

-geever

Offline Greno Zee

  • Cannon Fodder
  • **
  • Posts: 5
    • View Profile
Re: Compiling on Catalina
« Reply #3 on: April 22, 2020, 11:52:25 pm »
Thanks a lot, that was indeed a great help.
First, regarding the issue with -llibcurl. I looked up on the net that referring to libcurl actually results in liblibcurl. So I modified build/default.mk like this:
3 CURL_LIBS                ?= $(call PKG_LIBS,curl)
4 CURL_CFLAGS              ?= $(call PKG_CFLAGS,curl)

This seems to have resolved the problem.

So I ran the ./configure again and indeed there were number of libraries reported as missing. I noticed the following:
  • header files reported as missing were located in /opt/local/include
  • those it could find are in one or both of /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include or /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include

So, one more time, would anyone know how I can tell the linker to look in /opt/local/include as well?