Hi Doug,
Thanks much for the try. I followed your instructions (uninstalled NetCDF
and PDL, and installed them as you suggested; that part worked fine for
me), but the PDL::NetCDF build didn't work for me. I still get the same
error:

#     Error:  Can't load
'/Users/ssy/Downloads/PDL-NetCDF-4.19/blib/arch/auto/PDL/NetCDF/NetCDF.bundle'
for module PDL::NetCDF:
dlopen(/Users/ssy/Downloads/PDL-NetCDF-4.19/blib/arch/auto/PDL/NetCDF/NetCDF.bundle,
2): no suitable image found.  Did find:
# /Users/ssy/Downloads/PDL-NetCDF-4.19/blib/arch/auto/PDL/NetCDF/NetCDF.bundle:
mach-o, but wrong architecture at
/System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204.

I know nothing about bundles or why things are build as bundles. But I see
similar bundles in the PDL directory, e.g.:
/Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core/Core.bundle

Does your PDL installation look very different?

All the bundles that comes with the PDL installation seems to have 2
architectures, e.g.:
/Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Core> file
Core.bundle
Core.bundle: Mach-O universal binary with 2 architectures
Core.bundle (for architecture i386): Mach-O bundle i386
Core.bundle (for architecture x86_64): Mach-O 64-bit bundle x86_64

or

/Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/Bad> file Bad.bundle
Bad.bundle: Mach-O universal binary with 2 architectures
Bad.bundle (for architecture i386): Mach-O bundle i386
Bad.bundle (for architecture x86_64): Mach-O 64-bit bundle x86_64

etc.

But for the NetCDF (if I ignore the error and install it anyways) there is
only one architecture:
/Library/Perl/5.12/darwin-thread-multi-2level/auto/PDL/NetCDF> file
NetCDF.bundle
NetCDF.bundle: Mach-O 64-bit bundle x86_64

I wonder how these things look on your iMac.
-Stig






On Mon, Oct 21, 2013 at 12:00 AM, Douglas Hunt <[email protected]> wrote:

