Ticket #33912 (closed defect: fixed)
libdv fails to build as +sdl on Leopard
| Reported by: | jeremyhu@… | Owned by: | filippo.natali@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.4 |
| Keywords: | Leopard | Cc: | |
| Port: | libsdl libdv |
Description
libdv stalls out in the conftest immediately after the sdl-config check. This is because SDL's main spins due to bad error checking. Note that SDL.h renames our main() to SDL_main().
libdv/work/libdv-1.0.0 $ tail config.log configure:20369: result: /opt/local/bin/sdl-config configure:20378: checking for SDL - version >= 1.1.6 configure:20475: /usr/bin/gcc-4.0 -o conftest -pipe -g3 -arch x86_64 -arch i386 -arch ppc -Wall -g -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include -L/opt/local/lib -flat_namespace -undefined suppress -arch x86_64 -arch i386 -arch ppc conftest.c -L/opt/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa >&5 configure:20478: $? = 0 configure:20484: ./conftest _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. 2012-04-05 21:50:23.927 conftest[11496:10b] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x210b, name = 'WakeUpProcessPort' See /usr/include/servers/bootstrap_defs.h for the error codes. 2012-04-05 21:50:23.962 conftest[11496:10b] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x2907, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes.
libdv/work/libdv-1.0.0 $ cat conftest.c
/* confdefs.h. */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "libdv"
#define VERSION "1.0.0"
#define _GNU_SOURCE 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define DEBUG 1
/* end confdefs.h. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("1.1.6");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
printf("%s, bad version string\n", "1.1.6");
exit(1);
}
if ((1 > major) ||
((1 == major) && (2 > minor)) ||
((1 == major) && (2 == minor) && (15 >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", 1, 2, 15);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
Change History
Note: See
TracTickets for help on using
tickets.

