Date: Thu, 26 Feb 2004 18:24:41 -0800 From: Marcel Moolenaar <marcel@xcllnt.net> To: Joe Marcus Clarke <marcus@marcuscom.com> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: gimp-2.0.pre3_1,1 broken on ia64 Message-ID: <20040227022441.GD66191@ns1.xcllnt.net> In-Reply-To: <1077822108.45850.2.camel@shumai.marcuscom.com> References: <20040226100851.GH94694@xor.obsecurity.org> <1077822108.45850.2.camel@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 26, 2004 at 02:01:48PM -0500, Joe Marcus Clarke wrote: > On Thu, 2004-02-26 at 05:08, Kris Kennaway wrote: > > http://bento.freebsd.org/errorlogs/ia64-5-latest/gimp-2.0.pre3_1,1.log > > > > Can you please investigate and/or report to the developers? > > This is another .keeper. We need to figure out why the libgimpprint > test is dumping core. The problem is quite generic and simple. Many configure tests are based on small and simple C programs. A lot of them don't bother to include header files or otehrwise provide prototypes. This is mostly harmless on most architectures, because automatic int to pointer conversion happens to end up with a valid pointer. On ia64 however this is never the case. The upper 3 bits of a 64-bit pointer is the region number, which on ia64 is never 0. Thus, automatic int to pointer conversion never yields a valid pointer. Now, back to gimp and gimp-print. The failing configure test is based on the attached C program. Notice the strdup()? See a prototype? So, when you compile and run this, you get: pluto1# cc -I/usr/local/include marcel.c -L/usr/local/lib -lgimpprint marcel.c: In function `main': marcel.c:70: warning: assignment makes pointer from integer without a cast pluto1# ./a.out Segmentation fault (core dumped) If you add a prototype before main for strdup() everything is dandy. FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="marcel.c" /* confdefs.h. */ #define PACKAGE_NAME "GIMP" #define PACKAGE_TARNAME "gimp" #define PACKAGE_VERSION "2.0pre3" #define PACKAGE_STRING "GIMP 2.0pre3" #define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=GIMP" #define GETTEXT_PACKAGE "gimp20" #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 #ifdef __cplusplus extern "C" void std::exit (int) throw (); using std::exit; #endif #define HAVE_DIRENT_H 1 #define STDC_HEADERS 1 #define HAVE_SYS_WAIT_H 1 #define TIME_WITH_SYS_TIME 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIMES_H 1 #define HAVE_SYS_WAIT_H 1 #define HAVE_UNISTD_H 1 #define RETSIGTYPE void #define HAVE_VPRINTF 1 #define HAVE_ALLOCA 1 #define HAVE_DIFFTIME 1 #define HAVE_PUTENV 1 #define HAVE_MMAP 1 #define HAVE_LOCALE_H 1 #define HAVE_LC_MESSAGES 1 #define HAVE_BIND_TEXTDOMAIN_CODESET 1 #define HAVE_GETTEXT 1 #define HAVE_DCGETTEXT 1 #define ENABLE_NLS 1 #define HAVE_BIND_TEXTDOMAIN_CODESET 1 #define HAVE_MATH_H 1 #define HAVE_IEEEFP_H 1 #define HAVE_FINITE 1 #define HAVE_RINT 1 #define HAVE_INET_NTOA 1 #define HAVE_IPC_H 1 #define HAVE_SHM_H 1 #define USE_SYSV_SHM 1 #define HAVE_PROGRESSIVE_JPEG 1 #define HAVE_EXIF 1 /* end confdefs.h. */ #include <gimp-print/gimp-print.h> #include <stdio.h> #include <stdlib.h> int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gimpprinttest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("4.2.0"); if (!tmp_version) { exit(1); } if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "4.2.0"); exit(1); } if ((gimpprint_major_version != 4) || (gimpprint_minor_version != 2) || (gimpprint_micro_version != 6)) { printf("\n*** 'gimpprint-config --version' returned %d.%d.%d, but GIMP-PRINT (%d.%d.%d)\n", 4, 2, 6, gimpprint_major_version, gimpprint_minor_version, gimpprint_micro_version); printf ("*** was found! If gimpprint-config was correct, then it is best\n"); printf ("*** to remove the old version of GIMP-PRINT. You may also be able to fix the\n"); printf("*** error by modifying your LD_LIBRARY_PATH enviroment variable, or by\n"); printf("*** editing /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gimpprint-config was wrong, set the environment variable GIMPPRINT_CONFIG\n"); printf("*** to point to the correct copy of gimpprint-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); } #if defined (GIMPPRINT_MAJOR_VERSION) && defined (GIMPPRINT_MINOR_VERSION) && defined (GIMPPRINT_MICRO_VERSION) else if ((gimpprint_major_version != GIMPPRINT_MAJOR_VERSION) || (gimpprint_minor_version != GIMPPRINT_MINOR_VERSION) || (gimpprint_micro_version != GIMPPRINT_MICRO_VERSION)) { printf("\n*** GIMP-PRINT header files (version %d.%d.%d) do not match\n", GIMPPRINT_MAJOR_VERSION, GIMPPRINT_MINOR_VERSION, GIMPPRINT_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gimpprint_major_version, gimpprint_minor_version, gimpprint_micro_version); } #endif /* defined (GIMPPRINT_MAJOR_VERSION) ... */ else { if ((gimpprint_major_version > major) || ((gimpprint_major_version == major) && (gimpprint_minor_version > minor)) || ((gimpprint_major_version == major) && (gimpprint_minor_version == minor) && (gimpprint_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GIMP-PRINT (%d.%d.%d) was found.\n", gimpprint_major_version, gimpprint_minor_version, gimpprint_micro_version); printf("*** You need a version of GIMP-PRINT newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GIMP-PRINT is always available from\n"); printf("*** http://sourceforge.net/project/showfiles.php?group_id=1537.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gimpprint-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GIMP-PRINT, but you can also set the GIMPPRINT_CONFIG environment to\n"); printf("*** point to the correct copy of gimpprint-config. (In this case, you will have\n"); printf("*** to modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } --/9DWx/yDrRhgMJTb--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040227022441.GD66191>