uber / uber/h3-py

Compiling from source

Open
#262 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
144
Avg merge
7d 14h
Merged PRs (30d)
2

Description

Hi everyone, I have this issue trying to compile from source. So I have a question: Do you have compile instructions?

Command for compile and install:

python3 setup.py install

and it returns this error:

[ 83%] Built target edges
[ 86%] Generating C source src/h3/_cy/to_multipoly.c
[ 89%] Building C object src/h3/_cy/CMakeFiles/to_multipoly.dir/to_multipoly.c.o
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:1666:1: warning: parameter names (without types) in function declaration
1666 | static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double(__pyx_ctuple_double__and_double);
| ^~~~~~
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:1811:41: error: expected declaration specifiers or ‘...’ before ‘’ token
1811 | static __pyx_ctuple_double__and_double (
__pyx_f_2h3_3_cy_4util_coord2deg)(GeoCoord); /proto/
| ^
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c: In function ‘__pyx_f_2h3_3_cy_12to_multipoly_walk_coords’:
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:2419:70: warning: implicit declaration of function ‘__pyx_f_2h3_3_cy_4util_coord2deg’; did you mean ‘__pyx_f_2h3_3_cy_4util_check_cell’? [-Wimplicit-function-declaration]
2419 | __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_double__and_double(__pyx_f_2h3_3_cy_4util_coord2deg(__pyx_v_L->vertex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __pyx_f_2h3_3_cy_4util_check_cell
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c: In function ‘__Pyx_modinit_function_import_code’:
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:17381:70: error: ‘__pyx_f_2h3_3_cy_4util_coord2deg’ undeclared (first use in this function); did you mean ‘__pyx_f_2h3_3_cy_4util_check_cell’?
17381 | if (__Pyx_ImportFunction(__pyx_t_1, "coord2deg", (void (**)(void))&__pyx_f_2h3_3_cy_4util_coord2deg, "__pyx_ctuple_double__and_double (GeoCoord)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| __pyx_f_2h3_3_cy_4util_check_cell
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:17381:70: note: each undeclared identifier is reported only once for each function it appears in
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c: At top level:
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:20812:73: error: unknown type name ‘__pyx_ctuple_double__and_double’
20812 | static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double(__pyx_ctuple_double__and_double value) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/adrian/h3-py/_skbuild/linux-x86_64-3.8/cmake-build/src/h3/_cy/to_multipoly.c:1666:18: warning: ‘__pyx_convert__to_py___pyx_ctuple_double__and_double’ used but never defined
1666 | static PyObject* __pyx_convert__to_py___pyx_ctuple_double__and_double(__pyx_ctuple_double__and_double);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/h3/_cy/CMakeFiles/to_multipoly.dir/build.make:81: src/h3/_cy/CMakeFiles/to_multipoly.dir/to_multipoly.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:407: src/h3/_cy/CMakeFiles/to_multipoly.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Traceback (most recent call last):
File "/home/adrian/.local/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
cmkr.make(make_args, install_target=cmake_install_target, env=env)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with setup.py and the skbuild/CMake build output shown in the report to determine the supported source-build prerequisites and command. Document a reproducible compile-and-install procedure, including the conditions needed to avoid the reported generated-C compilation failure, and verify it from a clean checkout.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.