Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#52869 closed defect (fixed)

OpenSceneGraph: fails to build due to changes in jpeg port

Reported by: mkae (Marko Käning) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: dbevans (David B. Evans), ryandesign (Ryan Carsten Schmidt), dershow
Port: OpenSceneGraph OpenSceneGraph-devel

Description

:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/build/src/osgWrappers/serializers/osg && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++   -Dosgdb_serializers_osg_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/include -F//System/Library/Frameworks -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/build/include  -pipe -Os   -std=c++11 -stdlib=libc++  -Wno-conversion -DNDEBUG -arch x86_64 -mmacosx-version-min=10.9 -fPIC   -o CMakeFiles/osgdb_serializers_osg.dir/PointSprite.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgWrappers/serializers/osg/PointSprite.cpp
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp:252:32: error: assigning to 'boolean (*)(j_decompress_ptr)' from incompatible type 'boolean (j_decompress_ptr)': different return type ('boolean' vs 'boolean' (aka 'int'))
:info:build     src->pub.fill_input_buffer = fill_input_buffer;
:info:build                                ^ ~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp:381:35: error: assigning to 'boolean (*)(j_compress_ptr)' from incompatible type 'boolean (j_compress_ptr)': different return type ('boolean' vs 'boolean' (aka 'int'))
:info:build     dest->pub.empty_output_buffer = empty_output_buffer;
:info:build                                   ^ ~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp:539:12: error: no matching function for call to 'jpeg_read_header'
:info:build     (void) jpeg_read_header(&cinfo, TRUE);
:info:build            ^~~~~~~~~~~~~~~~
:info:build /opt/local/include/jpeglib.h:1039:13: note: candidate function not viable: no known conversion from 'int' to 'boolean' for 2nd argument
:info:build EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo,
:info:build             ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp:761:13: error: no matching function for call to 'jpeg_set_quality'
:info:build             jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
:info:build             ^~~~~~~~~~~~~~~~
:info:build /opt/local/include/jpeglib.h:991:14: note: candidate function not viable: no known conversion from 'int' to 'boolean' for 3rd argument
:info:build EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality,
:info:build              ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp:768:13: error: no matching function for call to 'jpeg_start_compress'
:info:build             jpeg_start_compress(&cinfo, TRUE);
:info:build             ^~~~~~~~~~~~~~~~~~~
:info:build /opt/local/include/jpeglib.h:1010:14: note: candidate function not viable: no known conversion from 'int' to 'boolean' for 2nd argument
:info:build EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo,
:info:build              ^
:info:build [ 36%] Building CXX object src/osgWrappers/deprecated-dotosg/osg/CMakeFiles/osgdb_deprecated_osg.dir/LOD.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/build/src/osgWrappers/deprecated-dotosg/osg && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++   -Dosgdb_deprecated_osg_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/include -F//System/Library/Frameworks -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/build/include  -pipe -Os   -std=c++11 -stdlib=libc++  -Wno-conversion -DNDEBUG -arch x86_64 -mmacosx-version-min=10.9 -fPIC   -o CMakeFiles/osgdb_deprecated_osg.dir/LOD.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/OpenSceneGraph-3.4.0/src/osgWrappers/deprecated-dotosg/osg/LOD.cpp
:info:build 5 errors generated.
:info:build make[2]: *** [src/osgPlugins/jpeg/CMakeFiles/osgdb_jpeg.dir/ReaderWriterJPEG.cpp.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_OpenSceneGraph/OpenSceneGraph/work/build'
:info:build make[1]: *** [src/osgPlugins/jpeg/CMakeFiles/osgdb_jpeg.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....

Change History (10)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

comment:2 Changed 7 years ago by dershow

Cc: dershow added

comment:3 Changed 7 years ago by dershow

Any idea what the problem is here? Does it relate to these?

Or is the problem something else? It seems that OpenSceneGraph doesn't directly depend on jpeg, but does indirectly through jasper, which seems to still build fine.

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 in reply to:  3 Changed 7 years ago by dbevans (David B. Evans)

Replying to dershow:

Any idea what the problem is here? Does it relate to these?

Or is the problem something else? It seems that OpenSceneGraph doesn't directly depend on jpeg, but does indirectly through jasper, which seems to still build fine.

OpenSceneGraph doesn't directly declare a dependency on jpeg but probably should as can be seen from the failing code. As you mention, the reason this code has compiled before is that jpeg is brought in by jasper. This is, indeed, an example of the boolean patch issue mentioned in #51013. The issue also applies to OpenSceneGraph-devel. Now that the patch has been removed, ports that relied on it need to be adjusted.

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 7 years ago by dbevans (David B. Evans)

Port: OpenSceneGraph-devel added

comment:6 Changed 7 years ago by mkae (Marko Käning)

@dbevans, so, what could be done about this for OSG(-devel) then?

comment:7 Changed 7 years ago by dbevans (David B. Evans)

Since the jpeg developers claim this sort of problem is not theirs, I suggest reporting this upstream to the OSG developers and see if they can come up with a fix.

comment:8 Changed 7 years ago by dershow

It looks like it has been discussed some at OSG: https://github.com/openscenegraph/OpenSceneGraph/issues/58

comment:9 Changed 7 years ago by mkae (Marko Käning)

Resolution: fixed
Status: newclosed

In 20d446bc/macports-ports:

OpenSceneGraph: introduce new patch as workaround for trouble with jpeg

Closes: #52869
See: https://github.com/openscenegraph/OpenSceneGraph/issues/58

comment:10 Changed 7 years ago by mkae (Marko Käning)

In a54de1ab/macports-ports:

OpenSceneGraph: introduce new patch as workaround for trouble with jpeg

Closes: #52869
See: https://github.com/openscenegraph/OpenSceneGraph/issues/58

Note: See TracTickets for help on using tickets.