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

CMake Error at diffvg_generated_diffvg.cpp.o.Release.cmake #88

Open
kilhny opened this issue Nov 3, 2024 · 4 comments
Open

CMake Error at diffvg_generated_diffvg.cpp.o.Release.cmake #88

kilhny opened this issue Nov 3, 2024 · 4 comments

Comments

@kilhny
Copy link

kilhny commented Nov 3, 2024

CMake Error at diffvg_generated_diffvg.cpp.o.Release.cmake:280 (message):
Error generating file
/home/users/diffvg/build/temp.linux-x86_64-cpython-38/CMakeFiles/diffvg.dir//./diffvg_generated_diffvg.cpp.o
gmake[2]: *** [CMakeFiles/diffvg.dir/build.make:77: CMakeFiles/diffvg.dir/diffvg_generated_diffvg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:99: CMakeFiles/diffvg.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
.
.
.

subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j8']' returned non-zero exit status 2.

@kilhny
Copy link
Author

kilhny commented Nov 5, 2024

After replacing with gcc,gxx=8.5.0,run
[rm -rf build/
mkdir build
cd build
cmake ..
make
]the problem was solved,but if you can't find diffvg or pydiffvg, you can run the python setup.py install again

@MartensCedric
Copy link

same issue with gcc 11.4

-- Build files have been written to: /home/cedric/diffvg/build/temp.linux-x86_64-cpython-312
[ 14%] Building NVCC (Device) object CMakeFiles/diffvg.dir/diffvg_generated_scene.cpp.o
[ 28%] Building NVCC (Device) object CMakeFiles/diffvg.dir/diffvg_generated_diffvg.cpp.o
/home/cedric/diffvg/pybind11/include/pybind11/cast.h(446): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(446): error: type name is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(446): error: expected an expression

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(448): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(448): error: type name is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(448): error: expected an expression

/home/cedric/diffvg/pybind11/include/pybind11/cast.h(449): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/pybind11.h(2105): error: class "_ts" has no member "frame"

/home/cedric/diffvg/pybind11/include/pybind11/pybind11.h(2106): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/pybind11.h(2107): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/pybind11.h(2110): error: pointer to incomplete class type "_frame" is not allowed

/home/cedric/diffvg/pybind11/include/pybind11/pybind11.h(2110): error: pointer to incomplete class type "_frame" is not allowed

12 errors detected in the compilation of "/home/cedric/diffvg/diffvg.cpp".
CMake Error at diffvg_generated_diffvg.cpp.o.Release.cmake:280 (message):
  Error generating file
  /home/cedric/diffvg/build/temp.linux-x86_64-cpython-312/CMakeFiles/diffvg.dir//./diffvg_generated_diffvg.cpp.o


gmake[2]: *** [CMakeFiles/diffvg.dir/build.make:77: CMakeFiles/diffvg.dir/diffvg_generated_diffvg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:108: CMakeFiles/diffvg.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "/home/cedric/diffvg/setup.py", line 92, in <module>
    setup(name = 'diffvg',
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 183, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
    dist.run_commands()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
    self.run_command(cmd)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/install.py", line 97, in run
    self.do_egg_install()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/install.py", line 149, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/bdist_egg.py", line 168, in run
    cmd = self.call_command('install_lib', warn_dir=False)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/bdist_egg.py", line 154, in call_command
    self.run_command(cmdname)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/install_lib.py", line 19, in run
    self.build()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/command/install_lib.py", line 110, in build
    self.run_command('build_ext')
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/cedric/diffvg/setup.py", line 31, in run
    super().run()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 98, in run
    _build_ext.run(self)
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
  File "/home/cedric/anaconda3/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/cedric/diffvg/setup.py", line 66, in build_extension
    subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
  File "/home/cedric/anaconda3/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j8']' returned non-zero exit status

@MartensCedric
Copy link

As @kilhny mentions, you need gcc 8. However, gcc 8 has been discontinued for Ubuntu 22.04 and up. It would be great to enable compilation on Ubuntu 22 without going through the hoops of trying to install a discontinued gcc

@patelchaitany
Copy link

dongrading your gcc version to 9.5.0 and g++ version to 9.5.0 it seems it make it work

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

3 participants