Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for XCode7 and 10.11 SDK #1572

Merged
merged 17 commits into from
Dec 22, 2015
Merged

Workaround for XCode7 and 10.11 SDK #1572

merged 17 commits into from
Dec 22, 2015

Conversation

doutriaux1
Copy link
Contributor

Let's use this branch for all SDK11 changes

@doutriaux1
Copy link
Contributor Author

@sankhesh your changes work, but of course SDK11 brings in new issues, let's use this branch to fix them


   From /Users/doutriaux1/bot/build/CRYPTOGRAPHY-prefix/src/CRYPTOGRAPHY-stamp/CRYPTOGRAPHY-install-err.log

  -------------------------------------------------

  clang: warning: argument unused during compilation: '-L/usr/X11R6/lib'

  clang: warning: argument unused during compilation:
  '-L/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources'

  clang: warning: argument unused during compilation: '-bind_at_load'

  ld: warning: directory not found for option
  '-L/Users/doutriaux1/bot/build/install/Externals/lib64'

  clang: warning: argument unused during compilation: '-L/usr/X11R6/lib'

  clang: warning: argument unused during compilation:
  '-L/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources'

  clang: warning: argument unused during compilation: '-bind_at_load'

  ld: warning: directory not found for option
  '-L/Users/doutriaux1/bot/build/install/Externals/lib64'

  clang: warning: argument unused during compilation: '-L/usr/X11R6/lib'

  clang: warning: argument unused during compilation:
  '-L/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources'

  clang: warning: argument unused during compilation: '-bind_at_load'


  cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_444d7397xa22f8491.c:165:10:
  fatal error: 'openssl/aes.h' file not found

  #include <openssl/aes.h>

           ^

  1 error generated.

@aashish24
Copy link
Contributor

@doutriaux1 are we going to wait for RC1 for this?

@durack1
Copy link
Member

durack1 commented Sep 29, 2015