> Hi Stig:  It seems like you are installing a PDL::NetCDF bundle?  I don't
> know much about this.  It might be better to try to uninstall all traces of
> PDL::NetCDF (probably just find a directory under PERL5LIB under
> 'PDL'--just delete the whole NetCDF directory.  Then install the latest
> version of PDL::NetCDF.tar.gz by hand.
>
> I just tried this on my macOS 10.8.5 machine at home and it worked:
>
> Using the system perl, type:
>
> sudo cpan
> # answer a few questions with default answers and wait
> cpan> install PDL
> # wait for a long time while it compiles PDL and a bunch of dependencies
> cpan> quit
> # Download  netcdf-4.3.0.tar.gz
> tar -xvzf  netcdf-4.3.0.tar.gz
> cd netcdf-4.3.0
> ./configure --disable-netcdf-4 # I don't want to hassle with HDF
> make
> make check
> sudo make install
> # Download PDL-NetCDF-4.19.tar.gz
> tar -xvzf PDL-NetCDF-4.19.tar.gz
> cd PDL-NetCDF-4.19
> export NETCDF_LIBDIR=/usr/local/lib  # this is where the netcdf default
> install is
> export NETCDF_INCDIR=/usr/local/**include
> export ARCHFLAGS='-arch x86_64'
> perl Makefile.PL
> make
> make test
> sudo make install
>
> This process seems to work on my recent iMac.
>
> Hope this helps,
>
>   Doug
>
>
>
> On Sun, 20 Oct 2013, Stig Syndergaard wrote:
>
>  Hi,
>> I found out that if I set the ARCHFLAGS environment variable to  '-arch
>> x86_64', then perl Makefile.PL and make seems
>> to get through without errors (still warnings though). But now I get this
>> error on make test:
>> #     Error:  Can't load '/Users/ssy/Downloads/PDL-**
>> NetCDF-4.19/blib/arch/auto/**PDL/NetCDF/NetCDF.bundle' for module
>> PDL::NetCDF: 
>> dlopen(/Users/ssy/Downloads/**PDL-NetCDF-4.19/blib/arch/**auto/PDL/NetCDF/NetCDF.bundle,
>> 2): no suitable image
>> found.  Did find:
>> # 
>> /Users/ssy/Downloads/PDL-**NetCDF-4.19/blib/arch/auto/**PDL/NetCDF/NetCDF.bundle:
>> mach-o, but wrong architecture at
>> /System/Library/Perl/5.12/**darwin-thread-multi-2level/**DynaLoader.pm
>> line 204.
>>
>> There is a lot of those on the net in different forums, but I haven't
>> been able to solve my problem.
>>
>> I checked the architecture.
>> file 
>> /Users/ssy/Downloads/PDL-**NetCDF-4.19/blib/arch/auto/**PDL/NetCDF/NetCDF.bundle
>> gives:
>>
>> /Users/ssy/Downloads/PDL-**NetCDF-4.19/blib/arch/auto/**PDL/NetCDF/NetCDF.bundle:
>> Mach-O 64-bit bundle x86_64
>>
>> Not sure if that is the way it should be. Other bundles in my perl
>> distribution has both architectures.
>>
>> If I don't set ARCHFLAGS to '-arch x86_64', then compilation is with both
>> i386 and x86_64,
>> and 
>> /Users/ssy/Downloads/PDL-**NetCDF-4.19/blib/arch/auto/**PDL/NetCDF/NetCDF.bundle
>> then becomes both i386 and x86_64
>> architecture, but then I'm back to square one with the problems explained
>> before.
>>
>> Checking architecture of installed dependencies:
>>
>> /Users/ssy> which ncdump
>> /opt/local/bin/ncdump
>> /Users/ssy> file /opt/local/bin/ncdump
>> /opt/local/bin/ncdump: Mach-O 64-bit executable x86_64
>> /Users/ssy> which pdl
>> /usr/local/bin/pdl
>> /Users/ssy> file /usr/local/bin/pdl
>> /usr/local/bin/pdl: Mach-O 64-bit executable x86_64
>> /Users/ssy> which perl
>> /usr/bin/perl
>> /Users/ssy> file /usr/bin/perl
>> /usr/bin/perl: Mach-O universal binary with 2 architectures
>> /usr/bin/perl (for architecture i386): Mach-O executable i386
>> /usr/bin/perl (for architecture x86_64): Mach-O 64-bit executable x86_64
>>
>> Any ideas anyone?
>>
>> -Stig
>>
>>
>> On Mon, Oct 14, 2013 at 5:49 PM, Doug Hunt <[email protected]> wrote:
>>       Thanks, Craig!
>>
>>       --Doug
>>
>>       [email protected]
>>       Software Engineer
>>       UCAR - COSMIC, Tel. (303) 497-2611
>>
>>       On Sun, 13 Oct 2013, Craig DeForest wrote:
>>
>>             I'm on it -- but I just triggered an update of my macports
>> tree, so it'll be tomorrow (it'll
>>             probably run all night tonight).
>>
>>
>>
>>             On Oct 13, 2013, at 9:05 PM, Douglas Hunt <[email protected]>
>> wrote:
>>
>>                   Hi Stig:  Sorry to hear PDL::NetCDF is misbehaving for
>> you.  I'm forwarding this to
>>                   the PDL list, where there are many kind people who run
>> PDL on Macs.  Perhaps they
>>                   can help.  I've only been using Linux, and these errors
>> don't look familiar to me.
>>
>>                   The floods were quite dramatic, but things are getting
>> back to normal. We were very
>>                   lucky to not have had more than the handful of deaths
>> that we did.  My house was
>>                   never in danger and the worst we've had is the
>> inconveniece of water being cut off
>>                   for a while.  My mom lives in Estes Park, a mountain
>> town hard hit by the flood,
>>                   she is staying with us while sewer service is
>> restored--perhaps several months.
>>
>>                   Best Regards to you and Andrea,
>>
>>                    Doug
>>
>>                   ---------- Forwarded message ----------
>>                   Date: Sun, 13 Oct 2013 18:06:28 +0200
>>                   From: Stig Syndergaard <[email protected]>
>>                   To: [email protected]
>>                   Subject: PDL::NETCDF
>>
>>                   Hi Doug,
>>                   I'm trying to install your PDL::NETCDF module on my
>> Mac. I had it running and
>>                   working well for years, but then my Mac
>>                   got stolen last April, and I got a new one (now running
>> OS X 10.8.4). I had a
>>                   backup, so I got all my old stuff back on
>>                   to the new Mac, but now the PDL::NETCDF is not working
>> anymore :-(
>>
>>                   I've tried many things, installed new NetCDF library
>> (4.2.1.1), new PDL (2.007),
>>                   and downloaded
>>                   PDL-NetCDF-4.19. But I can't make the PDL::NETCDF
>> compile right. I've tried almost
>>                   everything, including changing
>>                   Makefile.PL files to make them look for files in the
>> right paths, but nothing seems
>>                   to help much. It may be the
>>                   architecture, but I'm not sure. I get many warnings and
>> errors. One of them (when
>>                   running make) says:
>>
>>                   ld: warning: ignoring file NetCDF.o, file was built for
>> unsupported file format (
>>                   0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x
>>                   1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is
>> not the architecture being
>>                   linked (i386): NetCDF.o
>>
>>                   which made me think that it is related to the 32 vs 64
>> bit architecture, but I
>>                   really don't know much about these
>>                   things. And I don't know it this warning is important.
>>
>>                   Another one (when running make test) is:
>>
>>                   #     Error:  Can't find 'boot_PDL__NetCDF' symbol in
>>                   /Users/ssy/Downloads/PDL-**NetCDF-4.19/blib/arch/auto/*
>> *PDL/NetCDF/NetCDF.bundle
>>
>>                   which is also the error I get if I ignore everything
>> and install anyways and try
>>                   use the module by running one of my
>>                   scripts:
>>
>>                   Can't find 'boot_PDL__NetCDF' symbol in
>>                   /Library/Perl/5.12/darwin-**
>> thread-multi-2level/auto/PDL/**NetCDF/NetCDF.bundle
>>
>>                   Have you seen anything like these errors/warnings
>> before? Any ideas what I can do?
>>
>>                   Hope you are doing good in Boulder after all the
>> flooding you had. We read and
>>                   heard a lot about it here, and were
>>                   thinking about you all.
>>
>>                   Best regards,
>>                   -Stig
>>                   ______________________________**_________________
>>                   Perldl mailing list
>>                   [email protected]
>>                   http://mailman.jach.hawaii.**
>> edu/mailman/listinfo/perldl<http://mailman.jach.hawaii.edu/mailman/listinfo/perldl>
>>
>>
>>
>>
>>
>>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to