bwinkel / cysgp4

A wrapper around the SGP4 package, for sat TLE calculations
Apache License 2.0
23 stars 2 forks source link

Build problem under POP OS #21

Open mls0007 opened 2 years ago

mls0007 commented 2 years ago

Updated to a new version of Pop Os (22.04 LTS) and can no longer install cysgp4. It looks like it is trying to recompile numpy (current version 1.23.2) which it shouldn't be doing since cysgp4 requires numpy 1.13 or greater. Currently running python 3.10.4, and using gcc 11.2.0.

stokes@pop-os:~/src/python/cython/cysgp4$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)

I've attached the build log. Thanks for having a look ..... Mike

build_log.txt

bwinkel commented 2 years ago

Thanks for reporting the problem. I may have an idea, what's going on.

First, the project.toml is a bit outdated, as it does only have the following version pins:

[build-system]
requires = [
    "setuptools>=30.3.0",
    "wheel",
    "setuptools_scm",
    "cython",  # >=0.29
    #"numpy==1.13.1",
    "numpy==1.13.1; python_version<'3.7'",
    "numpy==1.14.5; python_version>='3.7'",
    ]
build-backend = "setuptools.build_meta"

For Python 3.10, there is no numpy 1.14.5 anymore. I will update this.

A second reason is probably be a new installation philosophy in pip, which nowadays tries to install stuff in isolated build environments. So even if you had the correct numpy, it would still download it (not necessarily compile it from source). There is a flag to avoid this:

python -m pip install --no-build-isolation cysgp4

(One might also need to add the --no-deps option, but I'm not sure.)

Could you try this? In the meantime I'll fix the project.toml. Could well be that both issues need to be fixed, before it works.

bwinkel commented 2 years ago

Actually, better use the --no-deps from the start. Otherwise, pip might overwrite your installed numpy version.

bwinkel commented 2 years ago

I created a new release and, hopefully, it should work now. Could you please try again?

mls0007 commented 2 years ago

The new version works for me. I have a friend trying to install it under Windows and will let you know how that resolves! Thank you Benjamin!

Just heard back. This fixed the Windog version as well!

bwinkel commented 2 years ago

Glad to hear that.