Git Product home page Git Product logo

Comments (3)

yutaro-sakamoto avatar yutaro-sakamoto commented on August 16, 2024 1

I removed the description of LD_PRELOAD in README and created a new wiki page for Ubuntu users.
I will fix this issue in the future.

from open-cobol-esql.

yutaro-sakamoto avatar yutaro-sakamoto commented on August 16, 2024

It seems difficult to solve this issue.
I added note to README.

from open-cobol-esql.

GitMensch avatar GitMensch commented on August 16, 2024

LD_PRELOAD is a quite bad hack, with that README note people will likely export it which commonly breaks something and tells the dynamic link loader to do this for every executable. The issue is that libcob does not find the module, very likely because the actual CALL is a dynamic one and/or the dynamic linker removed the "unused" library.

To work around this each of the following solutions should work;

  • let ocesql generate the CALLs as CALL STATIC 'OCESQLConnect' ... (cobc will directly insert the library call, the dynamic linker will resolve that from libocesql
  • let cobc generate all calls to literals as static itself - same effect cobc -static -m ...
  • tell the linker to not drop the "unused" library, by passing -Wl,--no-as-needed (depending on the cobc used that can be passed via -Q or by overriding cobc's linker call via environment variables)

... or: use COB_PRE_LOAD to load the library, or relink libcob/cobcrun to have the library linked with the -Wl,--no-as-needed option.

from open-cobol-esql.

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.