Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

compile static binaries +opencobol
How does one compile static binaries with opencobol under FreeBSD? I don't
see any options to do this in the literature, and the resulting binaries
obviously will not function on other systems where the cobol libraries are
not installed. Error below is from trying to excute the result of "cobc
count.cbl" on a different system.

[host]user:~/cobol$ ./count
/usr/libexec/ld-elf.so.1: Shared object "libcob.so.1" not found, required
by "count"





Report this thread to moderator Post Follow-up to this message
Old Post
Cydrome Leader
09-26-05 11:55 PM


Re: compile static binaries +opencobol
On 26/09/2005 9:11 AM, Cydrome Leader wrote:
> How does one compile static binaries with opencobol under FreeBSD? I don't
> see any options to do this in the literature, and the resulting binaries
> obviously will not function on other systems where the cobol libraries are
> not installed. Error below is from trying to excute the result of "cobc
> count.cbl" on a different system.
>
> [host]user:~/cobol$ ./count
> /usr/libexec/ld-elf.so.1: Shared object "libcob.so.1" not found, required
> by "count"
>
That would be the run-time environment, I guess.  The docs are thin, but
did you try:
<http://www.opencobol.org/modules/bw... />
ontent_1_1>

The variable COB_LDFLAGS should accept the right options to make static
libs, that you can then make into a library, or link to your app to make
a FreeBSD ELF executable.

If not, then perhaps the run-time environment does not support static
linking.  I'd expect this to be in the OpenCOBOL docs somewhere.

Report this thread to moderator Post Follow-up to this message
Old Post
clvrmnky
09-26-05 11:55 PM


Re: compile static binaries +opencobol
> How does one compile static binaries with opencobol
> under FreeBSD? I don't see any options to do this in
> the literature,

I don't know that you can create a static binary at all. You can use
-fstatic-call to incorporate your own called programs statically, but
not the underlying runtime.

> and the resulting binaries obviously will not function on
> other systems where the cobol libraries are not
> installed.

What is the problem with installing the runtime libraries on the target
machine ?  Just install OpenCobol and then install your programs.


Report this thread to moderator Post Follow-up to this message
Old Post
Richard
09-26-05 11:55 PM


Re: compile static binaries +opencobol
Richard <riplin@azonic.co.nz> wrote: 
>
> I don't know that you can create a static binary at all. You can use
> -fstatic-call to incorporate your own called programs statically, but
> not the underlying runtime.
> 
>
> What is the problem with installing the runtime libraries on the target
> machine ?  Just install OpenCobol and then install your programs.

disk space is cheaper than the time it takes to install/remove/track/audit
programming environments on various machines.

Report this thread to moderator Post Follow-up to this message
Old Post
Cydrome Leader
09-26-05 11:55 PM


Re: compile static binaries +opencobol
> disk space is cheaper than the time it takes to install/remove/track/audit
> programming environments on various machines.

Then build an RPM or PKG or whatever is used by the systems that you
want to target and have this install the libcobc and everything else
that is required as it installs your program.

OpenCobol may also require libdb, libltdl, libgpm, ncurses and much
else, and these will rely on libc and others and may require a specific
version.  You may include checks in the RPM or PKG for all the required
libraries. You may even include RPM or PKG for these on your
distribution media.

Alternately you could purchase a Cobol implementation that takes care
of all these fiddling details for you, or at least has existing
solutions, but that will cost money.

If you write in Perl you need to ensure that there is a Perl system
installed, same with Python, Java, even C#, and these may need to be of
a specific version and/or have additional modules or packages
installed. OpenCobol is no different.


Report this thread to moderator Post Follow-up to this message
Old Post
Richard
09-27-05 02:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:48 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.