pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

Fix broken compilation on M1 macs - sbcl is loading libcrypto in unsafe way

Open memegauste opened this issue 4 years ago • 3 comments

Last 15 lines from /Users/patryk/Library/Logs/Homebrew/pgloader/01.make:
                         --load local-projects/pgloader-3.6.2/src/hooks.lisp              \
                         --load-system pgloader                    \
                         --eval '(setf pgloader.params::*version-string* "3.6.2")' \
                         --entry pgloader:main                        \
                         --dynamic-space-size 4096              \
                         --compress-core                         \
                         --output bin/pgloader.tmp
;; loading system "cffi"
;; loading system "cl+ssl"
WARNING: /opt/homebrew/Cellar/sbcl/2.1.6/libexec/bin/sbcl is loading libcrypto in an unsafe way
fatal error encountered in SBCL pid 61731 pthread 0x104a53d40:
SIGABRT received.

   0:     0x16b797d18 pc=0x1a0c30e60 
make: *** [bin/pgloader] Error 1

memegauste avatar Jul 28 '21 07:07 memegauste

FWIW, this is still an ongoing issue. Additionally, I get this error when I try to make:

(CFFI::FL-ERROR "Unable to load foreign library (~A).~%  ~A" LIBCRYPTO #<(SIMPLE-BASE-STRING 330) Error opening shared object "/usr/local/Cellar/[email protected]/1.1.1l_1/lib/libcrypto.1.1.dylib":
  dlopen(/usr/local/Cellar/[email protected]/1.1.1l_1/lib/libcrypto.1.1.dylib, 0x000A): tried: '/usr/local/Cella... {70086D862F}>)
   source: (ERROR 'LOAD-FOREIGN-LIBRARY-ERROR :FORMAT-CONTROL CONTROL
                  :FORMAT-ARGUMENTS ARGUMENTS)

(Apologies if I'm doing something silly, I'm an amateur web dev who would simply use brew if that was working.)

CharlesWiltgen avatar Mar 31 '22 19:03 CharlesWiltgen

I'm not able to get this to work either.

david@sodium /tmp> pgloader mysql_dump.sql postgresql://SOMEDBSOMEWHERE

debugger invoked on a SIMPLE-ERROR in thread #<THREAD "main thread" RUNNING {700B590003}>: Problem running initialization hook #<FUNCTION OPEN-FOREIGN-LIBS>: Unable to load foreign library (LIBCRYPTO). Error opening shared object "/usr/local/Cellar/openssl@3/3.2.1/lib/libcrypto.3.dylib": dlopen(/usr/local/Cellar/openssl@3/3.2.1/lib/libcrypto.3.dylib, 0x000A): tried: '/usr/local/Cellar/openssl@3/3.2.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/openssl@3/3.2.1/lib/libcrypto.3.dylib' (no such file), '/usr/local/Cellar/openssl@3/3.2.1/lib/libcrypto.3.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')).

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Skip this initialization hook. 1: [ABORT ] Exit from the current thread.

(SB-INT:CALL-HOOKS "initialization" (#<FUNCTION OPEN-FOREIGN-LIBS>) :ON-ERROR :ERROR) 0]

I did only a brew install on an M1 mac and I'm not able to get it to run.

davidawad avatar Mar 28 '24 20:03 davidawad