I am forwarding this to the mingw-w64 mailing list as well.
2011/4/19 Ralf Tautenhahn <[email protected]>
> Hi Ruben,
>
> I hope it is okay that I contact you out of the blue.
>
No problem :)
>
> I am trying to build libnetcdf3.6.3 with MSYS/mingw-w64(Rtools). I got
> stuck with libtool errors during make and
> doing some google'ing I saw your email, that seems to be related to my
> problems (see below).
>
> I am curious: Did you figure it out ?
>
Well, this is what *builds* netcdf-3.6.3 for me:
1) add #include "nc.h" to libsrc/v2i.c
2) ../netcdf-3.6.3/configure --host=x86_64-w64-mingw32
--build=x86_64-w64-mingw32
"make check" fails horribly with
/bin/sh ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -g -O2
> -L../libsrc -o nctest.exe add.o atttests.o cdftests.o dimtests.o driver.o
> emalloc.o error.o misctest.o rec.o slabs.o val.o vardef.o varget.o vargetg.o
> varput.o varputg.o vartests.o vputget.o vputgetg.o -lm ../libsrc/
> libnetcdf.la
>
libtool: link: x86_64-w64-mingw32-gcc -g -O2 -o nctest.exe add.o atttests.o
> cdftests.o dimtests.o driver.o emalloc.o error.o misctest.o rec.o slabs.o
> val.o vardef.o varget.o vargetg.o varput.o varputg.o vartests.o vputget.o
> vputgetg.o -L/home/Ruben/netcdf-build/libsrc ../libsrc/.libs/libnetcdf.a
>
atttests.o: In function `test_ncattput':
>
M:\Development\msys\home\Ruben\netcdf-build\nctest/../../netcdf-3.6.3/nctest/atttests.c:81:
> undefined reference to `ncopen'
>
and lots more undefined references. Even if I force netcdf to be a static
lib. I don't know why. Please test your application with the produced
library thoroughly, I'd make no guarantees it works without more patching. I
also suggest you use the a later release of netcdf if possible, that works
better (see my old email you found). Netcdf devs did contact me to test the
new version 4, but didn't get around to it because of extra dependencies
(curl etc.). I'll check if a current snapshot still has any problems.
Ruben
>
> Thanks !
> Ralf.
>
> libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I..
> -I../fortran -g -O2 -MT posixio.lo -MD -MP -MF
> .deps/posixio.Tpo -c posixio.c -o posixio.o
> /bin/sh ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -g -O2
> -version-info 4:0:0 -o libnetcdf.la
> -rpath /usr/local/lib attr.lo ncx.lo putget.lo dim.lo error.lo libvers.lo
> nc.lo string.lo v1hpg.lo var.lo utf8pr
> oc.lo posixio.lo
> libtool_args+=: not found
> compile_command+=: not found
> finalize_command+=: not found
> libtool_args+=: not found
> compile_command+=: not found
> finalize_command+=: not found
> libtool_args+=: not found
> libtool_args+=: not found
> libtool_args+=: not found
> ...
>
>
>
> Hi,
>>
>> I have recently tried to compile netCDF 4.1.1 with the mingw-w64
>> toolchain from mingw-w64.sourceforge.net. This is a 32 and/or 64-bit
>> GCC toolchain for Windows.
>>
>> I ran the compilation from MSYS to run the configure and make commands.
>>
>> > configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32
>> > make
>> > make test
>>
>> Some remarks/bugs:
>> 1. the --build option is needed, because MSYS is detected as
>> "i686-pc-msys" and thus cross-compilation is "invoked", which tried
>> the command "link" as linker, but this is incorrect: link is a tool
>> provided by MSYS, and "ld" or "nm" should be used for this purpose.
>> This is a bug in the configure script.
>> 2. the file v2i.c in libsrc is missing a #include "nc.h" for the
>> definition of struct NC for line 39. Adding this include at line 12
>> let compilation complete.
>> 3. make test produces three failures, log is zipped and attached.
>> Comments:
>> - tst_output.sh: failure due to line endings see log)
>> - tst_calendars.sh: genuine failure
>> - tst_nccopy3.sh: failure due to mismatch output from msvcrt's printf
>> function. Number is correct, just printed differently.
>>
>> Thanks for any response to this!
>>
>> Ruben Van Boxem
>>
>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public