conda-forge / pynio-feedstock

A conda-smithy repository for pynio.
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

Pin g2clib #14

Closed ocefpaf closed 8 years ago

ocefpaf commented 8 years ago

I could not get pynio to work with the latest g2clib 1.6.0, so I am pinning it here to the 1.5.* version.

See https://github.com/conda-forge/g2clib-feedstock/pull/9

conda-forge-linter commented 8 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

david-ian-brown commented 8 years ago

Hi Filipe, FYI, PyNIO uses a modified version of the g2clib. I am not sure what kind of error you encountered but I would be interested to know. -dave

On Mon, Aug 8, 2016 at 3:03 PM, Filipe notifications@github.com wrote:

Merged #14 https://github.com/conda-forge/pynio-feedstock/pull/14.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/conda-forge/pynio-feedstock/pull/14#event-749007244, or mute the thread https://github.com/notifications/unsubscribe-auth/AB7VbXznzvLvBsrZ0ozCc7VEEEsS-owJks5qd5mIgaJpZM4JfdHX .

ocefpaf commented 8 years ago

FYI, PyNIO uses a modified version of the g2clib.

Interesting. Is that bundled in the code? I packages this before and version g2clib 1.5.0 worked fine, but version 1.6.0 fails with:

g++ -pthread -shared -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Wl,-rpath=/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib,--no-as-needed -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -D_BSD_SOURCE -D_XOPEN_SOURCE -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include build/temp.linux-x86_64-2.7/niomodule.o  -Llibsrc -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Lbuild/temp.linux-x86_64-2.7 -lnio -ljpeg -lpng -lz -lnetcdf -lmfhdf -ldf -lhdf5_hl -lhdf5 -lcurl -lhdfeos -lGctp -lgrib2c -ljasper -ljpeg -lpng -lhdf5_hl -lhdf5 -lhe5_hdfeos -lGctp -lgdal -lproj -liconv -ljasper -ljpeg -lpng -lz -lgfortran -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/PyNIO/nio.so
/opt/rh/devtoolset-2/root/usr/bin/ld: cannot find -lgrib2c
collect2: error: ld returned 1 exit status
/opt/rh/devtoolset-2/root/usr/bin/ld: cannot find -lgrib2c
collect2: error: ld returned 1 exit status
error: Command "g++ -pthread -shared -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Wl,-rpath=/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib,--no-as-needed -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -D_BSD_SOURCE -D_XOPEN_SOURCE -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include build/temp.linux-x86_64-2.7/niomodule.o  -Llibsrc -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Lbuild/temp.linux-x86_64-2.7 -lnio -ljpeg -lpng -lz -lnetcdf -lmfhdf -ldf -lhdf5_hl -lhdf5 -lcurl -lhdfeos -lGctp -lgrib2c -ljasper -ljpeg -lpng -lhdf5_hl -lhdf5 -lhe5_hdfeos -lGctp -lgdal -lproj -liconv -ljasper -ljpeg -lpng -lz -lgfortran -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/PyNIO/nio.so" failed with exit status 1
Command failed: /bin/bash -x -e /opt/conda/conda-bld/work/pynio-1.5.0_beta20160623/conda_build.sh

I did not that the static library name changed from libgrib2c.a to libg2c_v1.6.0.a, but I did not dig into this and decided that pinning was the way to go for now.

david-ian-brown commented 8 years ago

Yes, the library name changed in the NCEP-provided Makefile for 1.6.0. I changed it back to the old name in our version of the library. Basically, the version we use allows for more flexibility in the sign of longitudes in the GRIB records. WMO says that for GRIB2 longitudes should always be positive, but some people still put in negative longitudes so we try to handle them. It should still build without our changes though and the library name change is probably the culprit. -dave

On Mon, Aug 8, 2016 at 6:45 PM, Filipe notifications@github.com wrote:

FYI, PyNIO uses a modified version of the g2clib.

Interesting. Is that bundled in the code? I packages this https://github.com/conda-forge/g2clib-feedstock before and version g2clib 1.5.0 worked fine, but version 1.6.0 fails with:

g++ -pthread -shared -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Wl,-rpath=/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib,--no-as-needed -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -D_BSD_SOURCE -D_XOPEN_SOURCE -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include build/temp.linux-x86_64-2.7/niomodule.o -Llibsrc -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Lbuild/temp.linux-x86_64-2.7 -lnio -ljpeg -lpng -lz -lnetcdf -lmfhdf -ldf -lhdf5_hl -lhdf5 -lcurl -lhdfeos -lGctp -lgrib2c -ljasper -ljpeg -lpng -lhdf5_hl -lhdf5 -lhe5_hdfeos -lGctp -lgdal -lproj -liconv -ljasper -ljpeg -lpng -lz -lgfortran -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/PyNIO/nio.so /opt/rh/devtoolset-2/root/usr/bin/ld: cannot find -lgrib2c collect2: error: ld returned 1 exit status /opt/rh/devtoolset-2/root/usr/bin/ld: cannot find -lgrib2c collect2: error: ld returned 1 exit status error: Command "g++ -pthread -shared -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Wl,-rpath=/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib,--no-as-needed -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -D_BSD_SOURCE -D_XOPEN_SOURCE -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include -I/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/include build/temp.linux-x86_64-2.7/niomodule.o -Llibsrc -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -L/opt/conda/envs/_build_placehold_placehold_placehold_placehold_placehold_placeho/lib -Lbuild/temp.linux-x86_64-2.7 -lnio -ljpeg -lpng -lz -lnetcdf -lmfhdf -ldf -lhdf5_hl -lhdf5 -lcurl -lhdfeos -lGctp -lgrib2c -ljasper -ljpeg -lpng -lhdf5_hl -lhdf5 -lhe5_hdfeos -lGctp -lgdal -lproj -liconv -ljasper -ljpeg -lpng -lz -lgfortran -lgfortran -lpython2.7 -o build/lib.linux-x86_64-2.7/PyNIO/nio.so" failed with exit status 1 Command failed: /bin/bash -x -e /opt/conda/conda-bld/work/pynio-1.5.0_beta20160623/conda_build.sh

I did not that the static library name changed from libgrib2c.a to libg2c_v1.6.0.a, but I did not dig into this and decided that pinning was the way to go for now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/conda-forge/pynio-feedstock/pull/14#issuecomment-238421197, or mute the thread https://github.com/notifications/unsubscribe-auth/AB7VbT0C8FRSDxLlyFxJFNG2TT3BpPcJks5qd82MgaJpZM4JfdHX .

ocefpaf commented 8 years ago

Good to know. Since pynio is the only package using g2clib I can either rename it there or I can make a copy with the old name as a workaround. Although, ideally we should preserve the original name and patch pynio to find it.

david-ian-brown commented 8 years ago

We could probably do the source code changes to be more forgiving about longitudes as a patch as well.

ocefpaf commented 8 years ago

We could probably do the source code changes to be more forgiving about longitudes as a patch as well.

:+1: