OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Neil Waldhauer on January 17, 2026, 03:54:07 pm
-
The XTide program shows the tide table for a particular location. It worked for years, but stopped a couple of weeks ago when the harmonics fiie expired.
http://hobbesarchive.com/?dir=%2F&stype=all&sort=type_name&search=xtide&submit=Search (http://hobbesarchive.com/?dir=%2F&stype=all&sort=type_name&search=xtide&submit=Search)
It's still under development here:
https://flaterco.com/xtide/files.html (https://flaterco.com/xtide/files.html)
But there is no longer any OS/2 version.
Although it is an X program, there is also a command line version, tide.exe, which was more useful for OS/2.
Is there any hope for building the current release; at least the command line version?
-
Martin, can you split Neil's xtide comment into a separate thread?
Also perhaps create git archives of https://flaterco.com/files/xtide/libtcd-2.2.7-r3.tar.xz and https://flaterco.com/files/xtide/xtide-2.15.6.tar.xz
-
Hi Neil, can you test tide.exe. Need https://flaterco.com/files/xtide/harmonics-dwf-20251228-free.tar.xz along with SET HFILE_PATH=location/of/harmonics-dwf-20251228-free.tcd adjusted to your install. Not sure of the expected dir separator in the SET statement. I'll include the man page.
Still working on the web server, stupid IPv6 stuff and how to handle daemon. Might try the xtide too.
Edit: The missing DLL
-
Hello Dave
I created this repo: https://github.com/OS2World/APP-SCIENCE-XTide
Let me know if you think that way is fine (the program and the library), otherwise, just delete the files and set it as you like it.
Also, a quick tutorial on how it works would be appreciated just to test it out.
Regards
-
I unzipped the program files into a directory. I downloaded and extracted the harmonics file
https://flaterco.com/files/xtide/harmonics-dwf-20251228-free.tar.xz (https://flaterco.com/files/xtide/harmonics-dwf-20251228-free.tar.xz)
I set and environment variable to the location of my harmonics file
set hfile_path=\suntanv6\apps\xtide\dist\harmonics-dwf-20251228-free.tcd
I ran the program, but I now get a message about time zone support.
tide -l "Santa Cruz"
Indexing \suntanv6\apps\xtide\dist\harmonics-dwf-20251228-free.tcd...
XTide Fatal Error: BROKEN_ZONEINFO
Your platform appears to have broken time zone support. You need to have a
reasonably modern version of the time zone database that is available from
http://www.iana.org/time-zones.
-
Interesting, I wasn't sure how to run it, as well as not having the local tide database for here. There's a whole rabbit hole on the tidal databases. Seems they were public domain but no more and my government is worried about commercial use :(
I am curious about the local tides, I'm perhaps 30 miles upstream from the ocean and the railroad bridge in town is considered the end of tidal waters.
I'll have to read up on the time zone support and whether x:\sys\apps\timeset\tz_en.lst that is installed by AOS is good enough. Seems it should be taken care off by the operating system and ideally installed in %ETC%
Then there is the rabbit hole of when the time zones change. Here the Province passed a law to switch to DST when ever you guys get around to it.
-
Hello Dave
I created this repo: https://github.com/OS2World/APP-SCIENCE-XTide
Let me know if you think that way is fine (the program and the library), otherwise, just delete the files and set it as you like it.
Also, a quick tutorial on how it works would be appreciated just to test it out.
Regards
It's fine. At first I had git problems much like earlier. Went down the rabbit hole of restoring backups and screwing around. On that install, the latest libc update broke git.
Ended up using a different install and things work. Still can't update git due to a CVS dependency with no cvs.rpm. Need to open a ticket but github has become so hard to use on OS/2.
-
Working on time support. Downloaded tzdb and did some editing of the makefile. There are a lot of options but first step is compiling.
The problems I've run into is first a static vs non-static problem,
c99 -DHAVE_GETRESUID=0 -DHAVE_GETEUID=0 -DHAVE_ISSETUGID=0 -c -o localtime.o localtime.c
localtime.c:388:1: error: static declaration of 'issetugid' follows non-static declaration
388 | issetugid(void)
| ^~~~~~~~~
In file included from private.h:266,
from localtime.c:16:
M:/usr/lib/gcc/i686-pc-os2-emx/9/include-fixed/unistd.h:525:6: note: previous declaration of 'issetugid' was here
525 | int issetugid(void);
| ^~~~~~~~~
make: *** [<builtin>: localtime.o] Error 1
I can remove the static but then get a duplicate symbol error,
c99 -o zdump -DHAVE_GETRESUID=0 -DHAVE_GETEUID=0 -DHAVE_ISSETUGID=0 -Zexe -Zomf -Zhigh-mem -Zmap zdump.o localtime.o strftime.o -lintl
weakld: H:\tmp\ldconv_strftime_o_8da5696ed544186c40.obj - error: Duplicate symbol '_issetugid' ('_issetugid').
weakld: H:\tmp\ldconv_localtime_o_8da5696ed544184d00.obj - error: Symbol previously defined in this module.
Even if and when I get it built, have to figure out how to install/use it
-
Without looking at the code, I have to guess that -DHAVE_ISSETUGID=0 is part of the problem. This is going to trigger the compatibility code to build. However, since we have a issetugid(), this is going to cause a problem.
-
Actually, I added that after the failure, the other defines did fix other issues. The code has a lot of defines and only a makefile. Likely grew a lot Perhaps Martin will create an empty tzdb git repository and I'll push my code.
-
Perhaps Martin will create an empty tzdb git repository and I'll push my code.
Let me know if I forked the right one: https://github.com/OS2World/LIB-TIME-tzdb
Regards
-
Perhaps Martin will create an empty tzdb git repository and I'll push my code.
Let me know if I forked the right one: https://github.com/OS2World/LIB-TIME-tzdb
Regards
No, that seems to be a R port. I downloaded from https://flaterco.com/xtide/files.html
Thanks
Edit: Just create an empty repository with perhaps a README.MD
-
Edit: Just create an empty repository with perhaps a README.MD
Try again https://github.com/OS2World/LIB-TIME-tzdb
It is empty now.
-
Edit: Just create an empty repository with perhaps a README.MD
Try again https://github.com/OS2World/LIB-TIME-tzdb
It is empty now.
Thanks, not empty now.
-
Edit: Just create an empty repository with perhaps a README.MD
Try again https://github.com/OS2World/LIB-TIME-tzdb
It is empty now.
Thanks, not empty now.
Can you double check https://github.com/OS2World/LIB-TIME-tzdb ?
Maybe you forgot to push. I still see it empty
Regards
-
I seems to have messed up the branch.
H:\tmp\LIB-TIME-tzdb>git branch
* main
master
H:\tmp\LIB-TIME-tzdb>git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
H:\tmp\LIB-TIME-tzdb>git checkout main
Switched to branch 'main'
Your branch and 'origin/main' have diverged,
and have 5 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
H:\tmp\LIB-TIME-tzdb>git pull
fatal: refusing to merge unrelated histories
Have to delete the branch and start over I guess.
-
I've sorta fixed the repository. History is a bit broken with 3 initial commits, one mine and 2 yours but I doubt it matters.
-
Without looking at the code, I have to guess that -DHAVE_ISSETUGID=0 is part of the problem. This is going to trigger the compatibility code to build. However, since we have a issetugid(), this is going to cause a problem.
The actual problem call to setugid() doesn't seem to be guarded. Further down there is another call to setugid() that is guarded by HAVE_ISSETUGID. As a single user system it seems we can define it to 0.
/* Return 1 if the process is privileged, 0 otherwise. */
/* static int */
int
issetugid(void)
{
# if HAVE_SYS_AUXV_H && defined AT_SECURE
unsigned long val;
errno = 0;
val = getauxval(AT_SECURE);
if (val || errno != ENOENT)
return !!val;
# endif
# if HAVE_GETRESUID
{
uid_t ruid, euid, suid;
gid_t rgid, egid, sgid;
if (0 <= getresuid (&ruid, &euid, &suid)) {
if ((ruid ^ euid) | (ruid ^ suid))
return 1;
if (0 <= getresgid (&rgid, &egid, &sgid))
return !!((rgid ^ egid) | (rgid ^ sgid));
}
}
# endif
The problem with the duplicate symbols comes from strftime.c, in the case of 32bit time_t, including localtime.c, which has already been compiled.
Seems to me the call to issetugid() could be simply replaced with return 0. Not sure the best way to do that for a void function. Perhaps this?
#ifndef __OS2__
static int
issetugid(void)
#else
return 0;
#endif
Edit: Note I had to remove the static due to conflicts with our headers where issetugid() is not static.
Edit2: Testing,
localtime.c:391:1: error: expected identifier or '(' before 'return'
391 | return 0;
| ^~~~~~
localtime.c:393:1: error: expected identifier or '(' before '{' token
393 | {
| ^
make: *** [<builtin>: localtime.o] Error 1