You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Diwaker Gupta (JIRA)" <ji...@apache.org> on 2011/08/26 02:45:29 UTC

[jira] [Created] (THRIFT-1296) SSL detection is broken

SSL detection is broken
-----------------------

                 Key: THRIFT-1296
                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
             Project: Thrift
          Issue Type: Bug
          Components: Build Process
    Affects Versions: 0.7
         Environment: Ubuntu 10.04
Building Thrift against a custom toolchain (not using system packages/libraries)
            Reporter: Diwaker Gupta


When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:

{noformat}
configure:23665: checking for SSL_ctrl in -lssl
configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
{noformat}

The following patch fixes this problem:

{noformat}
+--- configure.ac
++++ configure.ac
+@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
+ dnl and we haven't yet found a system where this is a problem.
+ AC_CHECK_LIB(rt, clock_gettime)
+ AC_CHECK_LIB(socket, setsockopt)
+-AC_CHECK_LIB(ssl, SSL_ctrl)
++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
+
+ AC_TYPE_INT16_T
+ AC_TYPE_INT32_T
{noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1296) SSL detection is broken

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diwaker Gupta updated THRIFT-1296:
----------------------------------

    Attachment: THRIFT-1296.patch

I've only tested on Ubuntu 10.04. Some more testing on other platforms is definitely needed.

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>         Attachments: THRIFT-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1296) SSL detection is broken

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell updated THRIFT-1296:
---------------------------------

    Attachment: thrift-1296.patch

Instead of just including crypto blindly when ssl is available we should check for it as well and either send an error message or set a flag and remove clients that require ssl and crypto. Patch for just checking for both and failing attached. Thoughts?

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch, thrift-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1296) SSL detection is broken

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091518#comment-13091518 ] 

Jake Farrell commented on THRIFT-1296:
--------------------------------------

Can you please attach as a patch with asf inclusion. Thanks

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1296) SSL detection is broken

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1296.
--------------------------------

    Resolution: Fixed

Flipped around the checks so crypto is looked for first and then used when checking for ssl, committed

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch, thrift-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1296) SSL detection is broken

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092989#comment-13092989 ] 

Diwaker Gupta commented on THRIFT-1296:
---------------------------------------

My AC-foo is fairly limited, but IIUC you need to include '-lcrypto' in the last (5th) parameter to AC_CHECK_LIB(ssl...). The reason being that just to link against libssl to check for SSL_ctrl, you need to also link against libcrypto (at least on my platform); otherwise GCC fails complaining about missing symbols. Otherwise the patch looks great!

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch, thrift-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (THRIFT-1296) SSL detection is broken

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell reassigned THRIFT-1296:
------------------------------------

    Assignee: Jake Farrell

> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1296) SSL detection is broken

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101044#comment-13101044 ] 

Hudson commented on THRIFT-1296:
--------------------------------

Integrated in Thrift #255 (See [https://builds.apache.org/job/Thrift/255/])
    THRIFT-1296 SSL detection is broken

mingw toolchain used to build "Thrift Compiler for Windows"
does not support libcrypto, so we just check if we building the cpp library

roger : http://svn.apache.org/viewvc/?view=rev&rev=1167013
Files : 
* /thrift/trunk/.gitignore
* /thrift/trunk/configure.ac


> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch, thrift-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1296) SSL detection is broken

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093112#comment-13093112 ] 

Hudson commented on THRIFT-1296:
--------------------------------

Integrated in Thrift #242 (See [https://builds.apache.org/job/Thrift/242/])
    Thrift-1296: SSL detection is broken
Patch: jfarrell

Updated configure to check for crypto and then ssl and error along the way if unavailable.


> SSL detection is broken
> -----------------------
>
>                 Key: THRIFT-1296
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1296
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.7
>         Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system packages/libraries)
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>         Attachments: THRIFT-1296.patch, thrift-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  -L<snip> -I<snip>  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by <snip>/usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
> ++++ configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira