[gdal-dev] Enabling DAP appears to disable several other formats
Etienne Tourigny
etourigny.dev at gmail.com
Fri Apr 20 13:08:12 EDT 2012
can you please update the relevant wiki page? All you need is an osgeo id
http://trac.osgeo.org/gdal/wiki/BuildingOnMac
Etienne
On Fri, Apr 20, 2012 at 1:51 PM, Charlie Sharpsteen
<chuck at sharpsteen.net> wrote:
> On Thu, Apr 19, 2012 at 6:48 PM, Charlie Sharpsteen <chuck at sharpsteen.net>
> wrote:
>>
>> On Thu, Apr 19, 2012 at 6:40 PM, Frank Warmerdam <warmerdam at pobox.com>
>> wrote:
>>>
>>> Charlie,
>>>
>>> The typical reason would be that adding opendap adds stuff into the
>>> libraries list that results in other "test links" failing. It would
>>> be helpful if you could file a bug and attach the config.log.
>>>
>>> Best regards,
>>> Frank
>>
>>
>> I looked through the config.log a little closer, and in all four cases the
>> following argument was added to the compiler flags:
>>
>> -arch x86_64 i386 ppc
>>
>> This is bad for two reasons:
>>
>> - I'm not trying to build a universal binary and all of my components
>> are x86_64 only.
>>
>> - `-arch x86_64 i386 ppc` isn't even a valid compiler flag. The proper
>> thing to pass would be `-arch x86_64 -arch i386 -arch ppc`, so the compiler
>> would error out even if I had the universal binaries to support a 3-way
>> build.
>>
>> I've traced the offending flags to `dap-config` so it looks like this is
>> an OpenDAP bug now, not a GDAL bug.
>>
>> Apologies for the noise.
>>
>>
>> -Charlie
>
>
>
> A final followup on this situation for anyone else who is trying to build
> GDAL with libdap support on OS X.
>
> The root cause of the problem came down to bad pkg-config files shipped with
> OS X 10.6 and 10.5. When libdap builds, information on curl is requested
> from `pkg-config` using the following:
>
> pkg-config --static --libs libcurl
>
>
> On Snow Leopard, the default `libcurl.pc` file will return the following in
> answer to the above query:
>
> -Wl,-weak-lldap -dynamic -arch x86_64 i386 ppc -Os -pipe -g0
> -Wno-system-headers -Wl,-search_paths_first -Wl,-weak-lgssapi_krb5
> -Wl,-weak-lkrb5 -Wl,-weak-lk5crypto -Wl,-weak-lcom_err -Wl,-weak-lresolv
> -lcurl -lssl -lcrypto -lz
>
>
> As you can see, this contains the string `-arch x86_64 i386 ppc` which is
> both troublesome (forces universal binary builds when you don't want them)
> and illegal (each architecture _must_ be proceeded by a new -arch flag). The
> flags returned by `pkg-config` are also stored in the `dap-config` script
> and from there they contamination spreads to other packages like GDAL. The
> `libcurl.pc` file shipped with OS X 10.7 is much more sane and does not
> suffer from these problems.
>
>
> Solution:
>
> When configuring libdap on Leopard or Snow Leopard, always pass
> "--with-curl=/usr" if you want to build against the system curl. Providing
> information on curl will cause the configure script to avoid querying
> pkg-config and receiving bad flags.
>
>
> Hope this helps anyone else who runs into this problem!
>
> -Charlie
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list