#66992 closed defect (fixed)
mssql-tools @17.7.1.1: OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed
Reported by: | zoonman (Philipp) | Owned by: | roederja |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | bigsur | Cc: | |
Port: | mssql-tools |
Description
Hi guys, the port seems to be installed correctly but it doesn't work.
Initially I started with python odbc but I ended up with isql as python issues is a mere reflection of a real problem under the hood:
isql -v -k 'DRIVER={ODBC Driver 17 for SQL Server};SERVER=127.0.0.1,1433;trusted_connection=no;UID=sa;PWD=password' [08001][Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed] [08001][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection [ISQL]ERROR: Could not SQLDriverConnect
It seems like it depends on openssl but it is not marked as directly relevant.
Versions:
- macports @ 2.8.1
- msodbcsql17 @ 17.7.1.1_1
- mssql-tools @ 17.7.1.1_0
- unixODBC @ 2.3.9_0
I tired installing openssl but it didn't address the issue. It seems like it is inside msodbcsql17 but I cannot speak for sure. I need help here.
Maybe this will help:
port installed openssl* The following ports are currently installed: openssl @3_9 (active) openssl3 @3.0.8_1+legacy (active) openssl10 @1.0.2u_4 (active) openssl11 @1.1.1t_0 (active)
Change History (11)
comment:1 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mssql odbc removed |
---|---|
Owner: | set to roederja |
Status: | new → assigned |
Summary: | mssql-tools 17.7 has broken link to openssl → mssql-tools @17.7.1.1: OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed |
comment:2 Changed 20 months ago by kiwiroy (Roy Storey)
comment:3 Changed 20 months ago by neverpanic (Clemens Lang)
This is one of the reasons why don't typically package binaries in MacPorts—you can't fix them to actually work with the system.
Since you as the maintainer have done so anyway, I'd propose that you modify the msodbcsql17 (a) add a dependency on the openssl11 port, since that seems to be required, and (b) add a note to the port telling users to export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/libexec/openssl11/lib
when they use the driver.
comment:4 Changed 20 months ago by kiwiroy (Roy Storey)
With openssl11 installed adding a symlink results in loading the correct openssl object.
/usr/local/opt/openssl/lib -> /opt/local/lib/openssl-1.1
> strings /opt/local/lib/libmsodbcsql.17.dylib | grep openssl /usr/local/opt/openssl/lib/
comment:5 Changed 20 months ago by roederja
This issue has come up before and I thought a note about the need to add a symlink had already been added. What’s new is that we now need OpenSSL 1.1 explicitly. I remember that the path is hardcoded into the binary, so I was surprised to see that you seem to have gotten it to work with the env variable which is a bit cleaner. But then in your PR you added the note about the symlink. I’ll have a look later today when I get home.
comment:6 Changed 20 months ago by kiwiroy (Roy Storey)
roederja for version 17.7.1.1 the path is hardcoded AFAICT. The environment variable only worked for isql and not when using ODBC from my program.
The latest version from Microsoft in the 17 series is 17.10.2.1. From opensnoop logging appears to use openssl3, though still searches /usr/local/opt/openssl/lib first
2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.3.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.3.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib/libcrypto.dylib 2023 Mar 29 10:45:56 695855688 13398 perl -1 /usr/local/opt/openssl/lib 2023 Mar 29 10:45:56 695855688 13398 perl 11 /opt/local/lib/libcrypto.3.dylib 2023 Mar 29 10:45:56 695855688 13398 perl 11 /opt/local/libexec/openssl3/lib/libcrypto.3.dylib
I'll augment that PR.
comment:7 Changed 20 months ago by roederja
Look at this commit where I removed the note following the release that included the macports path: https://github.com/microsoft/homebrew-mssql-release/issues/45 . It must have stopped working because of the openssl version change.
comment:8 Changed 20 months ago by kiwiroy (Roy Storey)
PR augmented and now includes a version update for mssql-tools since that is also mentioned in this ticket.
comment:9 Changed 20 months ago by roederja
So the sym link is not needed after all? I saw you removed the note again
comment:10 Changed 20 months ago by Roy Storey <kiwiroy@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:11 Changed 19 months ago by roederja
@Kiwiroy: Someone raied #67205 - it seems like it's now broken on arm. Do you have a way to test/fix this?
With openssl11 installed this workaround enables connection with isql.