rodluger / pysyzygy Goto Github PK
View Code? Open in Web Editor NEWA fast and general planet transit (syzygy) code written in C and in Python
License: MIT License
A fast and general planet transit (syzygy) code written in C and in Python
License: MIT License
I'm having problems in everest
which appear to come from pysyzygy
failing to compile. I just installed everest
with pip3 install everest-pipeline --user
, which gave no error. On my first attempt to import it, I get
$ python3 -c "import everest"
[pysyzygy] Compiling C source code...
transit.c: In function ‘Interpolate’:
transit.c:688:34: error: ‘HUGE’ undeclared (first use in this function)
transit->tN[transit->ntrans] = HUGE; // A bit of a hack, but essential to get the last transit right below
^~~~
transit.c:688:34: note: each undeclared
identifier is reported only once for each function it appears in
make: *** [Makefile:20: all] Error 1
Traceback (most recent call last):
File "/home/wball/.local/lib/python3.6/site-packages/pysyzygy/transit.py", line 338, in <module>
lib = ctypes.CDLL(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'transitlib.so'))
File "/usr/lib64/python3.6/ctypes/__init__.py", line 343, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/wball/.local/lib/python3.6/site-packages/pysyzygy/transitlib.so: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/wball/.local/lib/python3.6/site-packages/everest/__init__.py", line 23, in <module>
from . import transit
File "/home/wball/.local/lib/python3.6/site-packages/everest/transit.py", line 19, in <module>
import pysyzygy as ps
File "/home/wball/.local/lib/python3.6/site-packages/pysyzygy/__init__.py", line 26, in <module>
from .transit import *
File "/home/wball/.local/lib/python3.6/site-packages/pysyzygy/transit.py", line 340, in <module>
raise Exception("Can't find `transitlib.so`; please run `make` to compile `pysyzygy`.")
Exception: Can't find `transitlib.so`; please run `make` to compile `pysyzygy`.
I navigated to the pysyzygy
folder and tried running make
there myself, which just isolates the compile-time error above:
$ make
[pysyzygy] Compiling C source code...
transit.c: In function ‘Interpolate’:
transit.c:688:34: error: ‘HUGE’ undeclared (first use in this function)
transit->tN[transit->ntrans] = HUGE; // A bit of a hack, but essential to get the last transit right below
^~~~
transit.c:688:34: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:20: all] Error 1
I don't speak C but Googling the error gave me this hit, which suggested replacing HUGE
with HUGE_VAL
. That seemed to fix things for me. I hesitate to make a PR because I'm not sure if it my break compatibility on other systems.
I'm running Fedora 28 with gcc 8.1.1
. Here's my detailed compiler information
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.