OpenSSL installation issues

Foereaper's Avatar

Foereaper

29 Mar, 2015 11:42 PM

Hey there! I'm currently attempting to set up my project, and I am having some issues with installing required external libraries, in this case OpenSSL. I have attempted several methods of installation, however it doesn't seem like it works like it should. This is how I download and install the binary:

install:
  - ps: Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2a.exe'
  - ps: msiexec /i Win32OpenSSL-1_0_2a.exe

As far as I can see it doesn't error, nor does it say that the installation actually worked. Further on in my cmake script, I check to see if the package actually exists, and if so link it up properly. At this point I receive this error:

CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find OpenSSL (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindOpenSSL.cmake:176 (find_package_handle_standard_args)
  CMakeLists.txt:83 (find_package)
 
 
-- Configuring incomplete, errors occurred!

Any help in installing the package correctly would be greatly appreciated!

  1. 1 Posted by Foereaper on 30 Mar, 2015 12:30 AM

    Foereaper's Avatar

    Oh yes, I forgot to mention. I also tried - cinst OpenSSL.Light but this defaults to 64bit, and my project, at the moment, requires 32bit, which I for some reason cannot switch to.

  2. 2 Posted by Foereaper on 30 Mar, 2015 01:25 AM

    Foereaper's Avatar

    Aha! I finally figured it out! For future reference:

    install:
      - ps: Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2a.exe'
      - ps: Start-Process "Win32OpenSSL-1_0_2a.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait

    This worked flawlessly! :)

  3. Support Staff 3 Posted by Feodor Fitsner on 30 Mar, 2015 01:33 AM

    Feodor Fitsner's Avatar

    Thank you for sharing the solution!

    -Feodor

  4. 4 Posted by Takatoshi Kondo on 08 Dec, 2015 11:11 AM

    Takatoshi Kondo's Avatar

    Hi,

    I added the following command in my appveyor.yml. Thanks you Foereaper.

    install:
      - ps: Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2a.exe'
      - ps: Start-Process "Win32OpenSSL-1_0_2a.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait

    Then, I got the following message:

    -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)

    It seems that I need to set OPENSSL_ROOT_DIR. However, I don't know where openssl is installed. Could someone tell me the location?

  5. 5 Posted by Foereaper on 08 Dec, 2015 04:47 PM

    Foereaper's Avatar

    Hey, the root directory for OpenSSL by default is:

    C:\OpenSSL-Win32

    or

    C:\OpenSSL-Win64

  6. 6 Posted by Takatoshi Kondo on 09 Dec, 2015 02:45 PM

    Takatoshi Kondo's Avatar

    Thank you, Foereaper. I found it.

  7. 7 Posted by Takatoshi Kondo on 11 Dec, 2015 01:41 PM

    Takatoshi Kondo's Avatar

    I frequently got the following message:

    Start-FileDownload 'http://slproweb.com/download/Win32OpenSSL-1_0_2e.exe'
    Exception calling "DownloadFile" with "3" argument(s): "Unable to connect to the remote server"
    At C:\Program Files\AppVeyor\BuildAgent\Modules\build-worker-api\build-worker-api.psm1:238 char:5
    + [Appveyor.BuildAgent.Api.RestBuildServices]::DownloadFile($Url, $FileName, $ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : WebException

    When I RE-BUILD COMMIT several times, the error is disappeared. I need to do many times.

    OpenSSL is a kind of common library. If appveyor pre-install it, it is very helpful. Could management team do that?

  8. Support Staff 8 Posted by Feodor Fitsner on 11 Dec, 2015 03:05 PM

    Feodor Fitsner's Avatar

    Can you drop a link to a failing build please?

    -Feodor

  9. 9 Posted by Takatoshi Kondo on 11 Dec, 2015 03:06 PM

    Takatoshi Kondo's Avatar
  10. Support Staff 10 Posted by Feodor Fitsner on 11 Dec, 2015 05:56 PM

    Feodor Fitsner's Avatar

    http://slproweb.com is probably hosted by 1&1 (checked with http://who-hosts.com) - I guess it's not the same as GitHub.

    Let's install OpenSSL on build workers then.

  11. Support Staff 11 Posted by Feodor Fitsner on 12 Dec, 2015 11:05 PM

    Feodor Fitsner's Avatar

    OpenSSL has been deployed to build workers (C:\OpenSSL-Win32)

  12. 12 Posted by Takatoshi Kondo on 13 Dec, 2015 01:15 AM

    Takatoshi Kondo's Avatar

    Thank you Feodor, it works fine for me. I removed OpenSSL installation code from my project.

  13. 13 Posted by zosrothko on 22 Dec, 2015 03:45 PM

    zosrothko's Avatar

    You stated: "OpenSSL has been deployed to build workers (C:\OpenSSL-Win32)"

    Can you deploy also the Win64 version?

    Thank you in advance.

  14. Support Staff 14 Posted by Feodor Fitsner on 22 Dec, 2015 11:11 PM

    Feodor Fitsner's Avatar

    Sure, I've added a new issue: https://github.com/appveyor/ci/issues/576

  15. 15 Posted by Takatoshi Kondo on 28 Jun, 2016 12:06 AM

    Takatoshi Kondo's Avatar

    It seems that the contents of the directory C:\OpenSSL-Win32 has been changed. If I set the option "os: Previous Visual Studio 2015", then I got the following result:

     Directory of C:\OpenSSL-Win32
    12/12/2015 09:42 PM <DIR> .
    12/12/2015 09:42 PM <DIR> ..
    12/12/2015 09:42 PM <DIR> bin
    12/03/2015 07:44 AM 474,132 changes.txt
    12/12/2015 09:42 PM <DIR> exp
    12/03/2015 06:25 AM 84 faq.txt
    12/12/2015 09:42 PM <DIR> include
    12/12/2015 09:42 PM <DIR> lib
    12/04/2015 07:23 AM 1,261,056 libeay32.dll
    12/04/2015 07:23 AM 297,472 libssl32.dll
    01/15/2015 07:43 AM 6,279 license.txt
    12/03/2015 07:44 AM 31,914 news.txt
    12/03/2015 07:44 AM 4,112 readme.txt
    12/04/2015 07:23 AM 297,472 ssleay32.dll
    12/12/2015 09:42 PM 20,304 unins000.dat
    12/12/2015 09:42 PM 719,521 unins0

    If I removed the option, I got the following result:

     Directory of C:\OpenSSL-Win32
    06/18/2016 07:32 PM <DIR> .
    06/18/2016 07:32 PM <DIR> ..
    06/18/2016 07:32 PM <DIR> bin
    05/03/2016 06:46 AM 487,315 changes.txt
    05/03/2016 06:38 AM 84 faq.txt
    05/03/2016 05:43 PM 1,262,592 libeay32.dll
    05/03/2016 05:44 PM 273,408 libssl32.dll
    05/03/2016 06:38 AM 6,279 license.txt
    05/03/2016 06:46 AM 33,385 news.txt
    05/03/2016 06:46 AM 4,123 readme.txt
    05/03/2016 05:44 PM 273,408 ssleay32.dll
    06/18/2016 07:32 PM 11,659 unins000.dat
    06/18/2016 07:32 PM 719,521 unins000.

    In the directory, there is no inculde and lib directories, so the program that requires OpenSSL cannot compile.

    Could you recover the directory C:\OpenSSL-Win32 ? Or if the include and lib are moved to somewhare, please let me know.

  16. Support Staff 16 Posted by Feodor Fitsner on 28 Jun, 2016 12:14 AM

    Feodor Fitsner's Avatar

    Will deploy a fix today.

  17. 17 Posted by Takatoshi Kondo on 28 Jun, 2016 12:33 AM

    Takatoshi Kondo's Avatar

    Thank you for the quick reply :)

  18. Support Staff 18 Posted by Feodor Fitsner on 28 Jun, 2016 02:13 AM

    Feodor Fitsner's Avatar

    It's been fixed.

  19. 19 Posted by Lilith River on 18 Aug, 2016 06:36 PM

    Lilith River's Avatar

    Is it possible there has been a regression? Windows builds started failing w/o source changes. https://ci.appveyor.com/project/imazen/imageflow/build/1.0.223/job/...

    fatal error LNK1181: cannot open input file 'ssl32.lib'

    It does look like the OpenSSL dir is showing up in LIBPATH correctly: "/LIBPATH:C:/OpenSSL-Win64/lib"

    https://ci.appveyor.com/project/imazen/imageflow/build/1.0.225/job/...

  20. 20 Posted by Ilya Finkelshte... on 19 Aug, 2016 02:48 AM

    Ilya Finkelshteyn's Avatar

    Hi Nathanael,

    As I see last good build was 2 month ago: https://ci.appveyor.com/project/imazen/imageflow/build/1.0.167

    This specific error LNK1181 started happened just recently after change https://github.com/imazen/imageflow/commit/a7dbf920a4a4810081a91bbc8ed11f6be0ae3518

    Before that it was different error.

    I forked your repo, created new project in Appveyor and did the following experiments:

    1. Run it as is (https://ci.appveyor.com/project/IlyaFinkelshteyn/imageflow/build/1.0.1) – see the same LNK1181 error

    2. Run last known goo build (https://ci.appveyor.com/project/IlyaFinkelshteyn/imageflow/build/1.0.2) – as you see, it finished successfully.

    3. Undid your change to appveyor.yml (https://ci.appveyor.com/project/IlyaFinkelshteyn/imageflow/build/1.0.3) – it failed with the same error it was failing for many times before, with error error C1083: Cannot open include file: 'openssl/ssl.h, which happened many times before.

    Am I understand correctly, that your change https://github.com/imazen/imageflow/commit/a7dbf920a4a4810081a91bbc8ed11f6be0ae3518 was made in attempt to fix error C1083, as advised here https://github.com/sfackler/rust-openssl, but it introduced LNK1181 error instead?

    Also is it possible for you to make small hello world repro for us to speed up investigation? Those small reproes also priceless for our regression test suite for VHD updates.

    --ilya.

  21. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:08 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac