Thanks for working
on fixing this. I just tested the latest dev version (ncurses-6.2-20201114)
on our system, and see that it's still adding the option - looks like a
bug in the newly added option detection. Below is a copy of the relevant
portion from config.log - directly after it starts to check for -Qunused-arguments
(which doesn't work on this compiler), it doesn't actually try to compile
using that option and then adds it to the CFLAGS, which fails later on.
configure:2177:
checking if this is really Clang C compiler configure:2198:
/home/pitman/ncurses/tools/compiler/xlclang -c -qascii -qarch=10 conftest.c
>&5 configure:2201:
$? = 0 configure:2204:
test -s conftest.o configure:2207:
$? = 0 configure:2217:
result: yes configure:2226:
checking if option -Qunused-arguments works configure:2243:
/home/pitman/ncurses/tools/compiler/xlclang -o conftest -qascii -qarch=10
conftest.c >&5 configure:2246:
$? = 0 configure:2249:
test -s conftest configure:2252:
$? = 0 configure:2263:
result: yes configure:2268:
testing adding option -Qunused-arguments ... configure:2226:
checking if option -Wno-error=implicit-function-declaration works configure:2243:
/home/pitman/ncurses/tools/compiler/xlclang -o conftest -qascii -qarch=10
-Qunused-arguments conftest.c >&5 FSUM3212 xlclang:
Command option -Q is incorrect for z/OS platform - ignored. IEW2456E
9207 SYMBOL nused-arguments UNRESOLVED. MEMBER COULD NOT BE INCLUDED
FROM THE DESIGNATED CALL LIBRARY. FSUM3065 The LINKEDIT
step ended with return code 8. configure:2246:
$? = 3
When using clang
on a Linux system, it also shows same behavior but will successfully compile
due to having both options. Also apologies for sending this email twice
- I had a typo in the cc to bug-ncurses.
Thanks,
Steven Pitman IBM Toronto Lab 8200 Warden Ave, Markham, Ont. L6G 1C7
From:
Thomas
Dickey <dickey@his.com> To:
Steven
Pitman <pitman@ca.ibm.com> Cc:
bug-ncurses@gnu.org Date:
2020/10/31
04:02 PM Subject:
[EXTERNAL]
Re: [PATCH] Building ncurses on z/OS
On Fri, Oct 30, 2020 at 03:16:56PM
-0500, Steven Pitman wrote: > Hi, > > As you mentioned for 3), which was for misc/run_tic.in, this change
is not > actually needed. Please ignore.
The basic problem with (2), ifdef'ing sgtty.h, is that the configure script failed on most of the termios checks because the -Qunused-arguments flag was still in that version of the configure script.
> > 2) ./include/MKterm.h.awk.in: The included header doesn't exist
on z/OS, > > > so do not include it when compiling on this platform > > ...but that branch of the ifdef would be used if the machine doesn't > have termios (POSIX). It would help if I had a copy of the config.status > and config.log from configuring ncurses.
That causes the checks which compile and link a test program to fail: -------------------------------------------------------------------------------- configure:8572: /home/pitman/ncurses/tools/compiler/xlclang -o conftest
-qascii -qarch=10 -Qunused-arguments conftest.c >&5 FSUM3212 xlclang: Command option -Q is incorrect for z/OS platform - ignored. IEW2456E 9207 SYMBOL nused-arguments UNRESOLVED. MEMBER COULD NOT
BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
FSUM3065 The LINKEDIT step ended with return code 8. configure:8575: $? = 3 configure: program exited with status 3 configure: failed program was: #line 8558 "configure" -------------------------------------------------------------------------------- In tonight's patch I have an improved check for clang's options which should solve both (1) and (2).