Discussion:
Problem with pointers to files.
(too old to reply)
j***@wexfordpress.com
2018-04-17 21:30:13 UTC
Permalink
Raw Message
I just installed Gnu-Cobol 2.2. I compiled a ridiculously simple example and it failed because it couldn't find a particular library when executed. But I could find it, sort of. Here is what I found after I searched:
----------------------------------------------------
ls -l libcob*
-rw-r--r-- 1 root root 646690 Apr 17 20:35 libcob.a
-rwxr-xr-x 1 root root 984 Apr 17 20:35 libcob.la
lrwxrwxrwx 1 root root 15 Apr 17 20:35 libcob.so -> libcob.so.4.0.0
lrwxrwxrwx 1 root root 15 Apr 17 20:35 libcob.so.4 -> libcob.so.4.0.0
-rwxr-xr-x 1 root root 395344 Apr 17 20:35 libcob.so.4.0.0

I fixed it with this code:

------------------------------------

bash-4.4# cp libcob.so.4.0.0 libcob.so.4
cp: 'libcob.so.4.0.0' and 'libcob.so.4' are the same file
bash-4.4# rm libcob.so.4
bash-4.4# cp libcob.so.4.0.0 libcob.so.4
-----------------------------------------------


This is not the first time that pointers to another file have failed when I tried to compile something. My slackware version is Slackware current dated 10/11/2017.
I will back up to slack14, reload Cobol 2.2 and see if the problem goes away.
If that works ok then something needs to be fixed in
slackware Current before Slack 15 is released.
I recognize that Current is not fully tested. I post this problem to alert Pat and others to this problem.

On another problem with TeX I am glad that the totally obsolete version was eliminated and a cut down version of a recent Texlive was substituted. As a regular user of TeX I will still download the entire version of the current
Texlive. But at least I won't have to remember to eliminate the ancient version
on each loading of slackware 15.

Maybe Slackware 15 will need to be broken up into two DVD's.

I have other distros on alternate partitions. But as a Slack user since the days of floppy disks I don't want to abandon it. It is just too convenient in many ways.

John Culleton.
Sylvain Robitaille
2018-04-18 16:44:08 UTC
Permalink
Raw Message
Post by j***@wexfordpress.com
I just installed Gnu-Cobol 2.2. I compiled a ridiculously simple
example and it failed because it couldn't find a particular library
when executed. ...
Did you run ldconfig after installing the software? (if you install
with installpkg, ldconfig is run as a side-effect, but if you install
otherwise, you need to run ldconfig).

Is the directory where you found libcob.so and its related symbolic
links listed in /etc/ld.so.conf? If not, you'll need to adjust that
prior to running ldconfig.

I hope that helps.
--
----------------------------------------------------------------------
Sylvain Robitaille ***@encs.concordia.ca

Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
----------------------------------------------------------------------
Cary
2018-04-19 02:26:11 UTC
Permalink
Raw Message
Why not post the cobol program ?
Others running Current could then more
easily try to reproduce what could be a serious issue.
Post by j***@wexfordpress.com
I just installed Gnu-Cobol 2.2. I compiled a ridiculously simple example
and it failed because it couldn't find a particular library when executed.
....
Post by j***@wexfordpress.com
I have other distros on alternate partitions. But as a Slack user
since the days of floppy disks I don't want to abandon it.
It is just too convenient in many ways.
John Culleton.
---------
***@sdf.org
http://sdf.org
Richard Kettlewell
2018-04-19 07:48:42 UTC
Permalink
Raw Message
Post by j***@wexfordpress.com
I just installed Gnu-Cobol 2.2. I compiled a ridiculously simple
example and it failed because it couldn't find a particular library
when executed. But I could find it, sort of. Here is what I found
----------------------------------------------------
ls -l libcob*
-rw-r--r-- 1 root root 646690 Apr 17 20:35 libcob.a
-rwxr-xr-x 1 root root 984 Apr 17 20:35 libcob.la
lrwxrwxrwx 1 root root 15 Apr 17 20:35 libcob.so -> libcob.so.4.0.0
lrwxrwxrwx 1 root root 15 Apr 17 20:35 libcob.so.4 -> libcob.so.4.0.0
-rwxr-xr-x 1 root root 395344 Apr 17 20:35 libcob.so.4.0.0
What’s wrong with that?
Post by j***@wexfordpress.com
------------------------------------
bash-4.4# cp libcob.so.4.0.0 libcob.so.4
cp: 'libcob.so.4.0.0' and 'libcob.so.4' are the same file
bash-4.4# rm libcob.so.4
bash-4.4# cp libcob.so.4.0.0 libcob.so.4
-----------------------------------------------
The aliases for libraries are supposed to be symlinks, not copies.
--
https://www.greenend.org.uk/rjk/
Loading...