Comments (9)
Just to confirm:
- you can't reproduce the error on earlier versions of Ubuntu, using the same coordinate
- you can't reproduce the error on Ubuntu 16.04, using different coordinates
- you can't reproduce the error on Ubuntu 16.04 using e.g.
convert_bng([-7.30034511], [49.95888852])
from convertbng.
Just checked:
- convert_lonlat as used below works fine on my Ubuntu 14.04 64bit.
- a different BNG coordinate such as (315877,781709) still triggers the illegal instruction on Ubuntu 16.04.
- your convert_bng example works (fine?) on this Ubuntu 16.04, returning
([nan], [nan])
.
With this:
from convertbng.util import convert_lonlat, convert_bng
from numpy import isnan
def bng_to_longlat(bng):
""" Given a pair of BNG coordinates return its long and lat coordinates. """
try:
easting = [int(bng[0])]
northing = [int(bng[1])]
coordinates = convert_lonlat(easting, northing)
coordinate_long = coordinates[0][0]
coordinate_lat = coordinates[1][0]
if isnan(coordinate_long) or isnan(coordinate_lat):
return False
return (coordinate_long, coordinate_lat)
except ValueError:
return False
#print bng_to_longlat((20000,20000))
#print bng_to_longlat((315877,781709))
print convert_bng([-7.30034511], [49.95888852])
from convertbng.
Hmmm that's extremely confusing. If you change your import to
from convertbng.cutil import convert_lonlat
is the error triggered?
from convertbng.
With convertbng.cutil
, convert_lonlat
still causes Illegal Instruction while convert_bng
still seems to work.
As the library was simply installed by doing pip install convertbng
under the virtualenv from the preloaded python 2.7 of the distribution, could this be an issue with rustc and this particular CPU?
I think I'll try deploying it in a 16.04 VM at some time, just in case it's the CPU.
from convertbng.
If it's an x86 CPU, there's no reason it shouldn't work, although a dump of the system info might help. I haven't had a chance to try to reproduce this using 16.04 yet.
from convertbng.
Just tested the same code in a KVM VPS running 16.04 64bit, and it worked without issue. Therefore it is highly likely that something does not sing well between i5-3570S and Rust.
I'll find some time to look into this weird thing, thanks for your time.
from convertbng.
Okay, thanks for patching up the other repo. I have built a new liblonlat_bng.so
from lonlat_bng
, replaced the rust binary that pip installed ({virtualenv environment}/lib/python2.7/site-packages/convertbng/.libs/liblonlat_bng-783571af.so
) with liblonlat_bng.so
generated in lonlat_bng/target/release/liblonlat_bng.so
, and run the Python script again. It worked.
As the liblonlat_bng-783571af.so
binary from PyPI version 5.5 is still broken for this processor, I wonder if it is suitable to rebuild a binary and push to PyPI?
Thanks a lot for the assistance.
from convertbng.
from convertbng.
I totally understand. For something as strange as this, it is unlikely that a build tool can guarantee something working on this processor. I am however happy to test any binary coming out of manylinux.
The working binary can be found at https://mega.nz/#!0U9kQAab!2QYUjK6yRyZ837EMzD_N4xM1s9W4ZrLRSN4hYikrgWw for your inspection.
Cheers.
from convertbng.
Related Issues (12)
- Load fails on Windows 10 x64 HOT 5
- pip install fails on Fedora with Python 3.9 HOT 6
- Error installing on Mac with python 3.9 HOT 9
- pip install fails on Python 3.9.7 (Sep 16 2021) Windows 10 HOT 5
- Python 3.7 binary wheel for PyPI HOT 5
- pip install convertbng fails on Python 3.11 HOT 1
- Minor documentation typo HOT 2
- Ubuntu 18.04 64bit: Illegal instruction (core dumped) HOT 24
- Windows 10 64 bits installation trouble HOT 4
- Instructions for installation on FreeBSD please HOT 3
- Intermittent Segmentation faults on Ubuntu-20.04 LTS on WSL2 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from convertbng.