c-ares config test broken

Questions or HOWTOs about the above? Post 'em here...
Post Reply
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

c-ares config test broken

Post by Enigma »

I have c-ares on my system, and the configure script always fails to find it. After looking in config.log, I found the c-ares test in configure.ac fails because "NULL has not been defined." I just replaced NULL with 0. Maybe this is trying to compile a C program? Does C define NULL? I went straight to C++ and never learned C, so I don't know. I tried looking it up online and found one person defined NULL as (void*)0. I'm wondering if this is better than just 0. I guess it's not that important, but I thought I would let someone know.

Code: Select all

AC_TRY_LINK([#include <ares.h>
  void callback(void * /*arg*/, int /*callbackStatus*/,
                int /*timeouts*/, struct hostent * /*hostent*/) {}
    ], [
  ares_channel aresChannel;
  in_addr requestedAddress;
  
  ares_gethostbyaddr(aresChannel, &requestedAddress,
		     sizeof(in_addr), AF_INET, callback, NULL);
    ], [ares_works=yes], [ares_works=no])
I also had a lot of problems with ftgl. I don't want to go into all the details, but I eventually found out that version 2.1.2 and version 2.1.3 are significantly different. I had 2.1.2 installed, and bzflag uses 2.1.3. But I'm just rambling now.

NOTE: in the next paragraph, I am always referring to the ftgl library shipped with bzflag.

The real problem with ftgl is I get undefined freetype symbols when I use the freetype library installed on my system. There shouldn't be anything wrong with it. I installed it with macports. I'm wondering if the ftgl library shipped with bzflag is still trying to link with the freetype library shipped with bzflag even though it isn't being built. I haven't looked into it further, but I thought I'd mention it. If I force freetype to build, then everything works.

EDIT: When I built ftgl with macports, I never got undefined symbols, so my freetype library is fine. I don't have ftgl installed on my system anymore.
User avatar
Bullet Catcher
Captain
Captain
Posts: 564
Joined: Sat Dec 23, 2006 7:56 am
Location: Escondido, California

Re: c-ares config test broken

Post by Bullet Catcher »

The ares configure problem is fixed in Subversion revision 20163. Thanks for pointing it out.

For the freetype problem, if you'll provide the full path to the libfreetype.so library, the freetype.h header file, and the freetype-config script as installed on your system by macports I'll try to find a way to make it use them correctly.
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Re: c-ares config test broken

Post by Enigma »

The freetype libraries are in /opt/local/lib. The freetype-config script is in /opt/local/bin, which is in my PATH. The freetype.h header is in /opt/local/include/freetype2/freetype/.
Post Reply