@doutriaux1 not that this will change things much (I'd imagine) but XCode 7.0.1 landed yesterday..

@doutriaux1
Copy link
Contributor Author

@aashish24 nope this will not even delay 2.4.0 final, if it makes it great otherwise it's ok

@sankhesh
Copy link
Contributor

sankhesh commented Nov 4, 2015

@doutriaux1 @aashish24 The error is because of Apple's decision to remove OpenSSL headers from El Capitan SDK. We could either add it as a pre-requisite and as users to install OpenSSL beforehand or build it ourselves as part of the Superbuild.

Which route do you prefer?

@aashish24
Copy link
Contributor

build it ourselves as part of the Superbuild.

build it ourselves if we determine the version of SDK is 10.11

@jbeezley
Copy link
Contributor

jbeezley commented Nov 4, 2015

We need to be a bit careful about this. It seems they only removed the headers not the shared library. The homebrew issue list is filled with bugs resulting from packages linking with the system libcrytpo rather than the external one.

https://langui.sh/2015/07/24/osx-clang-include-lib-search-paths/

@doutriaux1
Copy link
Contributor Author

I agree we need to fix it for the users. @jbeezley can we just install the headers?

@jbeezley
Copy link
Contributor

jbeezley commented Nov 4, 2015

Assuming you install exactly the same version, yes.

However, the version included is old, buggy, has many known exploits, and doesn't support TLS 1.1 or 1.2. The lack of support for TLS 1.2 will prevent connecting to many web sites including most of those hosted by kitware.

@aashish24
Copy link
Contributor

I agree we need to fix it for the users. @jbeezley can we just install the headers?

I am inclining towards installing our own version and prefix the paths so that our version if found first. As referred in the blog post from @jbeezley this one is not free from issues but since we are building our own python, hopefully we should be alright. What you all think?

@doutriaux1
Copy link
Contributor Author

I agree, let's install our own, we control the paths via the setup_runtime.[c]sh anyway. @sankhesh mind taking a stab at it? We are not allowed to use XCode7 at the lab.

@sankhesh
Copy link
Contributor

sankhesh commented Nov 4, 2015

Yep Sure.

@doutriaux1
Copy link
Contributor Author

@aashish24 any chance Kitware has a mac we can setup as a XCode7 bot.

@aashish24
Copy link
Contributor

@aashish24 any chance Kitware has a mac we can setup as a XCode7 bot.

I am going to ask people around. @demarle do we have any Mac running XCode7?

@jbeezley
Copy link
Contributor

jbeezley commented Nov 4, 2015

Mine is XCode 7, but it is also the one that I use daily. I don't what windows popping up all the time. If MESA worked on mac, I would consider using it.

@doutriaux1
Copy link
Contributor Author

thanks @jbeezley but yes it has to be some computer that is always on and basically unused.

@jbeezley
Copy link
Contributor

I learned some additional information about ssl RE OS X >= 10.9, which is most likely relevant to #1337. Apple replaced openssl with their own implementation (SecureTransport) for certain system components including libcurl. The important difference in the implementation is that it doesn't support reading standard certificate files (including curl flags like --cacert, --capath, etc.). Instead all certificates must be imported into the system keychain.

The result of this is that the .dodsrc files used by netcdf to override ssl settings will not work when it is linked with the system libcurl since at least version 10.9. Given that and the outdated openssl, I think we should blacklist the system libcurl for all versions of OS X.

@sankhesh
Copy link
Contributor

@doutriaux1 @aashish24 I should have support for Xcode 7 in a pull request today.

@doutriaux1
Copy link
Contributor Author

Yes! Many thanks @sankhesh !

@sankhesh
Copy link
Contributor

@doutriaux1 You test the OSX version and SDK version here. Why do they have to match? Why can't I build against a different Xcode version?

The reason I'm asking is I want to verify my changes with an older Xcode and this code does not let me pass through.

@aashish24
Copy link
Contributor

Guys,

What we are going to do about the ssl?

@sankhesh
Copy link
Contributor

@jbeezley Is the build still running?

@doutriaux1
Copy link
Contributor Author

@sankhesh ok.... I moved /usr/include/opensll out of the way. The build still goes through happily, but no openssl is being built! Do you know what find(opensll) is looking for?

doutriaux1@hoang1ml:[~]:[391]> ll ~/build/install/Externals/include/
total 1992
-rw-r--r--   1 doutriaux1  staff   1.9K Dec 21 11:50 ESMC.h
-rw-r--r--   1 doutriaux1  staff   2.1K Dec 21 11:50 ESMC_Arg.h
-rw-r--r--   1 doutriaux1  staff   5.9K Dec 21 11:50 ESMC_Array.h
-rw-r--r--   1 doutriaux1  staff   3.7K Dec 21 11:50 ESMC_ArraySpec.h
-rw-r--r--   1 doutriaux1  staff   5.9K Dec 21 11:50 ESMC_Calendar.h
-rw-r--r--   1 doutriaux1  staff   6.3K Dec 21 11:50 ESMC_Clock.h
-rw-r--r--   1 doutriaux1  staff   1.3K Dec 21 11:50 ESMC_Conf.h
-rw-r--r--   1 doutriaux1  staff    11K Dec 21 11:50 ESMC_Config.h
-rw-r--r--   1 doutriaux1  staff   1.1K Dec 21 11:50 ESMC_CoordSys.h
-rw-r--r--   1 doutriaux1  staff    16K Dec 21 11:50 ESMC_CplComp.h
-rw-r--r--   1 doutriaux1  staff   4.2K Dec 21 11:50 ESMC_DistGrid.h
-rw-r--r--   1 doutriaux1  staff    27K Dec 21 11:50 ESMC_Field.h
-rw-r--r--   1 doutriaux1  staff    13K Dec 21 11:50 ESMC_Grid.h
-rw-r--r--   1 doutriaux1  staff    17K Dec 21 11:50 ESMC_GridComp.h
-rw-r--r--   1 doutriaux1  staff   5.8K Dec 21 11:50 ESMC_Init.h
-rw-r--r--   1 doutriaux1  staff   1.8K Dec 21 11:50 ESMC_Interface.h
-rw-r--r--   1 doutriaux1  staff   3.2K Dec 21 11:50 ESMC_LogErr.h
-rw-r--r--   1 doutriaux1  staff   2.1K Dec 21 11:50 ESMC_Macros.h
-rw-r--r--   1 doutriaux1  staff    21K Dec 21 11:50 ESMC_Mesh.h
-rw-r--r--   1 doutriaux1  staff   2.4K Dec 21 11:50 ESMC_RHandle.h
-rw-r--r--   1 doutriaux1  staff   6.2K Dec 21 11:50 ESMC_ReturnCodes.h
-rw-r--r--   1 doutriaux1  staff   3.9K Dec 21 11:50 ESMC_SciComp.h
-rw-r--r--   1 doutriaux1  staff   6.8K Dec 21 11:50 ESMC_State.h
-rw-r--r--   1 doutriaux1  staff   1.8K Dec 21 11:50 ESMC_Test.h
-rw-r--r--   1 doutriaux1  staff   5.4K Dec 21 11:50 ESMC_Time.h
-rw-r--r--   1 doutriaux1  staff   5.0K Dec 21 11:50 ESMC_TimeInterval.h
-rw-r--r--   1 doutriaux1  staff   4.2K Dec 21 11:50 ESMC_Util.h
-rw-r--r--   1 doutriaux1  staff   7.7K Dec 21 11:50 ESMC_VM.h
-rw-r--r--   1 doutriaux1  staff    22K Dec 21 11:32 H5ACpublic.h
-rw-r--r--   1 doutriaux1  staff   5.5K Dec 21 11:32 H5Apublic.h
-rw-r--r--   1 doutriaux1  staff   1.9K Dec 21 11:32 H5Cpublic.h
-rw-r--r--   1 doutriaux1  staff   1.6K Dec 21 11:32 H5DOpublic.h
-rw-r--r--   1 doutriaux1  staff   2.7K Dec 21 11:32 H5DSpublic.h
-rw-r--r--   1 doutriaux1  staff   6.5K Dec 21 11:32 H5Dpublic.h
-rw-r--r--   1 doutriaux1  staff    19K Dec 21 11:32 H5Epubgen.h
-rw-r--r--   1 doutriaux1  staff   9.0K Dec 21 11:32 H5Epublic.h
-rw-r--r--   1 doutriaux1  staff   1.7K Dec 21 11:32 H5FDcore.h
-rw-r--r--   1 doutriaux1  staff   2.1K Dec 21 11:32 H5FDdirect.h
-rw-r--r--   1 doutriaux1  staff   1.7K Dec 21 11:32 H5FDfamily.h
-rw-r--r--   1 doutriaux1  staff   3.2K Dec 21 11:32 H5FDlog.h
-rw-r--r--   1 doutriaux1  staff   2.7K Dec 21 11:32 H5FDmpi.h
-rw-r--r--   1 doutriaux1  staff   2.6K Dec 21 11:32 H5FDmpio.h
-rw-r--r--   1 doutriaux1  staff   2.0K Dec 21 11:32 H5FDmulti.h
-rw-r--r--   1 doutriaux1  staff    14K Dec 21 11:32 H5FDpublic.h
-rw-r--r--   1 doutriaux1  staff   1.5K Dec 21 11:32 H5FDsec2.h
-rw-r--r--   1 doutriaux1  staff   1.5K Dec 21 11:32 H5FDstdio.h
-rw-r--r--   1 doutriaux1  staff   8.5K Dec 21 11:32 H5Fpublic.h
-rw-r--r--   1 doutriaux1  staff   7.1K Dec 21 11:32 H5Gpublic.h
-rw-r--r--   1 doutriaux1  staff   3.4K Dec 21 11:32 H5IMpublic.h
-rw-r--r--   1 doutriaux1  staff   4.6K Dec 21 11:32 H5Ipublic.h
-rw-r--r--   1 doutriaux1  staff    14K Dec 21 11:32 H5LTpublic.h
-rw-r--r--   1 doutriaux1  staff   9.1K Dec 21 11:32 H5Lpublic.h
-rw-r--r--   1 doutriaux1  staff   1.9K Dec 21 11:32 H5MMpublic.h
-rw-r--r--   1 doutriaux1  staff    10K Dec 21 11:32 H5Opublic.h
-rw-r--r--   1 doutriaux1  staff   1.7K Dec 21 11:32 H5PLextern.h
-rw-r--r--   1 doutriaux1  staff   2.0K Dec 21 11:32 H5PLpublic.h
-rw-r--r--   1 doutriaux1  staff   3.9K Dec 21 11:32 H5PTpublic.h
-rw-r--r--   1 doutriaux1  staff    24K Dec 21 11:32 H5Ppublic.h
-rw-r--r--   1 doutriaux1  staff   3.6K Dec 21 11:32 H5Rpublic.h
-rw-r--r--   1 doutriaux1  staff   7.2K Dec 21 11:32 H5Spublic.h
-rw-r--r--   1 doutriaux1  staff   8.4K Dec 21 11:32 H5TBpublic.h
-rw-r--r--   1 doutriaux1  staff    27K Dec 21 11:32 H5Tpublic.h
-rw-r--r--   1 doutriaux1  staff    11K Dec 21 11:32 H5Zpublic.h
-rw-r--r--   1 doutriaux1  staff   9.8K Dec 21 11:32 H5api_adpt.h
-rw-r--r--   1 doutriaux1  staff    98K Dec 21 11:32 H5overflow.h
-rw-r--r--   1 doutriaux1  staff    18K Dec 21 11:32 H5pubconf.h
-rw-r--r--   1 doutriaux1  staff    12K Dec 21 11:32 H5public.h
-rw-r--r--   1 doutriaux1  staff    12K Dec 21 11:32 H5version.h
-rw-r--r--   1 doutriaux1  staff   5.5K Dec 21 11:34 cddrs.h
-rw-r--r--   1 doutriaux1  staff    13K Dec 21 11:34 cdms.h
-rw-r--r--   1 doutriaux1  staff   1.5K Dec 21 11:34 cdms.inc
-rw-r--r--   1 doutriaux1  staff   6.9K Dec 21 11:34 cdunif.h
-rw-r--r--   1 doutriaux1  staff   5.8K Dec 21 11:29 converter.h
-rw-r--r--   1 doutriaux1  staff   8.3K Dec 21 11:34 drscdf.h
-rw-r--r--   1 doutriaux1  staff   5.0K Dec 21 11:34 fcddrs.h
lrwxr-xr-x   1 doutriaux1  staff    68B Dec 21 11:30 freetype -> /Users/doutriaux1/build/install/Externals/include/freetype2/freetype
drwxr-xr-x   3 doutriaux1  staff   102B Dec 21 11:30 freetype2
-rw-r--r--   1 doutriaux1  staff   3.8K Dec 21 11:30 ft2build.h
-rwxr-xr-x   1 doutriaux1  staff    13K Dec 21 11:31 grib2.h
-rw-r--r--   1 doutriaux1  staff   2.7K Dec 21 11:32 hdf5.h
-rw-r--r--   1 doutriaux1  staff   1.6K Dec 21 11:32 hdf5_hl.h
drwxr-xr-x  21 doutriaux1  staff   714B Dec 21 11:31 jasper
drwxr-xr-x  15 doutriaux1  staff   510B Dec 21 11:43 libavcodec
drwxr-xr-x   4 doutriaux1  staff   136B Dec 21 11:43 libavdevice
drwxr-xr-x   9 doutriaux1  staff   306B Dec 21 11:43 libavfilter
drwxr-xr-x   5 doutriaux1  staff   170B Dec 21 11:43 libavformat
drwxr-xr-x  66 doutriaux1  staff   2.2K Dec 21 11:43 libavutil
drwxr-xr-x   4 doutriaux1  staff   136B Dec 21 11:43 libpostproc
drwxr-xr-x   4 doutriaux1  staff   136B Dec 21 11:43 libswresample
drwxr-xr-x   4 doutriaux1  staff   136B Dec 21 11:43 libswscale
-rw-r--r--   1 doutriaux1  staff    59K Dec 21 11:34 netcdf.h
-rw-r--r--   1 doutriaux1  staff   2.0K Dec 21 11:34 netcdf_meta.h
drwxr-xr-x  10 doutriaux1  staff   340B Dec 21 11:29 readline
-rw-r--r--   1 doutriaux1  staff   5.1K Dec 21 11:29 udunits.h
-rw-r--r--   1 doutriaux1  staff    39K Dec 21 11:29 udunits2.h
-rw-r--r--   1 doutriaux1  staff   4.3K Dec 21 11:29 uuid.h
-rw-r--r--   1 doutriaux1  staff    46K Dec 21 11:31 x264.h
-rw-r--r--   1 doutriaux1  staff   172B Dec 21 11:31 x264_config.h

@doutriaux1
Copy link
Contributor Author

build_info.txt says:

pkgconfig 0.28.0 http://uv-cdat.llnl.gov/cdat/resources/pkg-config-0.28.tar.gz
readline 6.2 http://uv-cdat.llnl.gov/cdat/resources/readline-6.2.tar.gz 67948acb2ca081f23359d0256e9a271c
Python 2.7.10 http://uv-cdat.llnl.gov/cdat/resources/Python-2.7.10.tgz d7547558fd673bd9d38e2108c6b42521
SIP 4.16.4 http://uv-cdat.llnl.gov/cdat/resources/sip-4.16.4.tar.gz a9840670a064dbf8f63a8f653776fec9
PyQt 4.11.3 http://uv-cdat.llnl.gov/cdat/resources/PyQt-mac-gpl-4.11.3.tar.gz 9bd050f1d0c91510ea8be9f41878144c
freetype 2.4.10 http://uv-cdat.llnl.gov/cdat/resources/freetype-2.4.10.tar.gz
NUMPY 1.9.0 http://uv-cdat.llnl.gov/cdat/resources/numpy-1.9.0.tar.gz a93dfc447f3ef749b31447084839930b
setuptools 17.1.1 http://uv-cdat.llnl.gov/cdat/resources/setuptools-17.1.1.tar.gz 7edec6cc30aca5518fa9bad42ff0179b
pip 7.1.0 http://uv-cdat.llnl.gov/cdat/resources/pip-7.1.0.tar.gz d935ee9146074b1d3f26c5f0acfd120e
SIX 1.9.0 http://uv-cdat.llnl.gov/cdat/resources/six-1.9.0.tar.gz 476881ef4012262dfc8adc645ee786c4
DATEUTILS 2.2 http://uv-cdat.llnl.gov/cdat/resources/python-dateutil-2.2.tar.gz c1f654d0ff7e33999380a8ba9783fd5c
PYPARSING 2.0.2 http://uv-cdat.llnl.gov/cdat/resources/pyparsing-2.0.2.tar.gz b170c5d153d190df1a536988d88e95c1
Cycler 0.9.0 http://uv-cdat.llnl.gov/cdat/resources/cycler-0.9.0.tar.gz c10ade5ca3f0aadf575eb25203b225a5
Matplotlib 1.5.0 http://uv-cdat.llnl.gov/cdat/resources/matplotlib-1.5.0.tar.gz 35a9cad23887dc6a7bd30cf434aa3f65
GEOS 3.3.5 http://uv-cdat.llnl.gov/cdat/resources/geos-3.3.5.tar.bz2 2ba61afb7fe2c5ddf642d82d7b16e75b
basemap 1.0.5 http://uv-cdat.llnl.gov/cdat/resources/basemap-1.0.5.tar.gz
HDF5  http://uv-cdat.llnl.gov/cdat/resources/hdf5-1.8.15.tar.gz 03cccb5b33dbe975fdcd8ae9dc021f24
NetCDF 4.3.3.1 http://uv-cdat.llnl.gov/cdat/resources/netcdf-4.3.3.1.tar.gz 5c9dad3705a3408d27f696e5b31fb88c
jasper 1.900.1 http://uv-cdat.llnl.gov/cdat/resources/jasper-1.900.1.tgz b5ae85050d034555790a3ccbc2522860
g2clib 1.4.0b http://uv-cdat.llnl.gov/cdat/resources/g2clib-1.4.0b.tar.gz 72378d980b2f4d6b09fd86e23e884a4b
libcdms 1.0.0 http://uv-cdat.llnl.gov/cdat/resources/libcdms-1.0.0.tar.gz ce71f54616f755d67fbbb6c81ca4fd62
uuid 1.6.2 http://uv-cdat.llnl.gov/cdat/resources/uuid-1.6.2.tar.gz 5db0d43a9022a6ebbbc25337ae28942f
libcf 1.0-beta11 http://uv-cdat.llnl.gov/cdat/resources/libcf-1.0-beta11.tar.gz aba4896eab79d36c7283fc7b75fb16ee
FFI 3.1 http://uv-cdat.llnl.gov/cdat/resources/libffi-3.1.tar.gz f5898b29bbfd70502831a212d9249d10
PYCPARSER 2.13 http://uv-cdat.llnl.gov/cdat/resources/pycparser-2.13.tar.gz e4fe1a2d341b22e25da0d22f034ef32f
CFFI 0.8.2 http://uv-cdat.llnl.gov/cdat/resources/cffi-0.8.2.tar.gz 37fc88c62f40d04e8a18192433f951ec
CRYPTOGRAPHY 0.4 http://uv-cdat.llnl.gov/cdat/resources/cryptography-0.4.tar.gz d1bb13648a12eda2a54653ba113d2e84
PYOPENSSL 0.14 http://uv-cdat.llnl.gov/cdat/resources/pyOpenSSL-0.14.tar.gz 8579ff3a1d858858acfba5f046a4ddf7
MyProxyClient 1.3.0 http://uv-cdat.llnl.gov/cdat/resources/MyProxyClient-1.3.0.tar.gz 829a299157f91f8ff8a6e5bc8ec1c09c
udunits2 2.2.17 http://uv-cdat.llnl.gov/cdat/resources/udunits-2.2.17.tar.gz b81ab8f24125ce18702ab7b3ca4d566f
X264 20151006.2245 http://uv-cdat.llnl.gov/cdat/resources/x264-snapshot-20151006-2245.tar.gz e8f5a0fc8db878bcdd256715472fe379
FFMPEG 2.7 http://uv-cdat.llnl.gov/cdat/resources/ffmpeg-2.7.tar.gz 3ad0554981faf2c6deef23a1cd4c8c57
VTK  http://github.com/UV-CDAT/VTK.git uvcdat-2.4.0
ESMF 6_3_0rp1 http://uv-cdat.llnl.gov/cdat/resources/esmp.ESMF_6_3_0rp1_ESMP_01.tar.bz2 a9be4fb51da1bc1fab027137297c5030
CDAT 2.4.0.rc2-306-gf977dbf N/A
Cython 0.23.4 http://uv-cdat.llnl.gov/cdat/resources/Cython-0.23.4.tar.gz 157df1f69bcec6b56fd97e0f2e057f6e
pyflakes 0.8.1 http://uv-cdat.llnl.gov/cdat/resources/pyflakes-0.8.1.tar.gz 905fe91ad14b912807e8fdc2ac2e2c23
pep8 1.5.7 http://uv-cdat.llnl.gov/cdat/resources/pep8-1.5.7.tar.gz f6adbdd69365ecca20513c709f9b7c93
mccabe 0.3.1 http://uv-cdat.llnl.gov/cdat/resources/mccabe-0.3.1.tar.gz 9a1570c470ff5db678cc0c03d5c0c237
flake8 2.4.1 http://uv-cdat.llnl.gov/cdat/resources/flake8-2.4.1.tar.gz ed45d3db81a3b7c88bd63c6e37ca1d65
SCIPY 0.16.1 http://uv-cdat.llnl.gov/cdat/resources/scipy-0.16.1.tar.gz 594c5f6cf7cee3074af858308164206f
IPYTHON 3.0.0 http://uv-cdat.llnl.gov/cdat/resources/ipython-3.0.0.tar.gz b3f00f3c0be036fafef3b0b9d663f27e
sampledata
singledispatch 3.4.0.3 http://uv-cdat.llnl.gov/cdat/resources/singledispatch-3.4.0.3.tar.gz af2fc6a3d6cc5a02d0bf54d909785fcb
windfield
CMOR 2.9.2  uvcdat-2.4.0
UVCMETRICS  http://github.com/UV-CDAT/uvcmetrics.git uvcdat-2.4.0
vistrails uvcdat-2.4.0 http://github.com/UV-CDAT/VisTrails.git uvcdat-2.4.0
windspharm
eof2
eofs

@jbeezley
Copy link
Contributor

The test data downloads kept timing out, so I never got a complete build.

@sankhesh
Copy link
Contributor

@doutriaux1 Is OPENSSL_ROOT_DIR set in your environment? If yes, you should unset it.

Also, UV-CDAT CMake should give you a message from here pointing to where it found OpenSSL.

@sankhesh
Copy link
Contributor

@doutriaux1 Also, is that the complete list of packages you posted? It doesn't even have VTK.

@doutriaux1
Copy link
Contributor Author

@sankhesh i turned off QUIET t osee what happens (I think we should leave it off) I see:

-- Found OpenSSL: /usr/lib/libssl.dylib;/usr/lib/libcrypto.dylib (found version "0.9.8}") 
-- System OpenSSL found. OpenSSL library directory: /usr/lib. OpenSSL Version: 0.9.8}

