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

Error with make PythonAPI #901

Closed
nicolebd opened this issue Oct 23, 2018 · 8 comments
Closed

Error with make PythonAPI #901

nicolebd opened this issue Oct 23, 2018 · 8 comments
Labels
stale Issue has not had recent activity

Comments

@nicolebd
Copy link

nicolebd commented Oct 23, 2018

I have built Carla from source on Ubuntu 16.04. Whenever I try to run make PythonAPI, I get the following:

In file included from source/libcarla/libcarla.cpp:38:
In file included from source/libcarla/SensorData.cpp:9:
In file included from dependencies/include/carla/image/ImageIO.h:9:
In file included from dependencies/include/carla/image/ImageIOConfig.h:50:
In file included from dependencies/include/boost/gil/extension/io/png_io.hpp:35:
In file included from /usr/include/png.h:321:
/usr/include/pngconf.h:383:12: error: unknown type name '__pngconf'
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:383:21: error: cannot use dot operator on a type
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:384:12: error: unknown type name 'dont'
dont include it again.;
^
/usr/include/pngconf.h:384:28: error: expected ';' after top level declarator
dont include it again.;
^
4 errors generated.
error: command 'clang-5.0' failed with exit status 1
Util/BuildTools/Linux.mk:47: recipe for target 'PythonAPI' failed
make: *** [PythonAPI] Error 1

EDIT: Setting -DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=false in the setup.py file works for my purpose.

@nicolebd nicolebd changed the title Error with 'make PythonAPI' Error with make PythonAPI Oct 23, 2018
@nsubiron
Copy link
Collaborator

Hi @nicolebd,

You need to install libpng16-dev. Last merges into master require these new dependencies

sudo apt-get install libpng16-dev libtiff5-dev libjpeg-dev

@Unlingius
Copy link

Unlingius commented Dec 20, 2018

@nsubiron I tried to install libpng16-dev, it depends on libpng16-devtools - this lib conflicts with many other libs in my system, including ros. In ros I use libpng12. Is that possible to change version in carla to 12? How difficult it will be for me?

@nsubiron
Copy link
Collaborator

Hi @Unlingius, yes, it's a known issue, unfortunately our image library (Boost.GIL) does not support libpng12. You can apply the changes in #924 for now and save the images in TIFF.

@Unlingius
Copy link

Thank you so mush! It works fine!

@Unlingius
Copy link

@nsubiron i try to compile newest release 0.9.2 and this instruction doesn't work now. Compilation crashes with that error:
/usr/include/pngconf.h:383:12: error: unknown type name '__pngconf'
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:383:21: error: cannot use dot operator on a type
pngconf.h in libpng already includes setjmp.h;
^
/usr/include/pngconf.h:384:12: error: unknown type name 'dont'
dont include it again.;
^
/usr/include/pngconf.h:384:28: error: expected ';' after top level declarator
dont include it again.;

How can i fix it?

@Unlingius
Copy link

Unlingius commented Jan 16, 2019

fixed. see extra_compile_args += ['-DLIBCARLA_IMAGE_WITH_PNG_SUPPORT=true'] in PythonAPI/setup.py

@hynkis
Copy link

hynkis commented Feb 16, 2019

Thanks, Unlingius. Changing 'true' to 'false' makes it work!

@stale
Copy link

stale bot commented Apr 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Apr 17, 2019
@stale stale bot closed this as completed Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue has not had recent activity
Development

No branches or pull requests

4 participants