Closed aedwall33 closed 11 months ago
@aedwall33
That warning is actually fixed here: https://github.com/cyjoelchen/php-sweph/commit/759d76d001ffcbacb8914a809ef07815f4398382
I don't know why I didn't tag that fix as a 4.0.9 release but I will hold off doing so now because I am seeing a failing test when I build the extension in PHP 8.2 albeit a different one from the one you posted.
Once I fix this issue I can tag a new release that's PHP 8.2 compatible. Then you can use that release and both the warning and your failing test will disappear (along with this other failing test which I don't think you're seeing).
@aedwall33
I added PHP 8.2 to the test matrix and have released the extension version 4.0.9 which also includes the removal of the warning you initially wrote about. Use this latest release and let me know how it goes for you.
Just hijacking this due to very a similar issue - when compiling on Mac for PHP 8.2 I saw the following tests fail:
I was able to run the example.php
test script with some success, but swe_calc_ut()
returned an error for the asteroids (Chiron through Vesta).
@theriftlab
when compiling on Mac for PHP 8.2 I saw the following tests fail:
Is this on an Intel or ARM chipset?
swe_calc_ut()
returned an error for the asteroids (Chiron through Vesta).
The first line of the test code calls swe_set_ephe_path()
which tells the program where to find the SE library files. If your data files aren't there, you'll get the errors I assume you're seeing. Without knowing the exact errors you're seeing I can't confirm that's what is happening, although it's likely to be the case.
SE has an internal fallback mechanism which can mask such problems.
See here for an explanation of how this function operates:
@kevindecapite thanks for the reply.
Is this on an Intel or ARM chipset?
This is ARM (M1 processor).
The first line of the test code calls swe_set_ephe_path() which tells the program where to find the SE library files. If your data files aren't there, you'll get the errors I assume you're seeing. Without knowing the exact errors you're seeing I can't confirm that's what is happening, although it's likely to be the case.
The seas_XX.se1 files
12, 18 and 24 are present. The same ephemeris files are shared by a Python library which does pick up the asteroids. I am unsure of the error within swe_calc_ut()
but the following conditional from the test code is triggered:
if ($xx['rc'] < 0)
with $xx['rc']
returning -1.
I initially assumed this was related to the tests failing on install, but might be a separate issue?
This is ARM (M1 processor).
Right now failing tests on ARM chipsets is a known issue which I'm still working on resolving. The library works regardless, however.
The seas_XX.se1 files 12, 18 and 24 are present. The same ephemeris files are shared by a Python library which does pick up the asteroids.
You can get the actual error message from $xx['serr']
like this:
$planets[$i] = array('error' => $xx['rc'], 'message' => $xx['serr']);
I really should update the example to include this anyway as it's necessary information.
Right now failing tests on ARM chipsets is a known issue which I'm still working on resolving. The library works regardless, however.
Excellent, that's great news.
You can get the actual error message from
$xx['serr']
like this:$planets[$i] = array('error' => $xx['rc'], 'message' => $xx['serr']);
That helped - it is indeed complaining about a missing file, even though it's there! I'll continue to experiment. Thanks for the help and apologies for tacking this onto the wrong error report, I assumed they were related.
Glad it was an easy diagnosis. I would check file perms next.
I am trying to compile swephp for PHP v8.2 and I see this warning:
In function âzif_swe_house_nameâ: /home/php-sweph/swephp.c:2888:7: warning: assignment discards âconstâ qualifier from pointer target type [-Wdiscarded-qualifiers] name = swe_house_name(hsys[0]);
Is it something I should be concerned with?
I do have a successful swephp.so file for PHP v7.3, but you apparently have to remake the .so file for every different version of PHP.
UPDATE: I also see this when I "make test".
FAIL Basic test [tests/swe_sol_eclipse.phpt]
Apparently there is a problem with the current code?