So it appears that all we need are libraries? Not the headers? I thought the issue was with headers being missing.

@sankhesh
Copy link
Contributor

@doutriaux1 The message is being printed by my code and QUIET does not have anything to do here. If we leave out QUIET, if OpenSSL is not found, it will stop the configuration process asking the user for OpenSSL. Please see CMake docs here.

@doutriaux1
Copy link
Contributor Author

@sankhesh I see, but the point is, we do not need the headers then, is that right? Is XCode7 not distributing the ssl binaries? I have a hard time believing this.

@doutriaux1
Copy link
Contributor Author

@jbeezley use: -DCDAT_DOWNLOAD_SAMPLE_DATA=OFF -DCDAT_DOWNLOAD_UVCMETRICS_TESTDATA=OFF

@sankhesh
Copy link
Contributor

@doutriaux1 We need OpenSSL headers to build CRYPTOGRAPHY. In my stock OSX 10.11.2 and Xcode 7.2 I have the OpenSSL library but no headers. CMake figures out that it cannot find the headers and decides to build OpenSSL itself.

@doutriaux1
Copy link
Contributor Author

@sankhesh not for me. I moved the headers that were in /usr/include/opensll away and it went on and happily built everything... That's why I looked at find_package(OpenSSL) and realized it seems to only look for the lib files.

Added step that tests if OpenSSL headers exist at the root
directory where library found.
@sankhesh
Copy link
Contributor

Okay. I added an extra check for OpenSSL headers. Can you try the latest commit.

@doutriaux1
Copy link
Contributor Author

@sankhesh I will. But in the mean time I'm running another build with the libs and not the headers. It seems to work on my system! Will wait for it to finsih and run ctest to be sure. Then i will test your commit again.

@doutriaux1
Copy link
Contributor Author

@sankhesh ok I figured it out I moved the openssl directory into my ${HOME} and apparently the headers were found there. Moved them to a totally random named directory. Back soon.
The crypto log:

_Cryptography_cffi_8f86901cxc1767c5a' extension
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/doutriaux1 -I/Users/blah/blah/blah more blah

@doutriaux1
Copy link
Contributor Author

yes that was it. Moving them out of my ${HOME} actually triggered the build of opensll (even before your commit). Trying with your commit now.

@doutriaux1
Copy link
Contributor Author

ok I got:

-- problem downloading 'https://www.openssl.org/source/openssl-1.0.2e.tar.gz'
    status_code: 35
    status_string: "SSL connect error"
    log: Hostname was NOT found in DNS cache
  Trying 194.97.150.234...
Connected to www.openssl.org (194.97.150.234) port 443 (#0)
Server aborted the SSL handshake
Closing connection 0

@aashish24
Copy link
Contributor

ok I got:

-- problem downloading 'https://www.openssl.org/source/openssl-1.0.2e.tar.gz'
status_code: 35
status_string: "SSL connect error"
log: Hostname was NOT found in DNS cache
Trying 194.97.150.234...
Connected to www.openssl.org (194.97.150.234) port 443 (#0)
Server aborted the SSL handshake
Closing connection 0

@doutriaux1 looks like a LLNL issue? or may be temporary issue. Using the LLNL server is a good thing which you did now.

@doutriaux1
Copy link
Contributor Author

@sankhesh all good for me both with or without opensll headers. see: https://open.cdash.org/index.php?project=UV-CDAT&date=2015-12-21&display=project

if @jbeezley is ok with this feel free to merge into master.

@aashish24
Copy link
Contributor

@sankhesh nice job! one thing is that checking for openssl_include_dir is not necessary as you had in the original code since this is what we have in the FindOpenSSL.cmake

if (OPENSSL_VERSION)
  find_package_handle_standard_args(OpenSSL
    REQUIRED_VARS
      OPENSSL_LIBRARIES
      OPENSSL_INCLUDE_DIR
    VERSION_VAR
      OPENSSL_VERSION
    FAIL_MESSAGE
      "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
  )
else ()
  find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
    OPENSSL_LIBRARIES
    OPENSSL_INCLUDE_DIR
  )
endif ()

@sankhesh
Copy link
Contributor

Yeah that's what I figured. The last commit was just to make @doutriaux1 happy.

@doutriaux1
Copy link
Contributor Author

@sankhesh yes I figured that as well I had put my includes in the ${HOME} directory. Somehow it looked there for the includes which is why I thought the original code wasn't looking for the headers. I still wonder if we should really look into ${HOME} though. Anyhow I'd say let's merge as soon as we hear from @jbeezley

@jbeezley
Copy link
Contributor

The cdms issue is probably unrelated.

@doutriaux1
Copy link
Contributor Author

ok merging then.

doutriaux1 added a commit that referenced this pull request Dec 22, 2015
Workaround for XCode7 and 10.11 SDK
@doutriaux1 doutriaux1 merged commit e1d9a9b into master Dec 22, 2015
@doutriaux1 doutriaux1 deleted the MacOSX_10_11_SDK branch December 22, 2015 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants