Subject: Re: [bug#68179] Re: automake-1.16j on OpenBSD

From: Bogdan <[email-masked]>
Date: Mon, 19 Feb 2024 22:36:01 +0100

Bruno Haible <[email-masked]>, 2024-02-19 01:44:
> Hello Bogdan,
>
>>    Can you tell us what actually "c++" is on your system? Like e.g. run
>> "c++ --version" or "c++ --help"?
>
> $ c++ --version
> OpenBSD clang version 13.0.0
> Target: amd64-unknown-openbsd7.4
> Thread model: posix
> InstalledDir: /usr/bin
>
>>    On my system, Autoconf finds "g++", tests it for an Objective C++
>> compiler, fails, and the t/objcxx-* tests are simply skipped.
>>    It seems that on your system, "c++" actually works as an Objective
>> C++ compiler, but somehow the "libobjc" library is not added to the
>> command line, making the test fail during linking.
>
> Yes, 'c++' works as an Objective-C++ compiler:

  How interesting. Especially that it compiles, but doesn't link.

[...]

> $ c++ -c hello.mm
> $ c++ hello.mm
> [3 link errors, due to undefined symbols.]
>
>>    What Autoconf version do your have and can you upgrade that?
>
> I was testing automake-1.16j.

  Good (even though it's 1.16.90 now :) ). Even though this looks like
a typo, I really was asking for Autoconf, suspecting a faulty test
there. But no problem, I see in config.log that it's the
latest-and-greatest 2.72.

>> I suspect it's not passing the required libraries. If it's the newest
>> version, can you attach the config.log file?
>
> Find attached the config.log.

  Right. And, as I suspected, nothing in any LIBS, LD*, no libobjc found.
  Does it work if you put

AC_LANG([Objective C])

  somewhere between the lines

	cat >> configure.ac << 'END'

and the first

	END

following it (i.e., in the 'configure.ac' file) in the test?

  If not, do you know any function name that we could use in
AC_CHECK_LIB to check for libobjc?
  Fortunately, this looks like just an issue with tests (or Autoconf),
not Automake.

--
Regards - Bogdan ('bogdro') D.                 (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux):    http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft  http://bogdro.evai.pl/soft4asm
www.Xiph.org  www.TorProject.org  www.LibreOffice.org  www.GnuPG.org