Page 1 of 1

Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T07:39:18-07:00
by beausoleil
I'm trying to convert some old Kodak .fpx files to jpeg, but I'm having trouble installing the libfpx library. I downloaded libfpx-1.3.0.tar.gz from the downloads/delegates directory, and thought it compiled and installed correctly, but convert will still error out, saying the delegate doesn't exist for .fpx.

My system is 64-bit Ubuntu 11.04, and I've installed the developers libraries. I thought ./configure ran fine, but checking config.log shows:

Code: Select all

gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
configure:3401: $? = 0
configure:3390: gcc -V >&5
gcc: '-V' option must have argument
configure:3401: $? = 1
configure:3390: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
Then this error:

Code: Select all

configure:4060: checking for gcc option to accept ISO C99
configure:4209: gcc  -c -g -O2 -D_UNIX  conftest.c >&5
conftest.c:61:29: error: expected ';', ',' or ')' before 'text'
conftest.c: In function 'main':
conftest.c:115:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar'
conftest.c:115:18: error: 'newvar' undeclared (first use in this function)
conftest.c:115:18: note: each undeclared identifier is reported only once for each function it appears in
conftest.c:125:3: error: 'for' loop initial declarations are only allowed in C99 mode
conftest.c:125:3: note: use option -std=c99 or -std=gnu99 to compile your code
configure:4209: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libfpx"
| #define PACKAGE_TARNAME "libfpx"
| #define PACKAGE_VERSION "1.3.0"
| #define PACKAGE_STRING "libfpx 1.3.0"
| #define PACKAGE_BUGREPORT "http://www.imagemagick.org"
| #define PACKAGE_URL ""
| #define PACKAGE "libfpx"
| #define VERSION "1.3.0"
| /* end confdefs.h.  */
| #include <stdarg.h>
| #include <stdbool.h>
| #include <stdlib.h>
| #include <wchar.h>
| #include <stdio.h>
| 
| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
| #define debug(...) fprintf (stderr, __VA_ARGS__)
| #define showlist(...) puts (#__VA_ARGS__)
| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
| static void
| test_varargs_macros (void)
| {
|   int x = 1234;
|   int y = 5678;
|   debug ("Flag");
|   debug ("X = %d\n", x);
|   showlist (The first, second, and third items.);
|   report (x>y, "x is %d but y is %d", x, y);
| }
| 
| // Check long long types.
| #define BIG64 18446744073709551615ull
| #define BIG32 4294967295ul
| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
| #if !BIG_OK
|   your preprocessor is broken;
| #endif
| #if BIG_OK
| #else
|   your preprocessor is broken;
| #endif
| static long long int bignum = -9223372036854775807LL;
| static unsigned long long int ubignum = BIG64;
| 
| struct incomplete_array
| {
|   int datasize;
|   double data[];
| };
| 
| struct named_init {
|   int number;
|   const wchar_t *name;
|   double average;
| };
| 
| typedef const char *ccp;
| 
| static inline int
| test_restrict (ccp restrict text)
| {
|   // See if C++-style comments work.
|   // Iterate through items via the restricted pointer.
|   // Also check for declarations in for loops.
|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
|     continue;
|   return 0;
| }
| 
| // Check varargs and va_copy.
| static void
| test_varargs (const char *format, ...)
| {
|   va_list args;
|   va_start (args, format);
|   va_list args_copy;
|   va_copy (args_copy, args);
| 
|   const char *str;
|   int number;
|   float fnumber;
| 
|   while (*format)
|     {
|       switch (*format++)
| 	{
| 	case 's': // string
| 	  str = va_arg (args_copy, const char *);
| 	  break;
| 	case 'd': // int
| 	  number = va_arg (args_copy, int);
| 	  break;
| 	case 'f': // float
| 	  fnumber = va_arg (args_copy, double);
| 	  break;
| 	default:
| 	  break;
| 	}
|     }
|   va_end (args_copy);
|   va_end (args);
| }
| 
| int
| main ()
| {
| 
|   // Check bool.
|   _Bool success = false;
| 
|   // Check restrict.
|   if (test_restrict ("String literal") == 0)
|     success = true;
|   char *restrict newvar = "Another string";
| 
|   // Check varargs.
|   test_varargs ("s, d' f .", "string", 65, 34.234);
|   test_varargs_macros ();
| 
|   // Check flexible array members.
|   struct incomplete_array *ia =
|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
|   ia->datasize = 10;
|   for (int i = 0; i < ia->datasize; ++i)
|     ia->data[i] = i * 1.234;
| 
|   // Check named initializers.
|   struct named_init ni = {
|     .number = 34,
|     .name = L"Test wide string",
|     .average = 543.34343,
|   };
| 
|   ni.number = 58;
| 
|   int dynamic_array[ni.number];
|   dynamic_array[ni.number - 1] = 543;
| 
|   // work around unused variable warnings
|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
| 	  || dynamic_array[ni.number - 1] != 543);
| 
|   ;
|   return 0;
| }
Do I have to edit the ./configure script for my specific system?

Re: Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T09:12:54-07:00
by fmw42
Did you reinstall IM after installing the delegate?

Re: Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T09:26:03-07:00
by beausoleil
fmw42 wrote:Did you reinstall IM after installing the delegate?
Yes - same error...

It's been years since I've done any coding, but I normally don't have any trouble running ./configure, make, and sudo make install. I'm probably missing an environment variable...

Re: Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T09:27:58-07:00
by fmw42
Is it possible you have more than one IM installed? type

which convert

see if it lists more than one

Re: Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T11:21:52-07:00
by beausoleil
fmw42 wrote:Is it possible you have more than one IM installed? type

which convert

see if it lists more than one
just one: /usr/bin/convert

xxxx@bigmax:~/Downloads/imagemagick/libfpx-1.3.0$ convert -version
Version: ImageMagick 6.6.2-6 2011-03-16 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

What's the order in which I should do things? I had ImageMagick already installed. I downloaded libfpx, ran ./configure, make and sudo make install. I got all the original errors, then realized I needed the IM developer files, so I installed them via Ubuntu's Software Center. I then re-ran configure, make and sudo make install. Then I removed ImageMagick and re-installed it using Ubuntu's Software Center.

Re: Installing delegates (libfpx) on Ubuntu 11.04

Posted: 2011-06-20T12:48:24-07:00
by fmw42
The way I do it is to install all delegates, then install IM (./configure ..., make, sudo make install). See http://www.imagemagick.org/download/www ... .html#unix and http://www.imagemagick.org/script/advan ... lation.php