[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automake issue in virtuoso: "library has 'libwi_odbc_la' as canonical name (possible typo)"



On Tue, Aug 14, 2018 at 07:37:31PM +0200, Andreas Tille wrote:
> > > > > libsrc/Wi/Makefile.am:544: library has 'libwi_base_la' as canonical name (possible typo)
> > > > This is correct, there is a var named libwi_base_la_cflags which seems to
> > > > be a generic var so it should be renamed to something not looking like
> > > > foo_cflags automake var.
> > > 
> > > That's why I did s/cflags/CFLAGS/.
> > Ah, I was assuming the vars are case insensitive so the original name is
> > problematic.
> 
> I assumed that Makefile variables are case sensitive and so Makefile.am
> variables are.  I've never seen lower case spelling in those cases.
This is correct.
And lowercase is correct as, again, those are not meant to be automake
vars.
I don't know why automake warns about a foo_cflags var, calling it a
foo_CFLAGS var, but then I don't know if that build log was before or
after your s/cflags/CFLAGS/ etc. change. As it mentions line 544, which
originally sets a libwi_base_la_ldlags var, I suspect the latter.

> > Do you have the same error without that change? Because the
> > canonical names of automake target vars are foo_CFLAGS.
> 
> Automake was warning about typos 

No, it was warning about setting vars for targets that are not defined.
Please read the messages more carefully. It says "possible typo" but it
really has no idea. It also says "possible".

> and from what I can see these are simply typos.
The only typos I see are _LDLAGS instead of _LDFLAGS, and I wouldn't fix
those as they were there from the beginning. And the warnings don't talk
about them but about the library/program names, which your patches don't
change.

> > So you've enabled building IODBC_LIBS? Why? It is disabled by the
> > upstream.
> 
> It's a conditional variable (further above in Makefile.am).  I see no
> point in uncommenting it since it can be enabled or disabled via flags.
It's a var which is not used by the upstream, yet you patched the file to
use it. I suppose the upstream did not want to use it whatever the flags.

> When enabling it the automake bug goes away 
Because you are now using the dead code unused by the upstream...

> and thus I assumed that
> would just have been a regression from some upstream change.
You could look at the upstream change history, which I did before writing
my suggestions. All of this is unchanged since the first commit 13 or so
years ago.

> > And you made a libwi_base.la which is not what was intended. As I said,
> > libwi_base_la_cflags is a generic var meant to be included in other vars.
> > And are you sure you need to fix those "LDLAGS" if it was that way in the
> > upstream code?
> 
> May be I misunderstood your hint.  What less invasive / more upstream
> intended patch would you suggest?
If the dead code causes problems, remove dead code.
If an inappropriately named var causes problems, rename it. But only if it
really causes problems.

-- 
WBR, wRAR

Attachment: signature.asc
Description: PGP signature


Reply to: