bug-apl
[Top][All Lists]
Advanced

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

Re: [EXTERNAL]Building GNU APL with clang


From: Russtopia
Subject: Re: [EXTERNAL]Building GNU APL with clang
Date: Mon, 2 Oct 2023 18:51:43 -0700

Hi, thank you all for the rapid replies.

Shortly after posting, I figured out how to set clang-11 as my default cc and c++ on my Devuan x86_64 laptop, and it builds perfectly there.

So strange; I wonder what is different about the Termux clang environment. (It is a native ARM aarch64 Linux env, hosted within Android, using its own package repositories).

I wish they had just stuck with gcc, it was building fine on my older phone :(.

(I know there's an Android build mode outside of Termux, but I was trying to go with what I knew worked. Oh well.)


On Mon, Oct 2, 2023 at 6:44 PM Callahan, Brian Robert <callab5@rpi.edu> wrote:

Hi Russ –

 

On OpenBSD, clang has been the default compiler for many years. I routinely build APL trunk on OpenBSD, and never had any problems so long as I add -std=gnu++11 to CXXFLAGS. I just rebuilt APL from a clean SVN checkout and it built without issues.

 

I am using clang-16.0.6. Not sure what version Termux uses these days.

 

~Brian

 

--

Brian Robert Callahan, Ph.D., CISSP, CCSP, SSCP, CC

Graduate Program Director, ITWS@RPI

Director, Rensselaer Cybersecurity Collaboratory

Office: Lally 304

 

From: bug-apl-bounces+callab5=rpi.edu@gnu.org <bug-apl-bounces+callab5=rpi.edu@gnu.org> On Behalf Of Russtopia
Sent: Monday, October 2, 2023 8:08 PM
To: bug-apl@gnu.org
Subject: [EXTERNAL]Building GNU APL with clang

 

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hello, See topic.

 

I would rather not, but in this case I am trying to re-build GNU APL in Termux on my newer Android phone, and Termux decided some time ago to remove gcc entirely from its packages, in preference to clang. :(

 

I am not up to date at all on modern C++, but this conversation on Stackoverflow suggests that auto_ptr is considered deprecated in newer C++ standards: https://stackoverflow.com/questions/69116001/how-do-i-re-enable-c17-removed-features-in-clang


libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -Wno-deprecated-declarations -g -O2 -I /data/data/com.termux/files/home/gnuapl/trunk -c Listener.cc -o Listener.o >/dev/null 2>&1
network.cc:37:10: error: no member named 'auto_ptr' in namespace 'std'
std::auto_ptr<NetworkConnection> connection( (NetworkConnection *)arg );
~~~~~^
network.cc:37:19: error: 'NetworkConnection' does not refer to a value
std::auto_ptr<NetworkConnection> connection( (NetworkConnection *)arg );
^

 

Adding -std=c++11 to src/emacs-mode/Makefile CXXFLAGS got me past the auto_ptr issues, but then I hit issues with 'typeof()' in LineInput.cc:


g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -I /data/data/com.termux/files/home/gnuapl/trunk -std=c++11 -g -O2 -I /data/data/com.termux/files/home/gnuapl/trunk -MT apl-Missing_Libraries.o -MD -MP -MF .deps/apl-Missing_Libraries.Tpo -c -o apl-Missing_Libraries.o `test -f 'Missing_Libraries.cc' || echo './'`Missing_Libraries.cc
LApack.cc:1784:37: error: unknown type name 'typeof'; did you mean 'typedef'? tau = reinterpret_cast<typeof(tau)> (work);
^~~~~~
typedef
LApack.cc:1784:43: error: expected a type tau = reinterpret_cast<typeof(tau)> (work);
^
LApack.cc:1784:37: error: type name does not allow storage class to be specified
tau = reinterpret_cast<typeof(tau)> (work);
^

Has anyone managed to build and successfully run GNU APL with clang?

-Russ

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]