Opened 11 years ago
Last modified 10 years ago
#41241 new defect
vxl fails to build on OS X 10.9 Mavericks
Reported by: | andreas.schuh.84@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | mavericks | Cc: | ChristianFrisson (Christian Frisson), mojca (Mojca Miklavec), rfabbri@…, gjolleyrogers (Garry Jolley-Rogers) |
Port: | vxl |
Description
:info:build /Applications/Xcode.app/Contents/Developer/usr/bin/make -f core/vbl/tests/CMakeFiles/vbl_test_all.dir/build.make core/vbl/tests/CMakeFiles/vbl_test_all.dir/depend :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core/vul/vul_psfile.cxx:2: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core/vul/vul_psfile.h:40:28: error: cannot cast from type 'std::ofstream' (aka 'basic_ofstream<char>') to pointer type 'void *' :info:build operator bool() { return (void*)output_filestream!=(void*)0; } :info:build ^~~~~~~~~~~~~~~~~~~~~~~~
When I change this line to
// or should this be !output_filestream.bad() && !output_filestream.fail() ? return output_filestream.good()
it continues past this point but then I get the following error:
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core/vbl/io/tests && /usr/bin/clang++ -DVXL_LEGACY_ERROR_REPORTING -DVXL_WARN_DEPRECATED -DVXL_WARN_DEPRECATED_ONCE -pipe -Os -Werror=gnu -Wno-error=vla -I/opt/local/include -arch x86_64 -DNDEBUG -arch x86_64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/vcl -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core -o CMakeFiles/vbl_io_test_all.dir/test_smart_ptr_io.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core/vbl/io/tests/test_smart_ptr_io.cxx :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_vxl/vxl/work/vxl-1.17.0/core/vil/file_formats/vil_openjpeg.cxx:107:3: error: unknown type name 'opj_codec_t'; did you mean 'opj_poc_t'? :info:build opj_codec_t *codec_; :info:build ^~~~~~~~~~~
Attachments (6)
Change History (19)
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mavericks added; vxl maverick os x 10.9 removed |
---|---|
Summary: | vxl fails to build on OS X 10.9 Maverick → vxl fails to build on OS X 10.9 Mavericks |
comment:2 Changed 11 years ago by andreas.schuh.84@…
I sent an email to the vxl-users list as they don't seem to use an issue tracker like Trac.
comment:3 follow-up: 10 Changed 11 years ago by andreas.schuh.84@…
For documentation, I managed to solve the openjpeg2 related 'unknown type name 'opj_codec_t' error as follows:
- Set VXL_FORCE_V3P_OPENJPEG2 to ON
- Add the following to core/vil/CMakeLists.txt around line 133 after all dependencies were looked for. Required because the more recent (incompatible) OpenJPEG2 header files were in the same MacPorts installation directory as other dependencies.
IF(NOT VXL_USING_NATIVE_OPENJPEG2) INCLUDE_DIRECTORIES(BEFORE ${OPENJPEG2_INCLUDE_DIR}) ENDIF()
Changed 11 years ago by ChristianFrisson (Christian Frisson)
Changed 11 years ago by ChristianFrisson (Christian Frisson)
Attachment: | patch-fix-ffmpeg-support.diff added |
---|
Changed 11 years ago by ChristianFrisson (Christian Frisson)
Attachment: | patch-fix-find-X11.diff added |
---|
Changed 11 years ago by ChristianFrisson (Christian Frisson)
Attachment: | patch-fix-include-openjpeg.diff added |
---|
comment:4 Changed 11 years ago by ChristianFrisson (Christian Frisson)
Hi,
I could manage to make it work on OSX 10.9.2, attached are the modified Portfile and 3 diffs.
It uses a newer git revision from https://github.com/vxl/vxl rather than the release.
As mentioned in ticket #42872, using PortGroup cmake 1.0
in the Porfile has CMake automatically fed with too many (too early) includes of $prefix/include
, what prevents the compilation of vxl against an internal openjpeg 2.x. This is an issue if for instance ffmpeg is installed, which currently depends on openjpeg15 which gets precedence in the included directories order, even if cmake command include_directories(BEFORE ...)
is used as proposed by Andreas above. Adding
configure.cflags-delete ${configure.cppflags} configure.cxxflags-delete ${configure.cppflags}
didn't work for me, so I uglily pasted the contents of ${prefix}/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/cmake-1.0.tcl
, commenting out the configure.cppflags appends.
I'm not sure the cmake files are installed in the proper directory which is currently ${prefix}/share/vxl/cmake
. For instance OpenCV doesn't have the trailing cmake subdir.
Best regards, Christian.
comment:5 Changed 11 years ago by mf2k (Frank Schima)
Per the guidelines, please instead attach a unified diff of the Portfile so we can easily see what changes you are proposing.
Changed 11 years ago by ChristianFrisson (Christian Frisson)
Attachment: | Portfile-vxl.diff added |
---|
comment:6 Changed 11 years ago by ChristianFrisson (Christian Frisson)
Cc: | christian.frisson@… added |
---|
Cc Me!
comment:7 Changed 11 years ago by ChristianFrisson (Christian Frisson)
Hi,
I've just attached the unified diff of the Portfile.
Best regards, Christian
comment:10 Changed 11 years ago by rfabbri@…
Replying to andreas.schuh.84@…:
IF(NOT VXL_USING_NATIVE_OPENJPEG2) INCLUDE_DIRECTORIES(BEFORE ${OPENJPEG2_INCLUDE_DIR}) ENDIF()
I have VXL privileges to commit that change. And it solves my problem. Do you think I should just go ahead?
comment:11 Changed 10 years ago by mojca (Mojca Miklavec)
The issue is the cmake PortGroup has been fixed. How does that affect vxl?
comment:12 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | garry@… added |
---|
Has duplicate #44539.
Changed 10 years ago by andreas.schuh.84@…
Attachment: | patch-fix-ffmpeg-support.2.diff added |
---|
Fix FFMPEG API calls, requires FFMPEG >= lavf 53.25.0 / 53.17.0
comment:13 Changed 10 years ago by andreas.schuh.84@…
After running into this issue again after update to OS X 10.10 Yosemite, I stumbled upon this/my previous issue report. Applying the Portfile patch provided by Christian was unfortunately not sufficient due to some more FFMPEG API changes. I attached an updated FFMPEG support patch for VXL. After replacing Christian's patch by this file (i.e. "cp ~/Downloads/patch-fix-ffmpeg-support.2.diff $(port dir vxl)/files/patch-fix-ffmpeg-support.diff"), the build of VXL succeeded using his patched Portfile. Thanks, Andreas.
Could you please report this problem to the developers of vxl so that they can fix it?