From: SourceForge.net <no...@so...> - 2005-05-19 01:38:41
|
Bugs item #1204625, was opened at 2005-05-19 00:18 Message generated for change (Settings changed) made by dsalt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1204625&group_id=9655 >Category: gxine Group: None Status: Open Resolution: Later Priority: 5 Submitted By: Niki W. Waibel (nikiwaibel) >Assigned to: Darren Salt (dsalt) Summary: gxine: fails to compile on solaris: asprintf() missing Initial Comment: version 0.4.4 of gxine compiles/runs fine on linux/x86 and linux/x86_64, but on solaris9/x86, solaris8/sparc and solaris9/sparc it fails: === post.o(.text+0x1d9c): In function `deinterlace_reconfigure': post.c: undefined reference to `asprintf' collect2: ld returned 1 exit status make[2]: *** [gxine] Error 1 make[2]: Leaving directory `/tmp/gxine-0.4.4/src' === looking for a workaround... ---------------------------------------------------------------------- Comment By: Darren Salt (dsalt) Date: 2005-05-19 02:35 Message: Logged In: YES user_id=294680 The library stuff is handled by AC_PATH_XTRA... It should be sufficient to append $(X_EXTRA_LIBS) to the gxine_LDFLAGS line in src/Makefile.am then to rebuild. ---------------------------------------------------------------------- Comment By: Niki W. Waibel (nikiwaibel) Date: 2005-05-19 01:57 Message: Logged In: YES user_id=1951 shitt, did not recogn g_strdup_printf... my quick fix was: === diff -r -u gxine-0.4.4.orig/src/post.c gxine-0.4.4/src/post.c --- gxine-0.4.4.orig/src/post.c 2005-03-17 01:55:23.000000000 +0100 +++ gxine-0.4.4/src/post.c 2005-05-19 02:24:54.396031600 +0200 @@ -998,6 +998,34 @@ return JS_TRUE; } +static int +my_vasprintf(char **ptr, const char *format, va_list ap) +{ + int ret; + + ret = vsnprintf(NULL, 0, format, ap); + if (ret <= 0) return ret; + + (*ptr) = (char *)malloc(ret+1); + if (!*ptr) return -1; + ret = vsnprintf(*ptr, ret+1, format, ap); + + return ret; +} + +static int +my_asprintf(char **ptr, const char *format, ...) +{ + va_list ap; + int ret; + + va_start(ap, format); + ret = my_vasprintf(ptr, format, ap); + va_end(ap); + + return ret; +} + static void deinterlace_reconfigure (gxine_post_t *info) { @@ -1006,7 +1034,11 @@ logprintf ("post_config: deinterlace configuration\n was: %s\n now: %s\n", info->parameters, params); free (info->parameters); +#if HAVE_ASPRINTF asprintf (&cfg, "tvtime:%s", info->parameters = params); +#else + my_asprintf (&cfg, "tvtime:%s", info->parameters = params); +#endif gtk_video_set_tvtime (GTK_VIDEO(gtv), cfg); if (xine_config_lookup_entry (xine, "gui.post_plugins.deinterlace", &entry)) { === your solution is def better. i've just seen another problem on solaris. bind() and connect() are in libsocket.so. as a workaround i set LIBS to -lsocket before i run configure. but that should be checked in configure! ---------------------------------------------------------------------- Comment By: Darren Salt (dsalt) Date: 2005-05-19 00:58 Message: Logged In: YES user_id=294680 $ sed -i -e 's/asprintf (&\([^,]*\), /\1 = g_strdup_printf (/' src/post.c This will be fixed in the next release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1204625&group_id=9655 |