Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to pow' round' `atan2' #94

Open
yipmc opened this issue Jan 28, 2024 · 0 comments
Open

undefined reference to pow' round' `atan2' #94

yipmc opened this issue Jan 28, 2024 · 0 comments

Comments

@yipmc
Copy link

yipmc commented Jan 28, 2024

Hello,

I'm trying to install joycond-cemuhook using pip3 install git+https://github.com/joaorb64/joycond-cemuhook but I'm getting a bunch of errors like

      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:143: undefined reference to `pow'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:144: undefined reference to `atan2'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:146: undefined reference to `sincos'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:147: undefined reference to `exp'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:148: undefined reference to `log'

Searching the internet indicates it might be a problem with my python environment and somehow not using math library for the c compilation, but I haven't been able to find a solution. I have already tried pip3 install --upgrade --force-reinstall dbus-python but this gives me the same error. I'd appreciate any pointers, thank you.

My python version

uhcq@uhcq-Latitude-7310:~$ python --version
Python 3.10.4
uhcq@uhcq-Latitude-7310:~$ pip --version
pip 23.3.2 from /home/uhcq/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pip (python 3.10)

Full log

uhcq@uhcq-Latitude-7310:~$ pip3 install git+https://github.com/joaorb64/joycond-cemuhook
Collecting git+https://github.com/joaorb64/joycond-cemuhook
  Cloning https://github.com/joaorb64/joycond-cemuhook to /tmp/pip-req-build-lr6vk3oz
  Running command git clone --filter=blob:none --quiet https://github.com/joaorb64/joycond-cemuhook /tmp/pip-req-build-lr6vk3oz
  Resolved https://github.com/joaorb64/joycond-cemuhook to commit afa7601a702e93973705ed05fb95430ca1406d01
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting evdev (from joycond-cemuhook==0.0.1)
  Using cached evdev-1.6.1.tar.gz (26 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyudev (from joycond-cemuhook==0.0.1)
  Using cached pyudev-0.24.1-py3-none-any.whl (62 kB)
Collecting dbus-python (from joycond-cemuhook==0.0.1)
  Using cached dbus-python-1.3.2.tar.gz (605 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [187 lines of output]
      + meson setup /tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e /tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e/.mesonpy-rnoqv3v8 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e/.mesonpy-rnoqv3v8/meson-python-native-file.ini
      The Meson build system
      Version: 1.3.1
      Source dir: /tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e
      Build dir: /tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e/.mesonpy-rnoqv3v8
      Build type: native build
      Project name: dbus-python
      Project version: 1.3.2
      C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
      C linker for the host machine: cc ld.bfd 2.38
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Compiler for C supports arguments -fno-common: YES
      Compiler for C supports arguments -Wno-missing-field-initializers: YES
      Compiler for C supports arguments -Wno-declaration-after-statement: YES
      Compiler for C supports arguments -Wno-inline: YES
      Compiler for C supports arguments -Wno-redundant-decls: YES
      Compiler for C supports arguments -Wno-switch-default: YES
      Compiler for C supports arguments -Wno-write-strings: YES
      Compiler for C supports arguments -Wcast-align: YES
      Compiler for C supports arguments -Wdouble-promotion: YES
      Compiler for C supports arguments -Wduplicated-cond: YES
      Compiler for C supports arguments -Wfloat-equal: YES
      Compiler for C supports arguments -Wformat-nonliteral: YES
      Compiler for C supports arguments -Wformat-security: YES
      Compiler for C supports arguments -Wformat=2: YES
      Compiler for C supports arguments -Winit-self: YES
      Compiler for C supports arguments -Wlogical-op: YES
      Compiler for C supports arguments -Wmissing-declarations: YES
      Compiler for C supports arguments -Wmissing-format-attribute: YES
      Compiler for C supports arguments -Wmissing-include-dirs: YES
      Compiler for C supports arguments -Wmissing-noreturn: YES
      Compiler for C supports arguments -Wnull-dereference: YES
      Compiler for C supports arguments -Wpacked: YES
      Compiler for C supports arguments -Wpointer-arith: YES
      Compiler for C supports arguments -Wshadow: YES
      Compiler for C supports arguments -Wswitch-enum: YES
      Compiler for C supports arguments -Wundef: YES
      Compiler for C supports arguments -Wunused-but-set-variable: YES
      Compiler for C supports arguments -Wjump-misses-init: YES
      Compiler for C supports arguments -Wmissing-prototypes: YES
      Compiler for C supports arguments -Wnested-externs: YES
      Compiler for C supports arguments -Wold-style-definition: YES
      Compiler for C supports arguments -Wpointer-sign: YES
      Compiler for C supports arguments -Wstrict-prototypes: YES
      Configuring _dbus-python-config.h using configuration
      
      Executing subproject dbus-gmain
      
      dbus-gmain| Project name: dbus-gmain
      dbus-gmain| Project version: undefined
      dbus-gmain| C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
      dbus-gmain| C linker for the host machine: cc ld.bfd 2.38
      dbus-gmain| Compiler for C supports arguments -fno-common: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wcast-align: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wdouble-promotion: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wduplicated-branches: YES
      dbus-gmain| Compiler for C supports arguments -Wduplicated-cond: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wfloat-equal: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat-security: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat=2: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Winit-self: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wlogical-op: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-declarations: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-format-attribute: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-include-dirs: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-noreturn: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wnull-dereference: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpacked: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpointer-arith: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wredundant-decls: YES
      dbus-gmain| Compiler for C supports arguments -Wshadow: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wswitch-default: YES
      dbus-gmain| Compiler for C supports arguments -Wswitch-enum: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wundef: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wunused-but-set-variable: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wwrite-strings: YES
      dbus-gmain| Compiler for C supports arguments -Wdeclaration-after-statement: YES
      dbus-gmain| Compiler for C supports arguments -Wjump-misses-init: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-prototypes: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wnested-externs: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wold-style-definition: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpointer-sign: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
      dbus-gmain| Found pkg-config: YES (/usr/bin/pkg-config) 0.29.2
      dbus-gmain| Run-time dependency dbus-1 found: YES 1.12.20
      dbus-gmain| Run-time dependency glib-2.0 found: YES 2.72.4
      dbus-gmain| Run-time dependency gthread-2.0 found: YES 2.72.4
      dbus-gmain| Program dbus-run-session found: YES (/usr/bin/dbus-run-session)
      dbus-gmain| Build targets in project: 1
      dbus-gmain| Subproject dbus-gmain finished.
      
      Program python found: YES (/home/uhcq/.pyenv/versions/3.10.4/bin/python)
      Dependency dbus-1 found: YES 1.12.20 (cached)
      Run-time dependency python found: YES 3.10
      Configuring TestSuitePythonService.service using configuration
      Configuring tmp-session-bus.conf using configuration
      Program dbus-run-session found: YES (/usr/bin/dbus-run-session)
      ../test/meson.build:75: DEPRECATION: Project uses feature that was always broken, and is now deprecated since '1.3.0': str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof..
      Run-time dependency python found: YES 3.10
      Build targets in project: 5
      WARNING: Broken features used:
       * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'}
      
      dbus-python 1.3.2
      
        Subprojects
          dbus-gmain  : YES
      
        User defined options
          Native files: /tmp/pip-install-zf81jsdj/dbus-python_1525ec14d4a44e61a3626da59109675e/.mesonpy-rnoqv3v8/meson-python-native-file.ini
          buildtype   : release
          b_ndebug    : if-release
          b_vscrt     : md
      
      Found ninja-1.11.1.git.kitware.jobserver-1 at /tmp/pip-build-env-oyhxjbcb/overlay/bin/ninja
      + /tmp/pip-build-env-oyhxjbcb/overlay/bin/ninja
      [1/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_debug.c.o
      [2/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_exceptions.c.o
      [3/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_bytes.c.o
      [4/32] Compiling C object subprojects/dbus-gmain/libdbus-gmain.a.p/dbus-gmain.c.o
      [5/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_float.c.o
      [6/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_conn.c.o
      [7/32] Linking static target subprojects/dbus-gmain/libdbus-gmain.a
      [8/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_bus.c.o
      [9/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_generic.c.o
      [10/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_containers.c.o
      [11/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_abstract.c.o
      [12/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_unixfd.c.o
      [13/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_conn-methods.c.o
      [14/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_libdbusconn.c.o
      [15/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_int.c.o
      [16/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_mainloop.c.o
      [17/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_pending-call.c.o
      [18/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_module.c.o
      [19/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_signature.c.o
      [20/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_server.c.o
      [21/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_validation.c.o
      [22/32] Compiling C object test/test-import-repeatedly.p/import-repeatedly.c.o
      [23/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_string.c.o
      [24/32] Compiling C object test/dbus_py_test.cpython-310-x86_64-linux-gnu.so.p/dbus_py_test.c.o
      [25/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_message-get-args.c.o
      [26/32] Linking target test/dbus_py_test.cpython-310-x86_64-linux-gnu.so
      [27/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_message.c.o
      [28/32] Compiling C object _dbus_glib_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_glib_bindings_module.c.o
      [29/32] Linking target _dbus_glib_bindings.cpython-310-x86_64-linux-gnu.so
      [30/32] Compiling C object _dbus_bindings.cpython-310-x86_64-linux-gnu.so.p/dbus_bindings_message-append.c.o
      [31/32] Linking target _dbus_bindings.cpython-310-x86_64-linux-gnu.so
      [32/32] Linking target test/test-import-repeatedly
      FAILED: test/test-import-repeatedly
      cc  -o test/test-import-repeatedly test/test-import-repeatedly.p/import-repeatedly.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a -Wl,--end-group
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(floatobject.o): in function `_float_div_mod':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:639: undefined reference to `fmod'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(floatobject.o): in function `float_rem':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:619: undefined reference to `fmod'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(floatobject.o): in function `float___round___impl':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:1054: undefined reference to `round'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:1057: undefined reference to `round'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(floatobject.o): in function `float_pow':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:752: undefined reference to `fmod'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:762: undefined reference to `fmod'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:811: undefined reference to `pow'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/floatobject.c:788: undefined reference to `fmod'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(longobject.o): in function `PyLong_FromString':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/longobject.c:2286: undefined reference to `log'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(complexobject.o): in function `_Py_c_abs':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:206: undefined reference to `hypot'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(complexobject.o): in function `_Py_c_pow':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:142: undefined reference to `hypot'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:143: undefined reference to `pow'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:144: undefined reference to `atan2'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:146: undefined reference to `sincos'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:147: undefined reference to `exp'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:148: undefined reference to `log'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(complexobject.o): in function `_Py_c_abs':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Objects/complexobject.c:206: undefined reference to `hypot'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(pytime.o): in function `_PyTime_RoundHalfEven':
      /tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:106: undefined reference to `round'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:109: undefined reference to `round'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:106: undefined reference to `round'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:109: undefined reference to `round'
      /usr/bin/ld: /tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:106: undefined reference to `round'
      /usr/bin/ld: /home/uhcq/.pyenv/versions/3.10.4/lib/libpython3.10.a(pytime.o):/tmp/python-build.20231106083710.8651/Python-3.10.4/Python/pytime.c:109: more undefined references to `round' follow
      collect2: error: ld returned 1 exit status
      ninja: build stopped: subcommand failed.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant