Opened 6 years ago

Last modified 5 years ago

#58342 assigned defect

pyscopg2 2.8.1: library not found for -lssl

Reported by: Tatsh (Andrew Udvare) Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-psycopg2

Description

Getting this strange error at linking stage, despite having OpenSSL installed.

:info:build /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -arch x86_64 build/temp.macosx-10.14-x86_64-3.7/psycopg/psycopgmodule.o build/temp.macosx-10.14-x86_64-3.7/psycopg/green.o build/temp.macosx-10.14-x86_64-3.7/psycopg/pqpath.o build/temp.macosx-10.14-x86_64-3.7/psycopg/utils.o build/temp.macosx-10.14-x86_64-3.7/psycopg/bytes_format.o build/temp.macosx-10.14-x86_64-3.7/psycopg/libpq_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/win32_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/solaris_support.o build/temp.macosx-10.14-x86_64-3.7/psycopg/connection_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/connection_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/cursor_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/cursor_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/column_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_connection_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_cursor_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/replication_message_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/diagnostics_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/error_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/conninfo_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/lobject_int.o build/temp.macosx-10.14-x86_64-3.7/psycopg/lobject_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/notify_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/xid_type.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_asis.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_binary.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_datetime.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_list.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pboolean.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pdecimal.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pint.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_pfloat.o build/temp.macosx-10.14-x86_64-3.7/psycopg/adapter_qstring.o build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols.o build/temp.macosx-10.14-x86_64-3.7/psycopg/microprotocols_proto.o build/temp.macosx-10.14-x86_64-3.7/psycopg/typecast.o -L/opt/local/lib/postgresql10 -lpq -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/psycopg2/_psycopg.cpython-37m-darwin.so
:info:build ld: library not found for -lssl
 $ port contents openssl | fgrep libssl
  /opt/local/lib/libssl.1.0.0.dylib
  /opt/local/lib/openssl-1.0/libssl.1.0.0.dylib
  /opt/local/lib/openssl-1.0/libssl.a
  /opt/local/lib/openssl-1.0/libssl.dylib
  /opt/local/lib/openssl-1.0/pkgconfig/libssl.pc
  /opt/local/lib/pkgconfig/libssl.pc
 $ ls -la /opt/local/lib/libssl.1.0.0.dylib
lrwxr-xr-x 1 root admin 30 2019-03-25 23:37:46 /opt/local/lib/libssl.1.0.0.dylib -> openssl-1.0/libssl.1.0.0.dylib

Attachments (1)

main.log (33.1 KB) - added by Tatsh (Andrew Udvare) 6 years ago.
build log

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by Tatsh (Andrew Udvare)

Attachment: main.log added

build log

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Your openssl port's contents do not appear to be correct. This is what I see on my system:

$ port -v installed openssl
The following ports are currently installed:
  openssl @1.0.2r_0+universal (active) platform='darwin 17' archs='i386 x86_64' date='2019-03-29T02:52:05-0500'
$ port contents openssl | fgrep libssl
  /opt/local/lib/libssl.1.0.0.dylib
  /opt/local/lib/libssl.a
  /opt/local/lib/libssl.dylib
  /opt/local/lib/pkgconfig/libssl.pc
$

Have you modified your openssl port?

comment:2 Changed 6 years ago by Tatsh (Andrew Udvare)

Sorry, wrong place. I am using another version of the port.

comment:3 Changed 6 years ago by mf2k (Frank Schima)

Cc: nerdling removed
Owner: set to nerdling
Port: py-psycopg2 added; py37-psycopg2 removed
Status: newassigned

comment:4 Changed 6 years ago by RJVB (René Bertin)

FWIW, this looks to be caused by psycopg2 not using the libssl.pc file.

comment:5 Changed 5 years ago by nerdling (Jeremy Lavergne)

Tatsh: which version of openssl port are you using? I don't have a means of replicating the problem: trace mode is happy on my end with openssl paths like ryandesign:

$ port contents openssl | grep libssl
  /opt/pspp/lib/libssl.1.0.0.dylib
  /opt/pspp/lib/libssl.a
  /opt/pspp/lib/libssl.dylib
  /opt/pspp/lib/pkgconfig/libssl.pc

Build succeeds for me under trace mode:

$ sudo port -Ntu install py37-psycopg2
--->  Computing dependencies for py37-psycopg2
--->  Fetching distfiles for py37-psycopg2
--->  Verifying checksums for py37-psycopg2
--->  Extracting py37-psycopg2
--->  Applying patches to py37-psycopg2
--->  Configuring py37-psycopg2
--->  Building py37-psycopg2
Warning: The following existing file was hidden from the build system by trace mode:
  /var/db/timezone/zoneinfo/America/New_York
--->  Staging py37-psycopg2 into destroot
Warning: The following existing files were hidden from the build system by trace mode:
  /var/db/timezone/zoneinfo/America/New_York
  /var/root/.CFUserTextEncoding
--->  Installing py37-psycopg2 @2.8.2_0+postgresql11
--->  Activating py37-psycopg2 @2.8.2_0+postgresql11
--->  Cleaning py37-psycopg2
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.
$ port -v installed py37-psycopg2
The following ports are currently installed:
  py37-psycopg2 @2.8.2_0+postgresql11 (active) platform='darwin 17' archs='x86_64' date='2019-05-18T14:45:27-0400'

RJVB/ryandesign: short of converting the dependency from path: to port: or a worksforme, any other suggestions?

Note: See TracTickets for help on using tickets.