Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Bundling Sybase dll using perl2exe

by Anonymous Monk
on Dec 09, 2013 at 12:11 UTC ( #1066274=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi perl Monks, I am trying to build a stanbdalone application using perl2exe which can run on the system where Perl is not installed nor the Sybase client/Sybase driver files are present. I have tried to bundle the libct.dll and all the other dll's from Sybase client folder but in vain, I still get the error, can anyone help me with this issue? Is there any way to bundle all the supporting files so that my application exe can run on system where perl and sybase client/driver is not installed. Thanks, Mansi

Replies are listed 'Best First'.
Re: Bundling Sybase dll using perl2exe
by jfroebe (Parson) on Dec 09, 2013 at 19:08 UTC
      Dear Monks, Thanks for your reply, I really don't want to make the Sybase Open Client as a requirement and if possible bundle the required dll/obj files with my appplication. The error which I get when I bundle most of the dll's is The context allocation routine failed when it tried to load localization files!! One or more following problems may caused the failure Your sybase home directory is c:\sql10. Your sybase home directory is c:\sql10. Check the environment variable SYBASE if it is not the one you want! Check the environment variable SYBASE if it is not the one you want! Cannot access file c:\sql10\ini\objectid.dat I have bundled the objectid.dat file also in my application exe, I still get this error as well DBD_alloc method fails. Thanks, Mansi

        The official method is to install OpenClient. If you want a self contained binary, you're basically out of luck.

        Another option is to use Sybase's JDBC driver (jConnect) with DBD::JDBC. However, using DBD::JDBC will require you to have Java installed somewhere... then it comes down to, if you require Java, why are you using Perl? Catch-22

        Jason L. Froebe

        Blog, Tech Blog

        Just an update, the exact error for alloc method is: DBD::Sybase initialize :cx_ctx_alloc(112) failed at PERL2EXE/STORAGE/ line 214.
Re: Bundling Sybase dll using perl2exe
by karlgoethebier (Abbot) on Dec 09, 2013 at 18:55 UTC

    OK...i guess too: What about your Sybase environment?

    IMHO you should have this in your app:

    BEGIN { $ENV{LANG}=q(C); $ENV{SYBASE}=q(/opt/sybase); }

    And what about the errors you get :-(


    Seems my post is off topic too...


    Reading my post again the day after i think it wasn't so inferior as suspected.

    As jfroebe wrote:

    "You basically need to include a large chunk of the $SYBASE directory. You're better off simply making the installation of Sybase (now SAP) Open Client a requirement."

    In other words: "What about the Sybase environment?"

    BTW, another (old) story about perl2exe by merlyn: perl2exe - no more secrets.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: Bundling Sybase dll using perl2exe
by taint (Chaplain) on Dec 09, 2013 at 15:54 UTC

    It would probably be more helpful to pinpoint the problem you indicate you're having. If you indicated what the "error" you get, actually is. :)


    Yes. What say about me, is true.
Re: Bundling Sybase dll using perl2exe
by wazat (Monk) on Dec 09, 2013 at 19:05 UTC

    This might be slightly off topic, but, what is the Sybase client licensing model? Does Sybase allow unlimited client software installs, or are they limited? If they are limited then what you are attempting may be in violation of your license.

      Sybase licensing is at the server level.

      Jason L. Froebe

      Blog, Tech Blog

        That is sane. Not having sysbase experience, I didn't know if they might be using a dinosaur licensing model.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1066274]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2021-12-06 11:51 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (32 votes). Check out past polls.