crypto-chassis/ccapi

cannot find OpenSSL on Centos 8

deflexor opened this issue · 3 comments

Describe the bug

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
version "1.1.1g")

To Reproduce
Steps to reproduce the behavior:
mkdir app/build
cd app/build
rm -rf * (if rebuild from scratch)
cmake -DCMAKE_PROJECT_INCLUDE=<path-to-user_specified_cmake_include> ..
cmake --build . -j

Expected behavior
I guess it should build

Additional context
openssl openssl-libs openssl-devel openssl-pkcs11 - are installed

adding -DOPENSSL_ROOT_DIR=? (/usr /usr/lib, ...) doesnt help

Let me investigate. For now the following workaround should work:

curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1k.tar.gz
tar -zxvf OpenSSL_1_1_1k.tar.gz
cd openssl-OpenSSL_1_1_1k
./config
make
sudo make install
cat <<EOT >> ~/.bash_profile
export PATH=/usr/local/bin:$PATH
export OPENSSL_ROOT_DIR=/usr/local/ssl
EOT
source ~/.bash_profile

Thank you, it compiles now, but refuses to run:

[2021-09-26T16:18:27.787084349Z] ******** Trading mode is paper! ********
[2021-09-26T16:18:28.208526518Z] ********
[2021-09-26T16:18:28.208854921Z] Received an event: Event [
  type = RESPONSE,
  messageList = [
    Message [
      type = GET_INSTRUMENT,
      recapType = UNKNOWN,
      time = 1970-01-01T00:00:00.000000000Z,
      timeReceived = 2021-09-26T16:18:28.208310842Z,
      elementList = [
        Element [
          nameValueMap = {
            BASE_ASSET = PHB,
            INSTRUMENT = PHBTUSD,
            PRICE_INCREMENT = 0.00000100,
            QUANTITY_INCREMENT = 0.10000000,
            QUOTE_ASSET = TUSD
          }
        ]
      ],
      correlationIdList = [ GET_INSTRUMENT ]
    ]
  ]
]
[2021-09-26T16:18:28.209002637Z] Base asset balance is 300, quote asset balance is 15000.
[2021-09-26T16:18:28.209061682Z] Order price increment is 0.000001
[2021-09-26T16:18:28.209079721Z] Order quantity increment is 0.1
./run.sh: line 5: 177083 Segmentation fault      (core dumped) ~/ccapi/app/build/src/spot_market_making/spot_market_making

@deflexor Friend us on https://discord.gg/b5EKcp9s8T and we'll have some private discussions there because we may or may not need to know (hopefully not) some of your parameter values to see where the source of the singularity happens.