On Mon, 24 Feb 2025 14:51:27 +0100
Richard Biener <richard.guent...@gmail.com> wrote:

> Compiling a Cobol Hello World results in
> 
> > ./install/gcc-cobol/usr/local/bin/gcobol t.cob
> /usr/bin/ld: cannot find -lgcobol: No such file or directory
> collect2: error: ld returned 1 exit status
> 
> possibly because the 64bit libcobol is installed in
> /foo/usr/local/lib/ rather than .../lib64/ and
> the former is not in the configured search directory.

I spent all day working on this problem, and need guidance with
libtool.  The immediate problem is:

> autoreconf
> configure.ac:72: warning: LTOPTIONS_VERSION is m4_require'd but not m4_defun'd
> ../libtool.m4:67: LT_INIT is expanded from...
> configure.ac:72: the top level

The consensus on IRC is to use automake, which is fine, and libtool, about 
which I have never had anything good to say from the day I encountered it.  
But, enough about me.  Let's talk about libgcobol.  

On our parser branch I introduced automake in to configure.ac and added a new 
file, Makefile.am. My goal was to make sure libgcobol can be built and 
configured independently of gcc; after that to make any needed gcc adaptations. 
 But "independent" isn't quite possible, because for consistency gcc uses its 
own in-tree libtool.  Totally understandable.  

What I don't understand is where LTOPTIONS_VERSION, LTSUGAR_VERSION, etc. are 
defined, and how to bring them into (I think) configure.ac.  

I'd really prefer starting from scratch and building up to a working version 
over crabbing another example.  Every library has its own way.  libgcobol is 
about as simple as it gets.  Better to keep it that way.  

Suggestions?  

Thanks, 

--jkl

Reply via email to