Skip to content

cmake error #190

Description

@Jillinger

Building pyosmium in cygwin shell, I get the following.

-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/e/GameDevelopment/3DCityGML/installers/osmTools/pyosmium-3.2.0/build/temp.cygwin-3.3.3-x86_64-3.8
[ 13%] Building CXX object CMakeFiles/_replication.dir/lib/replication.cc.o
[ 13%] Building CXX object CMakeFiles/_osmium.dir/lib/osmium.cc.o
[ 20%] Linking CXX shared module ../lib.cygwin-3.3.3-x86_64-3.8/osmium/replication/_replication.cpython-38-x86_64-cygwin.dll
[ 26%] Building CXX object CMakeFiles/_osmium.dir/lib/merge_input_reader.cc.o
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccCrdIkl.ltrans0.ltrans.o:<artificial>:(.text+0x3): undefined reference to `__imp_PyProperty_Type'
........
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccCrdIkl.ltrans4.ltrans.o:<artificial>:(.text+0x4517): undefined reference to `PyModule_AddObject'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/_replication.dir/build.make:101: ../lib.cygwin-3.3.3-x86_64-3.8/osmium/replication/_replication.cpython-38-x86_64-cygwin.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/_replication.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 33%] Building CXX object CMakeFiles/_osmium.dir/lib/simple_writer.cc.o
[ 40%] Building CXX object CMakeFiles/_osmium.dir/lib/write_handler.cc.o
[ 46%] Linking CXX shared module ../lib.cygwin-3.3.3-x86_64-3.8/osmium/_osmium.cpython-38-x86_64-cygwin.dll
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccmm4Dzv.ltrans0.ltrans.o:<artificial>:(.text+0x3): undefined reference to `__imp_PyProperty_Type'
...........
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccmm4Dzv.ltrans13.ltrans.o:<artificial>:(.text+0x1c98): undefined reference to `PyErr_Clear'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/_osmium.dir/build.make:149: ../lib.cygwin-3.3.3-x86_64-3.8/osmium/_osmium.cpython-38-x86_64-cygwin.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/_osmium.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "setup.py", line 124, in <module>
    setup(
  File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 67, in run
    self.build_extension(ext)
  File "setup.py", line 114, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.

Not sure what the problem is.
How do I resolve this?

Activity

  1. lonvia commented on Mar 22, 2022

    @lonvia
    Member

    It can't find some symbols from the Python library. My guess would be that this is a configuration error where the includes for Python and the library don't match.

    Unfortunately I can't help any further as I don't have neither experience with nor access to Windows/cygwin. Moving this to the newly created Discussion section. Maybe another Wndows user can help.

  2. locked and limited conversation to collaborators on Mar 22, 2022
  3. converted this issue into a discussion #197 on Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions