Re: [CMake] Problem building CMake with system OPENSSL

2016-06-08 Thread Lowekamp, Bradley (NIH/NLM/LHC) [C]
Thanks you for the fix and tips!

Brad

From: Brad King [brad.k...@kitware.com]
Sent: Tuesday, June 07, 2016 3:13 PM
To: Lowekamp, Bradley (NIH/NLM/LHC) [C]
Cc: CMake@cmake.org
Subject: Re: [CMake] Problem building CMake with system OPENSSL

On 06/07/2016 10:58 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> I tried out the 3.6.0-rc1 and my problem building CMake still exists.

Thanks for testing it.

> (cd /tmp/cmake-build && \
> ../cmake-3.6.0-rc1/bootstrap && \
> make -j 10 && \
> ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release 
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
> make -j${NPROC} && \
> make install)

That script causes CMake to be configured with itself the second time
instead of the bootstrap script.  You should be able to pass the config
options directly to bootstrap:

  ../cmake-3.6.0-rc1/bootstrap --parallel=${NPROC} -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON \
-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl &&
  make -j ${NPROC} &&
  make install

> In file included from 
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>  fatal error: openssl/evp.h: No such file or directory

This should fix it:

 libarchive: Restore OpenSSL include directory from upstream
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbc9f73d

I've queued this for merge to 'release' for 3.6.0-rc2.

-Brad K

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Problem building CMake with system OPENSSL

2016-06-07 Thread Brad King
On 06/07/2016 04:00 PM, Kristian wrote:
> What's the meaning of the bootstrap executable? I thought, when
> compiling CMake, it is sufficient to call ./configure and then make...

The bootstrap script is the way to bootstrap CMake.  The `configure`
script is just a thin wrapper around `bootstrap` for those that expect
`./configure` to work.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Problem building CMake with system OPENSSL

2016-06-07 Thread Kristian
What's the meaning of the bootstrap executable? I thought, when compiling
CMake, it is sufficient to call ./configure and then make...



2016-06-07 15:13 GMT-04:00 Brad King :

> On 06/07/2016 10:58 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> > I tried out the 3.6.0-rc1 and my problem building CMake still exists.
>
> Thanks for testing it.
>
> > (cd /tmp/cmake-build && \
> > ../cmake-3.6.0-rc1/bootstrap && \
> > make -j 10 && \
> > ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
> > make -j${NPROC} && \
> > make install)
>
> That script causes CMake to be configured with itself the second time
> instead of the bootstrap script.  You should be able to pass the config
> options directly to bootstrap:
>
>   ../cmake-3.6.0-rc1/bootstrap --parallel=${NPROC} -- \
> -DCMAKE_BUILD_TYPE:STRING=Release \
> -DCMAKE_USE_OPENSSL:BOOL=ON \
> -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl &&
>   make -j ${NPROC} &&
>   make install
>
> > In file included from
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
> >
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
> fatal error: openssl/evp.h: No such file or directory
>
> This should fix it:
>
>  libarchive: Restore OpenSSL include directory from upstream
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbc9f73d
>
> I've queued this for merge to 'release' for 3.6.0-rc2.
>
> -Brad K
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Problem building CMake with system OPENSSL

2016-06-07 Thread Brad King
On 06/07/2016 10:58 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] wrote:
> I tried out the 3.6.0-rc1 and my problem building CMake still exists.

Thanks for testing it.

> (cd /tmp/cmake-build && \
> ../cmake-3.6.0-rc1/bootstrap && \
> make -j 10 && \
> ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release 
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
> make -j${NPROC} && \
> make install)

That script causes CMake to be configured with itself the second time
instead of the bootstrap script.  You should be able to pass the config
options directly to bootstrap:

  ../cmake-3.6.0-rc1/bootstrap --parallel=${NPROC} -- \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_USE_OPENSSL:BOOL=ON \
-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl &&
  make -j ${NPROC} &&
  make install

> In file included from 
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
> /tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>  fatal error: openssl/evp.h: No such file or directory

This should fix it:

 libarchive: Restore OpenSSL include directory from upstream
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbc9f73d

I've queued this for merge to 'release' for 3.6.0-rc2.

-Brad K

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Problem building CMake with system OPENSSL

2016-06-07 Thread Lowekamp, Bradley (NIH/NLM/LHC) [C]
Hello,


I tried out the 3.6.0-rc1 and my problem building CMake still exists.

I created a Dockerfile to reproduce my problem:

===Dockerfile===

ROM debian:8
MAINTAINER Bradley Lowekamp 

RUN apt-get update && apt-get install -y \
  build-essential \
  curl \
  libncurses-dev \
  emacs

# Install the latest CMake release
WORKDIR /tmp/
ADD  https://www.openssl.org/source/openssl-1.0.2h.tar.gz \
 https://cmake.org/files/v3.6/cmake-3.6.0-rc1.tar.gz /tmp/

RUN tar zxvf openssl-1.0.2h.tar.gz && \
( cd openssl-1.0.2h && \
./config no-ssl2 no-shared -fPIC --prefix=/usr/local/ssl && \
make install ) && \
rm -rf openssl-1.0.2h

RUN tar xvzf cmake-3.6.0-rc1.tar.gz && \
mkdir /tmp/cmake-build && \
(cd /tmp/cmake-build && \
../cmake-3.6.0-rc1/bootstrap && \
make -j 10 && \
./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release 
-DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl  . && \
make -j${NPROC} && \
make install)


CMD ["/bin/bash”]

Build Error:

In file included from 
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_read_support_format_zip.c:58:0:
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
 fatal error: openssl/evp.h: No such file or directory
 #include 
 ^
compilation terminated.
In file included from 
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_write_set_format_zip.c:52:0:
/tmp/cmake-3.6.0-rc1/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
 fatal error: openssl/evp.h: No such file or directory
 #include 
 ^
compilation terminated.


Thanks for the help!
Brad

> On Jun 6, 2016, at 8:52 AM, Lowekamp, Bradley (NIH/NLM/LHC) [C] 
>  wrote:
> 
> Hi,
> 
> Just to clarify this is a problem building CMake itself not a project with 
> CMake.
> 
> Brad
> 
>> On Jun 5, 2016, at 1:49 PM, Kristian  wrote:
>> 
>> Maybe you should add something like
>> 
>>> include_directories(${OPENSSL_INCLUDE_DIR})
>> 
>> to your CMakeLists.txt ?
>> 
>> 2016-06-03 10:27 GMT-04:00 Lowekamp, Bradley (NIH/NLM/LHC) [C]
>> :
>>> Hello,
>>> 
>>> I am trying to build CMake on an old system with a new version of openssl.
>>> My build script was working with CMake 3.4 but is not working with 3.5.2 or
>>> current master. Here is how I am building cmake:
>>> 
>>> 
>>> cd /tmp/cmake-build &&
>>>   ../${CMAKE_ROOT}/bootstrap &&
>>>   make -j ${NPROC} &&
>>>   ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
>>> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
>>> -DCMAKE_USE_SYSTEM_CURL:BOOL=OFF  . &&
>>>   make -j${NPROC}
>>> 
>>> ERROR MESSAGE:
>>> 41%] Building C object
>>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>>> cd /tmp/cmake-build/Utilities/cmlibarchive/libarchive &&
>>> /opt/rh/devtoolset-2/root/usr/bin/gcc  -DCURL_STATICLIB -DHAVE_CONFIG_H
>>> -DLIBARCHIVE_STATIC -DLZMA_API_STATIC
>>> -I/tmp/cmake/Utilities/cmlibarchive/libarchive
>>> -I/tmp/cmake-build/Utilities/cmlibarchive -I/tmp/cmake-build/Utilities
>>> -I/tmp/cmake/Utilities -I/tmp/cmake/Utilities/cmbzip2
>>> -I/tmp/cmake/Utilities/cmliblzma/liblzma/api  -w -O3 -DNDEBUG   -std=gnu99
>>> -o CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o   -c
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c
>>> In file included from
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>>> fatal error: openssl/evp.h: No such file or directory
>>> #include 
>>> 
>>> My work around it just to add "-I/usr/local/ssl/include/“ to the
>>> CMAKE_C_FLAGS.
>>> 
>>> 
>>> Thanks!
>>> Brad
>>> 
>>> --
>>> 
>>> Powered by www.kitware.com
>>> 
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>> 
>>> Kitware offers various services to support the CMake community. For more
>>> information on each offering, please visit:
>>> 
>>> CMake Support: http://cmake.org/cmake/help/support.html
>>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/cmake
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: 

Re: [CMake] Problem building CMake with system OPENSSL

2016-06-06 Thread Lowekamp, Bradley (NIH/NLM/LHC) [C]
Hi,

Just to clarify this is a problem building CMake itself not a project with 
CMake.

Brad

> On Jun 5, 2016, at 1:49 PM, Kristian  wrote:
> 
> Maybe you should add something like
> 
>> include_directories(${OPENSSL_INCLUDE_DIR})
> 
> to your CMakeLists.txt ?
> 
> 2016-06-03 10:27 GMT-04:00 Lowekamp, Bradley (NIH/NLM/LHC) [C]
> :
>> Hello,
>> 
>> I am trying to build CMake on an old system with a new version of openssl.
>> My build script was working with CMake 3.4 but is not working with 3.5.2 or
>> current master. Here is how I am building cmake:
>> 
>> 
>> cd /tmp/cmake-build &&
>>../${CMAKE_ROOT}/bootstrap &&
>>make -j ${NPROC} &&
>>./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
>> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
>> -DCMAKE_USE_SYSTEM_CURL:BOOL=OFF  . &&
>>make -j${NPROC}
>> 
>> ERROR MESSAGE:
>> 41%] Building C object
>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>> cd /tmp/cmake-build/Utilities/cmlibarchive/libarchive &&
>> /opt/rh/devtoolset-2/root/usr/bin/gcc  -DCURL_STATICLIB -DHAVE_CONFIG_H
>> -DLIBARCHIVE_STATIC -DLZMA_API_STATIC
>> -I/tmp/cmake/Utilities/cmlibarchive/libarchive
>> -I/tmp/cmake-build/Utilities/cmlibarchive -I/tmp/cmake-build/Utilities
>> -I/tmp/cmake/Utilities -I/tmp/cmake/Utilities/cmbzip2
>> -I/tmp/cmake/Utilities/cmliblzma/liblzma/api  -w -O3 -DNDEBUG   -std=gnu99
>> -o CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o   -c
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c
>> In file included from
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
>> fatal error: openssl/evp.h: No such file or directory
>> #include 
>> 
>> My work around it just to add "-I/usr/local/ssl/include/“ to the
>> CMAKE_C_FLAGS.
>> 
>> 
>> Thanks!
>> Brad
>> 
>> --
>> 
>> Powered by www.kitware.com
>> 
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>> 
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>> 
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Problem building CMake with system OPENSSL

2016-06-05 Thread Kristian
Maybe you should add something like

> include_directories(${OPENSSL_INCLUDE_DIR})

to your CMakeLists.txt ?

2016-06-03 10:27 GMT-04:00 Lowekamp, Bradley (NIH/NLM/LHC) [C]
:
> Hello,
>
> I am trying to build CMake on an old system with a new version of openssl.
> My build script was working with CMake 3.4 but is not working with 3.5.2 or
> current master. Here is how I am building cmake:
>
>
> cd /tmp/cmake-build &&
> ../${CMAKE_ROOT}/bootstrap &&
> make -j ${NPROC} &&
> ./bin/cmake -DCMAKE_BUILD_TYPE:STRING=Release
> -DCMAKE_USE_OPENSSL:BOOL=ON -DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl
> -DCMAKE_USE_SYSTEM_CURL:BOOL=OFF  . &&
> make -j${NPROC}
>
> ERROR MESSAGE:
>  41%] Building C object
> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
> cd /tmp/cmake-build/Utilities/cmlibarchive/libarchive &&
> /opt/rh/devtoolset-2/root/usr/bin/gcc  -DCURL_STATICLIB -DHAVE_CONFIG_H
> -DLIBARCHIVE_STATIC -DLZMA_API_STATIC
> -I/tmp/cmake/Utilities/cmlibarchive/libarchive
> -I/tmp/cmake-build/Utilities/cmlibarchive -I/tmp/cmake-build/Utilities
> -I/tmp/cmake/Utilities -I/tmp/cmake/Utilities/cmbzip2
> -I/tmp/cmake/Utilities/cmliblzma/liblzma/api  -w -O3 -DNDEBUG   -std=gnu99
> -o CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o   -c
> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c
> In file included from
> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
> /tmp/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:102:25:
> fatal error: openssl/evp.h: No such file or directory
>  #include 
>
> My work around it just to add "-I/usr/local/ssl/include/“ to the
> CMAKE_C_FLAGS.
>
>
> Thanks!
> Brad
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake