rdkit / conda-rdkit

Conda build recipe for the rdkit
50 stars 30 forks source link

Error building conda-rdkit behind a firewall #81

Closed dvidmon closed 5 years ago

dvidmon commented 5 years ago

Hello,

I'm trying to build binary RDKit packages on conda. As I'm behind a firewall I've configured the corresponding proxy server in both the environment (export {https,http,ftp}_proxy=https://user:password@proxy:port/) and the conda configuration file (.condarc).

Everything goes smoothly on running the "conda build rdkit" until the program tries to build the InChI support when, apparently, curl is not able to download the source code from http://www.inchi-trust.org:

-- Could NOT find InChI in system locations (missing: INCHI_LIBRARY INCHI_INCLUDE_DIR)
Downloading http://www.inchi-trust.org/download/105/INCHI-1-SRC.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: www.inchi-trust.org
CMake Error at Code/cmake/Modules/RDKitUtils.cmake:194 (MESSAGE):
  The md5 checksum for
  /software/anaconda2/conda-bld/rdkit_1566988838557/work/External/INCHI-API/INCHI-1-SRC.zip
  is incorrect; expected: ccc497c7e6ced1521a6953d859e49af4, found:
  d41d8cd98f00b204e9800998ecf8427e
Call Stack (most recent call first):
  Code/cmake/Modules/FindInchi.cmake:50 (downloadAndCheckMD5)
  CMakeLists.txt:172 (find_package)

-- Configuring incomplete, errors occurred!

However, I've tried curl manually and it works just fine:

curl -O http://www.inchi-trust.org/download/105/INCHI-1-SRC.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0   2373      0 --:--:-- --:--:-- --:--:--  2373

Is there any trick to bypass this situation?

rvianello commented 5 years ago

you may probably need to add the *_proxy environment variables to the meta.yaml build section, as documented in the "Use environment variables" paragraph of https://conda.io/projects/conda-build/en/latest/resources/define-metadata.html#build-section, so that the settings become available to curl when executing in the conda build sub-shell.

dvidmon commented 5 years ago

Hi Riccardo,

Thanks for your help. However, although defining the environment variables through the meta.yaml file (see enclosed code) make them available, the conda build process keep on failing due to the same exact curl error (curl: (6) Could not resolve host: www.inchi-trust.org):

Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
/software/anaconda2/lib/python2.7/site-packages/conda_build/environ.py:426: UserWarning: The environment variable 'HTTP_PROXY' is being passed through with value http://user:pwd@proxyip:port.  If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
  UserWarning
/software/anaconda2/lib/python2.7/site-packages/conda_build/environ.py:426: UserWarning: The environment variable 'HTTPS_PROXY' is being passed through with value http://user:pwd@proxyip:port.  If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
  UserWarning
/software/anaconda2/lib/python2.7/site-packages/conda_build/environ.py:426: UserWarning: The environment variable 'FTP_PROXY' is being passed through with value http://user:pwd@proxyip:port.  If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
  UserWarning
Attempting to finalize metadata for rdkit

Any ideas?

dvidmon commented 5 years ago

Hi again,

Apparently, it is a case sensitive issue, as when I defined the variables lower case, it worked just fine:

 script_env:
   - http_proxy
   - https_proxy
   - ftp_proxy

Thanks for your help. I'm closing the issue.