Build errors of libapl on macos, Intel and ARM
$ ./configure --with-libapl
...
$ make
...
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -I /Volumes/ARCHIVE/Language/APL/gnu-apl/SVN -g -O2 -I /Volumes/ARCHIVE/Language/APL/gnu-apl/SVN -MT libapl_la-libapl.lo -MD -MP -MF .deps/libapl_la-libapl.Tpo -c -o libapl_la-libapl.lo `test -f 'libapl.cc' || echo './'`libapl.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -I /Volumes/ARCHIVE/Language/APL/gnu-apl/SVN -g -O2 -I /Volumes/ARCHIVE/Language/APL/gnu-apl/SVN -MT libapl_la-libapl.lo -MD -MP -MF .deps/libapl_la-libapl.Tpo -c libapl.cc -fno-common -DPIC -o .libs/libapl_la-libapl.o
libapl.cc:537:14: error: no matching member function for call to 'append'
text.append(reinterpret_cast<const UTF8 *>(*f));
~~~~~^~~~~~
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1248:69: note: candidate function not viable: no known conversion from 'const UTF8 *' (aka 'const unsigned char *') to 'const string' for 1st argument
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str) {
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1274:49: note: candidate function not viable: no known conversion from 'const UTF8 *' (aka 'const unsigned char *') to 'const value_type *' (aka 'const char *') for 1st argument
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s);
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1257:3: note: candidate template ignored: requirement '__can_be_converted_to_string_view<char, std::char_traits<char>, const unsigned char *>::value' was not satisfied [with _Tp = const unsigned char *]
append(const _Tp& __t) {
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1273:49: note: candidate function not viable: requires 2 arguments, but 1 was provided
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const value_type* __s, size_type __n);
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1275:49: note: candidate function not viable: requires 2 arguments, but 1 was provided
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(size_type __n, value_type __c);
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1282:5: note: candidate function template not viable: requires 2 arguments, but 1 was provided
append(_InputIterator __first, _InputIterator __last) {
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1290:5: note: candidate function template not viable: requires 2 arguments, but 1 was provided
append(_ForwardIterator __first, _ForwardIterator __last);
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1262:49: note: candidate function not viable: requires at least 2 arguments, but 1 was provided
_LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
^
/Users/zzzz/Apps/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:1271:9: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
append(const _Tp& __t, size_type __pos, size_type __n = npos);
^
libapl.cc:752:28: error: 'read_config_file' is a protected member of 'UserPreferences'
UserPreferences::uprefs.read_config_file(true, log_startup);
^
./UserPreferences.hh:196:9: note: declared protected here
void read_config_file(bool sys, bool log_startup);
^
libapl.cc:755:28: error: 'read_config_file' is a protected member of 'UserPreferences'
UserPreferences::uprefs.read_config_file(false, log_startup);
^
./UserPreferences.hh:196:9: note: declared protected here
void read_config_file(bool sys, bool log_startup);
^
3 errors generated.
make[3]: *** [libapl_la-libapl.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$ svn info
Path: .
Working Copy Root Path: /Volumes/ARCHIVE/Language/APL/gnu-apl/SVN
URL: http://svn.savannah.gnu.org/svn/apl/trunk
Relative URL: ^/trunk
Repository Root: http://svn.savannah.gnu.org/svn/apl
Repository UUID: bd74f7bd-1a55-4bac-9fab-68015b139e80
Revision: 1826
Node Kind: directory
Schedule: normal
Last Changed Author: j_sauermann
Last Changed Rev: 1826
Last Changed Date: 2025-02-04 06:59:58 -0600 (Tue, 04 Feb 2025)
$ gcc --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Users/zzzz/Apps/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Also tried adding CXXFLAGS="-std=gnu++14"; same results.
Adding"CXXFLAGS="-std=gnu++20" brought out new errors, but did not help the old ones:
In file included from libapl.cc:42:
In file included from ./UserPreferences.hh:30:
./Parallel.hh:73:41: warning: compound assignment to object of volatile-qualified type 'volatile _Atomic_word' (aka 'volatile int') is deprecated [-Wdeprecated-volatile]
{ const int ret = counter; counter += increment; return ret; }
^
./Parallel.hh:81:14: warning: compound assignment to object of volatile-qualified type 'volatile _Atomic_word' (aka 'volatile int') is deprecated [-Wdeprecated-volatile]
{ counter += increment; }
^
In file included from libapl.cc:43:
In file included from ./Workspace.hh:39:
In file included from ./ScalarFunction.hh:30:
./Thread_context.hh:89:9: warning: increment of object of volatile-qualified type 'volatile char' is deprecated [-Wdeprecated-volatile]
++get_master().job_number;
^
Happens on both Intel and ARM macos.
On Intel, I see that I built libapl last March (and can link against it), but it doesn't build now. I have no idea what release I was using back then, and in the library 'libapl_version' is zero.