Opened 15 months ago
Closed 5 weeks ago
#4879 closed defect (fixed)
Fix macOS Monterey compile issues
Reported by: | ohmza | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | General |
Severity: | high | Keywords: | |
Cc: | Sensitive: | no |
Description (last modified by )
Three files on source code need to be changed in order to make oscam being able to be compiled on macOS Monterey.
First, on Makefile
Change:
ifeq ($(uname_S),Darwin) DEFAULT_LIBUSB_FLAGS = -I/opt/local/include DEFAULT_LIBUSB_LIB = -L/opt/local/lib -lusb-1.0 DEFAULT_PCSC_FLAGS = -isysroot $(OSX_SDK) DEFAULT_PCSC_LIB = -isysroot $(OSX_SDK) -framework IOKit -framework CoreFoundation -framework PCSC else
To:
ifeq ($(uname_S),Darwin) FIX_OPENSSL_FLAGS_DIR := $(shell ln -sf /usr/local/opt/openssl@1.1/include/openssl /usr/local/include) FIX_OPENSSL_LIB_DIR := $(shell ln -sf /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/lib) FIX_OPENSSL_LIBCRYPTO_DIR := $(shell ln -sf /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /usr/local/lib) DEFAULT_LIBCRYPTO_LIB = -L/usr/local/opt/openssl@1.1/lib -lcrypto DEFAULT_SSL_LIB = -L/usr/local/opt/openssl@1.1/lib -lssl DEFAULT_LIBUSB_FLAGS = -I/usr/local/opt/libusb/include DEFAULT_LIBUSB_LIB = -L/usr/local/opt/libusb/lib -lusb-1.0 -framework IOKit -framework CoreFoundation -framework Security DEFAULT_PCSC_FLAGS = -I/usr/local/opt/pcsc-lite/include/PCSC DEFAULT_PCSC_LIB = -L/usr/local/opt/pcsc-lite/lib -framework IOKit -framework CoreFoundation -framework PCSC else
Second, on globals.h
Change:
#include <sys/sysmacros.h>
To:
#if !defined(__APPLE__) #include <sys/sysmacros.h> #endif
Lastly, on csctapi/ifd_pcsc.c
Change:
#if defined(__CYGWIN__) #define __reserved #define __nullnullterminated #include <specstrings.h> #include <WinSCard.h> #else #include <PCSC/pcsclite.h> #include <PCSC/winscard.h> #include <PCSC/wintypes.h> #if !defined(__APPLE__) #include <PCSC/reader.h> #endif #endif
To:
#if defined(__CYGWIN__) #define __reserved #define __nullnullterminated #include <specstrings.h> #include <WinSCard.h> #endif #if !defined(__CYGWIN__) #if !defined(__APPLE__) #include <PCSC/pcsclite.h> #include <PCSC/winscard.h> #include <PCSC/wintypes.h> #include <PCSC/reader.h> #endif #endif #if defined(__APPLE__) #include "pcsclite.h" #include "winscard.h" #include "wintypes.h" #include "reader.h" #endif
With all of the above changes, you should be able to compile oscam on macOS Monterey with a single command below:
make USE_PCSC=1 USE_LIBUSB=1
Change History (8)
follow-up: 2 comment:1 by , 15 months ago
Description: | modified (diff) |
---|
comment:2 by , 15 months ago
In case of the compilation resulted in errors about libusb, pcsc-lite or openssl. Try to run
brew install libusb pcsc-lite openssl@1.1
first and then re-run make USE_PCSC=1 USE_LIBUSB=1
to compile the oscam again.
comment:3 by , 15 months ago
Description: | modified (diff) |
---|
Fix broken smartreader due to previous fix.
comment:4 by , 15 months ago
Description: | modified (diff) |
---|
Preliminary fix for openssl compilation error issues.
comment:5 by , 15 months ago
Description: | modified (diff) |
---|
Incompleted fix for openssl compilation errors issues.
comment:6 by , 15 months ago
Description: | modified (diff) |
---|
Completed fix for openssl compilation errors issues.
comment:7 by , 5 weeks ago
Description: | modified (diff) |
---|---|
Summary: | Fix macOS Monterey compilation issues → Fix macOS Monterey compile issues |
Add reader header for pcsc
comment:8 by , 5 weeks ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed and tested with Changeset 11725.
Fix broken CYGWIN compilation due to previous fix.