#28 Problems configuring GDL with LIBPROJ4

closed
nobody
5
2009-02-21
2009-01-28
Anonymous
No

I'm trying to run the configure script for GDL 0.9rc2 (and have also tried 0.9rc1) with the following options:

--with-fftw=/usr/lib --with-libproj4=/usr/local/libproj4

The configure script is able to find my fftw3 library, however, it bombs when trying to locate my libproj4 library. I downloaded and installed the libproj4 library into the following directory

/usr/local/libproj4

the libproj4 install command created three subdir's of bin, include, and lib. The libproj4.a file went into the lib subdir, the lproj file executable went into the bin dir, and the header file went into the include subdir. SO...I think I'm fine there right?

root@eylandej-desktop:/usr/local/libproj4# ls -al
total 4
drwxrwxrwx 5 root root 40 2009-01-23 17:13 .
drwxr-xr-x 14 root root 4096 2009-01-27 21:26 ..
drwxr-xr-x 2 root root 31 2009-01-27 21:29 bin
drwxr-xr-x 2 root root 23 2009-01-27 21:29 include
drwxr-xr-x 2 root root 48 2009-01-27 21:29 lib

However, the GDL compile script kicks back the following error:
checking for nc_open in -lnetcdf... yes
checking for Hopen in -ldf... yes
checking for SDstart in -lmfhdf... yes
checking for H5Fopen in -lhdf5... yes
checking for fftw_malloc in -lfftw3... yes
checking for fftwf_malloc in -lfftw3f... yes
checking for pj_init in -lproj4... no

Error! LIBPROJ4 is required but was not found
Use --with-libproj4=DIR to specify the LIBPROJ4 directory tree
Use --with-libproj4=no to not use it
Check the README or use configure --help for other libraries needed
(--with-xxxdir = obligatory, --with-xxx = optional (--with-xxx=no to disable))

I've tried everything I can think of, including changing file permissions, etc. Any idea why the configure script won't recognize my libproj4? Thanks in advance!!

John

Discussion

  • John Burton
    John Burton
    2009-01-29

    libproj4 made a "namespace" change with it's most recent releases - I'm not sure when it was made. The simple fact was that it changed a "PJ_" prefix to "PROJ_" prefix in many of it's routine names and typedefs. The reason the configure script is failing is that it is looking for "PJ_init()" and cannot find it. What is supplied by libproj4 is "PROJ_init()". Unfortunately changing the configure script does not fix the problem - there are a lot of references to "PJ_something" in several files, along with references to "LP" and "XY" which are now "PROJ_LP" and "PROJ_XY". I had numerous problems trying to get gdl to compile under Fedora 10 (libproj4 was only one of several), and finally gave up...

    John

     
  • Joel Gales
    Joel Gales
    2009-01-31

    What do you gen when you type:

    ar t /usr/local/libproj4/libproj4.a

    Joel

     
  • Joel Gales
    Joel Gales
    2009-01-31

    Sorry. I didn't see your comment of 2009-01-29 13:31. I'll download the latest libproj4 library and fix the calls in GDL.

    Joel

     
  • John, thanks for that info. I'll compile without libproj4 for now and await an update hopefully?

     
  • Joel Gales
    Joel Gales
    2009-02-21

    Fixed in CVS. The configure file determines whether the old or new libproj4 library is present and defines the proper parameters.

    Joel

     
  • Joel Gales
    Joel Gales
    2009-02-21

    • status: open --> closed