-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure: not portable outside of GNU ? (was AC_CHECK_HEADERS) #369
Comments
Let's start with error.h . I would think that SUS has somethign to say about such things. The wiki page claims AIX is compatible with version 3. I don't think that we are "too deep" for version 03 and would require the V7 version. Stuff like errno.h is pretty standard. Hmm. You're talking about "error.h". OK.... Still my system has this simply in /usr/include and I would expect yours to have it there too. Even then, configure be able to configure for such differences. Can you install a "I'm going to do development" package that might install such things (in the right place)? |
OK - discovered it is not the missing error.h - ONLY. There are several other issues. List follows below: YES - I can add 'development' stuff. YES - errno.h exists. After make -i, a second
|
FYI: The AIX include files onameser_compat.h.txt And do not have |
Your error messages indicate that your compilation process includes "params.h" twice. And... It is common to protect against that with a
at the beginning of such a header. And then the #endif at the end. Then... the next line indicates that your compiler didn't see the: |
As to stable state: it is working fine for other projects... That said, I'll look into why it is not finding it. Maybe there is an extra define (CFLAG) needed to get it to follow the logic you want. I make no assumptions, nor do I try to second guess. Further, maybe a typo - but I do not have a params.h - there is a <sys/param.h> with: /* IBM_PROLOG_END_TAG / |
Changed one default - to what I normally use:
The effect is that comments started by // are now recognized. I expect 'some' of the unstability is caused by mixed comment prefix and bracketing. Looks like this now:
Regarding the first 'redefine': I am clueless on what to do, the differences is quite large:
|
FYI: for the first bit of double defined variables (nameser_compat.h and onameser_compt.h) for macro in PACKETSZ MAXDNAME MAXCDNAME MAXLABEL HFIXEDSZ QFIXEDSZ RRFIXEDSZ INT32SZ INT16SZ grep -n $macro /usr/include/arpa/onameser_compat.h /usr/include/arpa/nameser_compat.h |
Here is a verbose listing of the 'include' logic processing. |
The "#ifndef _H_PARAM " is clearly not working. The warning below (from your list of warnings/errors reports that MAXPATH is redefined on line 126 of param.h where the previous definition was on... wait for it... line 126 of param.h. (Yeah, consider my params/param a typo. )
If your compiler (whatever it is called) doesn't accept // as a comment, then it is WAY too old to be usable. You're free to use another compiler then. I'm an oldfashioned guy and I refused to use // as the new comment symbol into the 2000's but it has been in the accepted C standard since before 2000. Maybe IBM has to maintain compatibility with old software for some reason, but a compiler that doesn't accept // is not from this century. |
From the 'listing' file, at the end I see this order:
93 /usr/include/stdint.h 07/01/07 15:11:21 80 30
94 ui/mtr.h 09/22/20 09:15:38 80 32
95 ui/display.h 09/22/20 09:15:38 0 39
96 /usr/include/netinet/in.h 02/10/10 18:22:24 95 19
97 ui/dns.h 09/22/20 09:15:38 0 40
98 ./config.h 09/22/20 11:38:52 97 19
99 /usr/include/netinet/in.h 02/10/10 18:22:24 97 20
100 /usr/include/resolv.h 07/01/07 14:48:38 97 21
101 /usr/include/sys/param.h 07/01/07 14:48:04 100 19
102 /usr/include/sys/types.h 08/13/07 23:21:24 101 39
103 /usr/include/sys/m_param.h 07/01/07 14:47:33 101 40
104 /usr/include/sys/limits.h 07/01/07 14:47:18 101 41
105 /usr/include/jfs/fsparam.h 07/01/07 14:46:34 101 42
106 /usr/include/sys/machine.h 04/28/10 17:43:27 101 43
107 /usr/include/sys/sysmacros.h
09/29/07 13:44:28 101 218
108 /usr/include/sys/types.h 08/13/07 23:21:24 107 33
109 /usr/include/sys/param.h 07/01/07 14:48:04 107 34
110 /usr/include/sys/types.h 08/13/07 23:21:24 100 20
111 /usr/include/sys/cdefs.h 07/01/07 15:04:29 100 21
112 /usr/include/stdio.h 09/08/09 14:12:13 100 22
113 /usr/include/netinet/in.h 02/10/10 18:22:24 100 23
114 ui/utils.h 09/22/20 09:15:39 0 41
And, for the record, /usr/include/sys/param.h is only opened once
(/usr/include/sys/m_param.h gets opened twice if I read the file correctly).
On 22/09/2020 16:17, Roger Wolff wrote:
The "#ifndef _H_PARAM " is clearly not working. The warning below
(from your list of warnings/errors reports that MAXPATH is redefined
on line 126 of param.h where the previous definition was on... wait
for it... line 126 of param.h. (Yeah, consider my params/param a typo. )
|"/usr/include/sys/param.h", line 126.9: 1506-236 (W) Macro name
MAXPATH has been redefined. "/usr/include/sys/param.h", line 126.9:
1506-358 (I) "MAXPATH" is defined on line 64 of ui/mtr.h. |
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5MEP3HUNOVJDYLK7ATSHCWXJANCNFSM4RVR3WLA>.
[net.lst.txt](https://github.com/traviscross/mtr/files/5262404/net.lst.txt)
Edited to add the file, rather than in-line and incomplete.
|
The xlc compiler has MANY modes. When using "cc" it is pre-c88 standard, there is c99 (for c99 standards) - and there are options to add things such as '//' as comments. My comment was clearly no criticism. Just a comment - something I had missed because I rarely call ./configure directly. (I have scripts that set CC, CFLAGS, LDFLAGS, etc. before calling .configure and make. My apologies for any misunderstanding. |
I maintain that it is odd to "start" in the "oldfashioned" mode and not "propagate" modern syntax by starting the the more modern mode. Maybe they are right. If they upgrade the compiler and old stuff doesn't compile anymore, then people might say: "Hmm you broke the old programs", and that's precisely what IBM doesn't want. But as far as I know everybody else does it the other way around: THe new syntax is the default. |
It will be different "RSN - real soon now" - when they come out with the
LLVM (or something like that) compiler.
In any case - looks like getting it to work with AIX is going to test
the bounds of portability. The biggest issue may be getting a drop-in
for error() etc. I have not looked in the code - maybe it is 'just a
macro' that needs work. Sigh.
…On 22/09/2020 18:04, Roger Wolff wrote:
My apologies for any misunderstanding.
I maintain that it is odd to "start" in the "oldfashioned" mode and
not "propagate" modern syntax by starting the the more modern mode.
Maybe they are right. If they upgrade the compiler and old stuff
doesn't compile anymore, then people might say: "Hmm you broke the old
programs", and that's precisely what IBM doesn't want. But as far as I
know everybody else does it the other way around: THe new syntax is
the default.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5MKIEKACZFVV4ROK73SHDDIJANCNFSM4RVR3WLA>.
|
IMHO, it should "just compile" on any Unix system built this century. That's the goal at least. On the other hand, if nobody tries it, things tend to "bitrot". Someone uses a construct that is valid on everything except on the one system that isn't tested.... |
I have been looking on a Linux system (to see what is in ifaddrs.h. That
is a GNU thing - and AIX does not have it.
No idea how hard it will be to use the classic socket calls.
…On 22/09/2020 18:24, Roger Wolff wrote:
IMHO, it should "just compile" on any Unix system built this century.
That's the goal at least.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5ITSOLJSF7ASJHXRW3SHDFT5ANCNFSM4RVR3WLA>.
|
GNU -> Linux / BSD. |
BSD huh. That is where 'socket' came from :p. No idea what the last
'posix' standard AIX committed to has in it. I've check AIX 6.1, AIX 7.1
and AIX 7.2. None of them, sadly, have ifaddrs.h. Not can I find
anything for a routine getifaddrs() - anywhere.
…On 22/09/2020 19:24, Roger Wolff wrote:
GNU -> Linux / BSD.
Linux copied the functions from BSD. GNU has little to do with it
except that they wrote a licence that is often used (and also on that
header).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5OORXWCTUEUV575H6DSHDMV5ANCNFSM4RVR3WLA>.
|
p.s. If you have an id with the gccfarm - you can access gcc119 - which
is an AIX host with both gcc and xlc installed.
…On 22/09/2020 19:24, Roger Wolff wrote:
GNU -> Linux / BSD.
Linux copied the functions from BSD. GNU has little to do with it
except that they wrote a licence that is often used (and also on that
header).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5OORXWCTUEUV575H6DSHDMV5ANCNFSM4RVR3WLA>.
|
If it's the main issue on the AIX system, what about to try to build previous mtr version just for a test? |
I've requested an account at gccfarm. |
:) What a great idea!
…On 22/09/2020 20:26, yvs2014 wrote:
I have been looking on a Linux system (to see what is in
ifaddrs.h. That is a GNU thing - and AIX does not have it. No idea
how hard it will be to use the classic socket calls.
If it's only one issue on the AIX system, what about to try to build
previous mtr version just for a test?
(as one can see, 0.92 version goes without using a <ifaddrs.h> header
file)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5KQKRPWUPPJRO5VIRDSHDT5BANCNFSM4RVR3WLA>.
|
Still has the include file mixup, and still misses 'error()'
functionality, but I'll work on that.
How long ago was 'error()' added?
…On 22/09/2020 20:26, yvs2014 wrote:
I have been looking on a Linux system (to see what is in
ifaddrs.h. That is a GNU thing - and AIX does not have it. No idea
how hard it will be to use the classic socket calls.
If it's only one issue on the AIX system, what about to try to build
previous mtr version just for a test?
(as one can see, 0.92 version goes without using a <ifaddrs.h> header
file)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5KQKRPWUPPJRO5VIRDSHDT5BANCNFSM4RVR3WLA>.
|
On 23/09/2020 12:54, Michael Felt wrote:
Still has the include file mixup, and still misses 'error()'
functionality, but I'll work on that.
How long ago was 'error()' added?
Found that - long ago. Rightly (or wrongly) - credited GNU as 'source':
commit 50d0a16
Merge: f3f757e 3e4350c
Author: rewolff <R.E.Wolff@BitWizard.nl>
Date: Mon Aug 22 08:36:42 2016 +0200
Merge pull request #143 from kerolasa/2016-08-21
Cleanups: mark some functions as static. use GNU function "error"
instead of perror/exit.
(en goede middag! 😉 in hope that rewolff is, indeed Roger Wolff)
… On 22/09/2020 20:26, yvs2014 wrote:
>
> I have been looking on a Linux system (to see what is in
> ifaddrs.h. That is a GNU thing - and AIX does not have it. No idea
> how hard it will be to use the classic socket calls.
>
> If it's only one issue on the AIX system, what about to try to build
> previous mtr version just for a test?
> (as one can see, 0.92 version goes without using a <ifaddrs.h> header
> file)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#369 (comment)>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5KQKRPWUPPJRO5VIRDSHDT5BANCNFSM4RVR3WLA>.
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5MWUNOT3Z5WJ6PJ2H3SHHHVXANCNFSM4RVR3WLA>.
|
OK. Found a solution for the "nameser_compat" collisions (add -D_USE_IRS
to CFLAGS).
Do not have a solution for the MAXPATH redefine - as it appears AIX has
included MAXPATH in param.h - for a long time (Do not have any AIX 5.2
and earlier, but can find it in AIX 5.3).
Looking on the Linux (on POWER) system that I have, I see 'MAXPATH' is
not used as an id in the include files.
root@x074:~# find /usr/include -name \*.h | xargs grep MAXPATH
/usr/include/rpcsvc/nis.h:#define NIS_MAXPATH 1024
/usr/include/rpcsvc/nfs_prot.h:#define NFS_MAXPATHLEN 1024
/usr/include/powerpc-linux-gnu/sys/param.h:#if !defined MAXPATHLEN &&
defined PATH_MAX
/usr/include/powerpc-linux-gnu/sys/param.h:# define MAXPATHLEN PATH_MAX
/usr/include/linux/coda.h:#define CODA_MAXPATHLEN 1024
/usr/include/linux/nfs2.h:#define NFS2_MAXPATHLEN 1024
/usr/include/linux/nfs.h:#define NFS_MAXPATHLEN 1024
/usr/include/linux/cramfs_fs.h:#define CRAMFS_MAXPATHLEN (((1 <<
CRAMFS_NAMELEN_WIDTH) - 1) << 2)
/usr/include/linux/nfs3.h:#define NFS3_MAXPATHLEN PATH_MAX
/usr/include/linux/nfs4.h:#define NFS4_MAXPATHLEN PATH_MAX
Instead, it looks as if there the id PATH_MAX is used.
…On 23/09/2020 13:01, Michael Felt wrote:
On 23/09/2020 12:54, Michael Felt wrote:
> Still has the include file mixup, and still misses 'error()'
> functionality, but I'll work on that.
>
> How long ago was 'error()' added?
Found that - long ago. Rightly (or wrongly) - credited GNU as 'source':
commit 50d0a16
Merge: f3f757e 3e4350c
Author: rewolff ***@***.***>
Date: Mon Aug 22 08:36:42 2016 +0200
Merge pull request #143 from kerolasa/2016-08-21
Cleanups: mark some functions as static. use GNU function "error"
instead of perror/exit.
(en goede middag! 😉 in hope that rewolff is, indeed Roger Wolff)
> On 22/09/2020 20:26, yvs2014 wrote:
> >
> > I have been looking on a Linux system (to see what is in
> > ifaddrs.h. That is a GNU thing - and AIX does not have it. No idea
> > how hard it will be to use the classic socket calls.
> >
> > If it's only one issue on the AIX system, what about to try to build
> > previous mtr version just for a test?
> > (as one can see, 0.92 version goes without using a <ifaddrs.h> header
> > file)
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> >
<#369 (comment)>,
> > or unsubscribe
> >
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5KQKRPWUPPJRO5VIRDSHDT5BANCNFSM4RVR3WLA>.
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#369 (comment)>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5MWUNOT3Z5WJ6PJ2H3SHHHVXANCNFSM4RVR3WLA>.
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5PN2OQKUJFOMQ73ZULSHHIPBANCNFSM4RVR3WLA>.
|
OK, for the MAXPATH issue - I have a simple fix:
diff --git a/ui/curses.c b/ui/curses.c
index a7588ca..670d8a6 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -465,7 +465,7 @@ static void mtr_curses_hosts(
}
/* Multi path */
- for (i = 0; i < MAXPATH; i++) {
+ for (i = 0; i < MAX_PATH; i++) {
addrs = net_addrs(at, i);
mplss = net_mplss(at, i);
if (addrcmp((void *) addrs, (void *) addr, ctl->af) == 0)
diff --git a/ui/mtr.h b/ui/mtr.h
index 7ede21d..76b63be 100644
--- a/ui/mtr.h
+++ b/ui/mtr.h
@@ -61,7 +61,7 @@ typedef int time_t;
/* net related definitions */
#define SAVED_PINGS 200
-#define MAXPATH 8
+#define MAX_PATH 8
#define MaxHost 256
#define MinPort 1024
#define MaxPort 65535
diff --git a/ui/net.c b/ui/net.c
index 3a7abc8..b17fac0 100644
--- a/ui/net.c
+++ b/ui/net.c
@@ -50,7 +50,7 @@ static void sockaddrtop(
struct nethost {
ip_t addr;
- ip_t addrs[MAXPATH]; /* for multi paths byMin */
+ ip_t addrs[MAX_PATH]; /* for multi paths byMin */
int xmit;
int returned;
int sent;
@@ -69,7 +69,7 @@ struct nethost {
int saved[SAVED_PINGS];
int saved_seq_offset;
struct mplslen mpls;
- struct mplslen mplss[MAXPATH];
+ struct mplslen mplss[MAX_PATH];
};
@@ -228,7 +228,7 @@ static void net_process_ping(
addrcpy((void *) &(host[index].addrs[0]), addrcopy, ctl->af);
host[index].mplss[0] = *mpls;
} else {
- for (i = 0; i < MAXPATH;) {
+ for (i = 0; i < MAX_PATH;) {
if (addrcmp
((void *) &(host[index].addrs[i]), (void *) &addrcopy,
ctl->af) == 0
@@ -240,7 +240,7 @@ static void net_process_ping(
}
if (addrcmp((void *) &(host[index].addrs[i]), addrcopy, ctl->af) !=
- 0 && i < MAXPATH) {
+ 0 && i < MAX_PATH) {
addrcpy((void *) &(host[index].addrs[i]), addrcopy, ctl->af);
host[index].mplss[i] = *mpls;
display_rawhost(ctl, index, (void *) &(host[index].addrs[i]));
However, this still leaves the 'error()' problem.
However - 2 - I see in the NEWS file (v.088 when this appears to have
appeared) MacOS also lacked the error() function. Perhaps, what was done
then to include MacOS can be easily adjusted to also include AIX. ?
…On 23/09/2020 13:25, Michael Felt wrote:
OK. Found a solution for the "nameser_compat" collisions (add -D_USE_IRS
to CFLAGS).
Do not have a solution for the MAXPATH redefine - as it appears AIX has
included MAXPATH in param.h - for a long time (Do not have any AIX 5.2
and earlier, but can find it in AIX 5.3).
Looking on the Linux (on POWER) system that I have, I see 'MAXPATH' is
not used as an id in the include files.
***@***.***:~# find /usr/include -name \*.h | xargs grep MAXPATH
/usr/include/rpcsvc/nis.h:#define NIS_MAXPATH 1024
/usr/include/rpcsvc/nfs_prot.h:#define NFS_MAXPATHLEN 1024
/usr/include/powerpc-linux-gnu/sys/param.h:#if !defined MAXPATHLEN &&
defined PATH_MAX
/usr/include/powerpc-linux-gnu/sys/param.h:# define MAXPATHLEN PATH_MAX
/usr/include/linux/coda.h:#define CODA_MAXPATHLEN 1024
/usr/include/linux/nfs2.h:#define NFS2_MAXPATHLEN 1024
/usr/include/linux/nfs.h:#define NFS_MAXPATHLEN 1024
/usr/include/linux/cramfs_fs.h:#define CRAMFS_MAXPATHLEN (((1 <<
CRAMFS_NAMELEN_WIDTH) - 1) << 2)
/usr/include/linux/nfs3.h:#define NFS3_MAXPATHLEN PATH_MAX
/usr/include/linux/nfs4.h:#define NFS4_MAXPATHLEN PATH_MAX
Instead, it looks as if there the id PATH_MAX is used.
On 23/09/2020 13:01, Michael Felt wrote:
>
> On 23/09/2020 12:54, Michael Felt wrote:
> > Still has the include file mixup, and still misses 'error()'
> > functionality, but I'll work on that.
> >
> > How long ago was 'error()' added?
>
> Found that - long ago. Rightly (or wrongly) - credited GNU as 'source':
>
> commit 50d0a16
> Merge: f3f757e 3e4350c
> Author: rewolff ***@***.***>
> Date: Mon Aug 22 08:36:42 2016 +0200
>
> Merge pull request #143 from kerolasa/2016-08-21
>
> Cleanups: mark some functions as static. use GNU function "error"
> instead of perror/exit.
>
> (en goede middag! 😉 in hope that rewolff is, indeed Roger Wolff)
>
> > On 22/09/2020 20:26, yvs2014 wrote:
> > >
> > > I have been looking on a Linux system (to see what is in
> > > ifaddrs.h. That is a GNU thing - and AIX does not have it. No idea
> > > how hard it will be to use the classic socket calls.
> > >
> > > If it's only one issue on the AIX system, what about to try to build
> > > previous mtr version just for a test?
> > > (as one can see, 0.92 version goes without using a <ifaddrs.h>
header
> > > file)
> > >
> > > —
> > > You are receiving this because you authored the thread.
> > > Reply to this email directly, view it on GitHub
> > >
> <#369 (comment)>,
> > > or unsubscribe
> > >
> >
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5KQKRPWUPPJRO5VIRDSHDT5BANCNFSM4RVR3WLA>.
> > >
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> >
<#369 (comment)>,
> > or unsubscribe
> >
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5MWUNOT3Z5WJ6PJ2H3SHHHVXANCNFSM4RVR3WLA>.
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#369 (comment)>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/ACSZR5PN2OQKUJFOMQ73ZULSHHIPBANCNFSM4RVR3WLA>.
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#369 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSZR5NVWG5SNOLB2626KS3SHHLLNANCNFSM4RVR3WLA>.
|
Clone the git (I think you have that) and then use "git blame" on the file that contains the "error ()" call and look for the line...
Dan prefereer ik dat je "Rogier" schrijft. (Als je de Nederlandse 'g' kan uitspreken, zacht of niet maakt me niet uit. Buitenlanders moeten "Roger" schrijven).
OK. Applied. (If we run into trouble again with another system using MAX_PATH, we should go with "MTR_MAX_PATH" or something better, I think it is not the maximum route-path that the name implies).
Waiting.... |
Idk, for ex. mtr-0.85 is still quite good to me in most cases.
plus a couple macro bindings in code:
|
Now that ./bootstrap.sh is being called - I am encountering issues with
./configure
Stops first with
error.h
(aka verr) not found - and I suspect I'll get similar complaints with linux/icmp.h and linux/errqueue.h.Additionally, ncurses and ncurses/curses.h are like to be 'an issue'.
socket.h is available - but in sys/socket.h
The text was updated successfully, but these errors were encountered: