K2InformaticsGmbH / oranif

Oracle OCI driver using dirty NIF
Apache License 2.0
4 stars 2 forks source link

include paths and lib flags optimization #75

Closed c-bik closed 5 years ago

c-bik commented 5 years ago

ERL_INTERFACE_DIR (files and libs) aren't used in NIF OTP_ERTS_DIR autodetect from installation

acautin commented 5 years ago

@c-bik this doesn't if installing erlang in a different location, for example I use kerl to manage my erlang versions. Can we allow the user to defineOTP_ERTS_DIR and only try to detect it if not there?

Ref:

gcc -o priv/dpi_nif.so -ggdb -Wall -fPIC -shared -std=c11 -dynamiclib  -Ic_src -I"`find /usr/lib/erlang/ -maxdepth 1 -type d -name erts-*`/include" -I"c_src/odpi/include" -Lc_src/odpi/lib -lodpic -flat_namespace -undefined suppress c_src/dpi_nif.c c_src/dpiContext_nif.c c_src/dpiConn_nif.c c_src/dpiStmt_nif.c c_src/dpiData_nif.c c_src/dpiQueryInfo_nif.c c_src/dpiVar_nif.c
find: /usr/lib/erlang/: No such file or directory
c-bik commented 5 years ago

@acautin I haven't considered that! Let just throw error it user haven't defined OTP_ERTS_DIR. Trusting autodetects is always risky!

acautin commented 5 years ago

closing in favor of https://github.com/K2InformaticsGmbH/oranif/tree/travis_integration