Giter VIP home page Giter VIP logo

Comments (11)

c-bik avatar c-bik commented on August 11, 2024

I don't have a mac to test a fix for this, but I know someone has already fixed and tested it. Asked for a patch for it, hopefully will get it soon.

from erloci.

c-bik avatar c-bik commented on August 11, 2024

Please confirm if aabf37b works for you?

from erloci.

c-bik avatar c-bik commented on August 11, 2024

@homeway can you please verify and provide some feedback on this? (or close the issue if its fixed for you)

from erloci.

homeway avatar homeway commented on August 11, 2024

I m very sorry!! But I still got an error to building yet : (

ld: library not found for -locci?

$ rebar co
==> erloci (compile)
g++ -Wall -L/Users/homeway/erlang/erts/17.3/lib/erl_interface-3.7.18/lib -Lpriv -L/Users/homeway/Applications/oracle_client_sdk_11_2/lib priv/liberloci.a c_src/erloci_drv/cmd_queue.o c_src/erloci_drv/command.o c_src/erloci_drv/erloci.o c_src/erloci_drv/logger.o c_src/erloci_drv/marshal.o c_src/erloci_drv/port.o c_src/erloci_drv/term.o c_src/erloci_drv/threadpool.o c_src/erloci_drv/threads.o c_src/erloci_drv/transcoder.o -levent -lpthread -lerl_interface -lei -lerloci -locci -lclntsh -lnnz11 -o priv/ocierl
ld: library not found for -locci
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [priv/ocierl] Error 1
ERROR: Command [compile] failed!

from erloci.

homeway avatar homeway commented on August 11, 2024

I have an oracle client lib in /opt/oracle/instantclient_11_2

$ ls -l /opt/oracle/instantclient_11_2/
total 382912
-rw-rw-rw-@ 1 homeway  wheel        484  2 15  2013 BASIC_README
-rw-rw-rw-@ 1 homeway  wheel        488  3 15  2013 SQLPLUS_README
-rwxrwxrwx@ 1 homeway  wheel      10252  2 15  2013 adrci
-rwxrwxrwx@ 1 homeway  wheel      40768  2 15  2013 genezi
-r--r--r--@ 1 homeway  wheel        368  4 10  2011 glogin.sql
lrwxr-xr-x  1 root     wheel         20  9 10  2013 libclntsh.dylib -> libclntsh.dylib.11.1
-rwxrwxrwx@ 1 homeway  wheel   64771444 12 19  2012 libclntsh.dylib.11.1
-rwxrwxrwx@ 1 homeway  wheel    2808528  2 15  2013 libnnz11.dylib
-rwxrwxrwx@ 1 homeway  wheel    1897664 12 19  2012 libocci.dylib.11.1
-rwxrwxrwx@ 1 homeway  wheel  118379468  2 15  2013 libociei.dylib
-rwxrwxrwx@ 1 homeway  wheel     158924 12 19  2012 libocijdbc11.dylib
-rwxrwxrwx@ 1 homeway  wheel    1385860  3 15  2013 libsqlplus.dylib
-rwxrwxrwx@ 1 homeway  wheel    1504252  3 15  2013 libsqlplusic.dylib
-rw-rw-rw-@ 1 homeway  wheel    2095661  5 29  2012 ojdbc5.jar
-rw-rw-rw-@ 1 homeway  wheel    2714016  5 29  2012 ojdbc6.jar
drwxrwxrwx@ 8 homeway  wheel        272  9 10  2013 sdk
-rwxr-xr-x@ 1 homeway  wheel       8744  3 15  2013 sqlplus
-rwxrwxrwx@ 1 homeway  wheel     162324  2 15  2013 uidrvci
-rw-rw-rw-@ 1 homeway  wheel      66779 12 19  2012 xstreams.jar

this is my bash_profile:

$ cat ~/.bash_profile
...
## oracle client setting
export ORACLE_HOME=/opt/oracle/instantclient_11_2/
export DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2
export INSTANT_CLIENT_LIB_PATH=/Users/homeway/Applications/oracle_client_sdk_11_2/lib
export INSTANT_CLIENT_INCLUDE_PATH=/Users/homeway/Applications/oracle_client_sdk_11_2/sdk/include
export ERL_INTERFACE_DIR=/Users/homeway/erlang/erts/17.4/lib/erl_interface-3.7.20/
...

from erloci.

c-bik avatar c-bik commented on August 11, 2024

DYLD_LIBRARY_PATH and INSTANT_CLIENT_* has different path prefix

Can you try with a single copy of the library?

from erloci.

homeway avatar homeway commented on August 11, 2024

I try it and got a same result:

$ cat ~/.bash_profile
## oracle client setting
export ORACLE_HOME=/opt/oracle/instantclient_11_2/
export DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2
export INSTANT_CLIENT_LIB_PATH=/opt/oracle/instantclient_11_2
export INSTANT_CLIENT_INCLUDE_PATH=/opt/oracle/instantclient_11_2/sdk/include/
export ERL_INTERFACE_DIR=/Users/homeway/erlang/erts/17.4/lib/erl_interface-3.7.20/
...

$ . ~/.bash_profile

$ rebar co
==> erloci (compile)
g++ -Wall -L/Users/homeway/erlang/erts/17.4/lib/erl_interface-3.7.20//lib -Lpriv -L/opt/oracle/instantclient_11_2 priv/liberloci.a c_src/erloci_drv/cmd_queue.o c_src/erloci_drv/command.o c_src/erloci_drv/erloci.o c_src/erloci_drv/logger.o c_src/erloci_drv/marshal.o c_src/erloci_drv/port.o c_src/erloci_drv/term.o c_src/erloci_drv/threadpool.o c_src/erloci_drv/threads.o c_src/erloci_drv/transcoder.o -levent -lpthread -lerl_interface -lei -lerloci -locci -lclntsh -lnnz11 -o priv/ocierl
ld: library not found for -locci
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [priv/ocierl] Error 1
ERROR: Command [compile] failed!

from erloci.

c-bik avatar c-bik commented on August 11, 2024

This is clearly a library file availability issue. And perhaps a path problem.
Can you compile any c/c++ that links to occi?

from erloci.

acautin avatar acautin commented on August 11, 2024

Hi, probably there is a step missing on the documentation, libocci.dylib.11.1 should have a symbolic link or be renamed to libocci.dylib to be found.
Should be the same for other libs.

from erloci.

c-bik avatar c-bik commented on August 11, 2024

@agustin,

If you have it working with a symbolic link will you please make a pull request to erloci/README with that mac specific info?

That will be super great!

Thanks a lot.

@homeway Can you try what @acautin proposed?

from erloci.

homeway avatar homeway commented on August 11, 2024

Yes ! compiled!!!

$ ln libocci.dylib.11.1 libocci.dylib

Thanks @acautin and @c-bik !

$ rebar co
==> erloci (compile)
g++ -Wall -L/Users/homeway/erlang/erts/17.4/lib/erl_interface-3.7.20//lib -Lpriv -L/opt/oracle/instantclient_11_2 priv/liberloci.a c_src/erloci_drv/cmd_queue.o c_src/erloci_drv/command.o c_src/erloci_drv/erloci.o c_src/erloci_drv/logger.o c_src/erloci_drv/marshal.o c_src/erloci_drv/port.o c_src/erloci_drv/term.o c_src/erloci_drv/threadpool.o c_src/erloci_drv/threads.o c_src/erloci_drv/transcoder.o -levent -lpthread -lerl_interface -lei -lerloci -locci -lclntsh -lnnz11 -o priv/ocierl
erloci compiled!!!
Compiled src/erloci.erl
Compiled src/oci_logger.erl
Compiled src/oci_port.erl
Compiled src/oci_util.erl

from erloci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.