From: Jonathan S. <jjs...@vc...> - 2007-10-04 13:55:56
|
Dragan and Thomas OK, I finally managed to get octaviz installed on my Mac. It required a few hacks to make files _post cmake_. I detail the issues below so that we can try to resolve them at the cmake step. For the record, I installed octave and VTK via Fink. Are you subscribed to the octaviz-help mailing list? If so, I will not cc you in future emails about this. Thanks, Jonathan Problem 1: A few of the vtk functions will not compile, giving this error: /sw/include/vtk-5.0/vtkStreamTracer.h: In member function 'virtual void vtkStreamTracer::SetIntegrationDirection(int)': /sw/include/vtk-5.0/vtkStreamTracer.h:263: error: 'vtkStreamTracer::<anonymous enum>' is/uses anonymous type /sw/include/vtk-5.0/vtkStreamTracer.h:263: error: trying to instantiate 'template<class T> template<class U> octave_int::octave_int(U)' As a workaround, I added these lines to CMakeLists.txt of the octaviz directory: # below won't build on Mac OS X, JJS 10/2/07 SET(VTK_CLASS_WRAP_EXCLUDE_vtkStreamTracer 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkTensorGlyph 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkDEMReader 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkTIFFWriter 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkCameraInterpolator 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkQuaternionInterpolator 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkTransformInterpolator 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkProjectedTerrainPath 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkImagePlaneWidget 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkDistributedStreamTracer 1) SET(VTK_CLASS_WRAP_EXCLUDE_vtkPStreamTracer 1) I suspect that this might be a compiler problem. I am using Apple Xcode tools 2.4.1 with gcc 4.0. I might try a different gcc eventually, but that may involve rebuilding all kinds of dependencies :( Problem 2: Linking of libraries does not work automatically. As a workaround, I added -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon to Common/CMakeFiles/octaviz.dir/link.txt. I notice that the equivalent flags are not included or needed when compiling in Linux. Nonetheless, it shouldn't hurt to add them universally. Can you help me make changes to the appropriate CMakeLists.txt file to add these? Problem 3: For some reason, the location of these files are listed to be (and theire .cc files also) "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt8Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt16Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt32Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt64Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt8Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt16Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt32Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt64Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeFloat32Array.oct" "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeFloat64Array.oct" As a workaround, I manually edited Common/CMakeFiles/Common.dir/build.make Common/CMakeFiles/Common.dir/cmake_clean.cmake Common/cmake_install.cmake and removed the "/sw/.../VTK/" part of the paths. Any idea how to resolve this? I find this bug (I think it is a bug) a bit strange since all the other VTK translated header files do not have this problem. Problem 4: I needed to add "-lvtkRendering" to the build line for vtkRaiseWindow.cc in Common/CMakeFiles/Common.dir/build.make. Not sure why this isn't needed in Linux, but again it wouldn't hurt to add the flag universally. I'm guessing that this can be done by simply adding the flag to the ADD_CUSTOM_COMMAND for vtkRaiseWindow in Common/CMakeLists.txt. I can try this the next time I compile octaviz. |
From: Thomas W. <tho...@gm...> - 2007-10-05 07:27:28
|
Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: > Dragan and Thomas > > OK, I finally managed to get octaviz installed on my Mac. It required a > few hacks to make files _post cmake_. I detail the issues below so > that we can try to resolve them at the cmake step. For the record, I > installed octave and VTK via Fink. > > Are you subscribed to the octaviz-help mailing list? If so, I will not > cc you in future emails about this. I did subscribe now. I wasn't aware there's a help mailing list. First question: did you use current CVS for building? > Problem 1: > A few of the vtk functions will not compile, giving this error: > > /sw/include/vtk-5.0/vtkStreamTracer.h: In member function 'virtual void > vtkStreamTracer::SetIntegrationDirection(int)': > /sw/include/vtk-5.0/vtkStreamTracer.h:263: error: > 'vtkStreamTracer::<anonymous enum>' is/uses anonymous type > /sw/include/vtk-5.0/vtkStreamTracer.h:263: error: trying to > instantiate 'template<class T> template<class U> octave_int::octave_int(U)' > > As a workaround, I added these lines to CMakeLists.txt of the octaviz > directory: > > # below won't build on Mac OS X, JJS 10/2/07 > SET(VTK_CLASS_WRAP_EXCLUDE_vtkStreamTracer 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkTensorGlyph 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkDEMReader 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkTIFFWriter 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkCameraInterpolator 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkQuaternionInterpolator 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkTransformInterpolator 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkProjectedTerrainPath 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkImagePlaneWidget 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkDistributedStreamTracer 1) > SET(VTK_CLASS_WRAP_EXCLUDE_vtkPStreamTracer 1) > > I suspect that this might be a compiler problem. I am using Apple Xcode > tools 2.4.1 with gcc 4.0. I might try a different gcc eventually, but > that may involve rebuilding all kinds of dependencies :( I can't remember having these problems under Linux. Then again, I don't know when I last used gcc-4.0 (Debian is currently switching from 4.1 to 4.2). > Problem 2: > Linking of libraries does not work automatically. As a workaround, I added > > -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon Can you post the mkoctfile script? > to Common/CMakeFiles/octaviz.dir/link.txt. I notice that the equivalent > flags are not included or needed when compiling in Linux. Nonetheless, > it shouldn't hurt to add them universally. Can you help me make changes > to the appropriate CMakeLists.txt file to add these? What does $ objdump -p /usr/bin/octave-2.9.14 say? This will only give meaningful results if the file is a binary. Under Linux, the binary is compiled with an rpath that points to /usr/lib/octave-2.9.14, so the octave binary 'knows' where its symbols are. > Problem 3: > For some reason, the location of these files are listed to be (and > theire .cc files also) > > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt8Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt16Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt32Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt64Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt8Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt16Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt32Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeUInt64Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeFloat32Array.oct" > "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeFloat64Array.oct" > > As a workaround, I manually edited > > Common/CMakeFiles/Common.dir/build.make > Common/CMakeFiles/Common.dir/cmake_clean.cmake > Common/cmake_install.cmake > > and removed the "/sw/.../VTK/" part of the paths. Any idea how to > resolve this? I find this bug (I think it is a bug) a bit strange since > all the other VTK translated header files do not have this problem. Bug in VTK, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736 > Problem 4: > I needed to add "-lvtkRendering" to the build line for > vtkRaiseWindow.cc > in Common/CMakeFiles/Common.dir/build.make. Not sure why this isn't > needed in Linux, but again it wouldn't hurt to add the flag > universally. > I'm guessing that this can be done by simply adding the flag to the > ADD_CUSTOM_COMMAND for vtkRaiseWindow in Common/CMakeLists.txt. I > can > try this the next time I compile octaviz. Thomas |
From: Jonathan S. <jjs...@vc...> - 2007-10-05 14:17:01
Attachments:
link.txt
|
Thomas Weber wrote: > Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: >> Dragan and Thomas >> >> OK, I finally managed to get octaviz installed on my Mac. It required a >> few hacks to make files _post cmake_. I detail the issues below so >> that we can try to resolve them at the cmake step. For the record, I >> installed octave and VTK via Fink. >> >> Are you subscribed to the octaviz-help mailing list? If so, I will not >> cc you in future emails about this. > > I did subscribe now. I wasn't aware there's a help mailing list. > > First question: did you use current CVS for building? Yes. Since I had the some of the issues with the modified build system that you sent me, I decided to work with what is currently in CVS. > >> Problem 1: >> A few of the vtk functions will not compile, giving this error: >> <snip> >> I suspect that this might be a compiler problem. I am using Apple Xcode >> tools 2.4.1 with gcc 4.0. I might try a different gcc eventually, but >> that may involve rebuilding all kinds of dependencies :( > > I can't remember having these problems under Linux. Then again, I don't > know when I last used gcc-4.0 (Debian is currently switching from 4.1 to > 4.2). > OK. If we get the others resolved, maybe we can do something like "if mac os x, exclude building the problem libraries" in CMakeLists.txt. The only one that might be missed is TIFFwriter. >> Problem 2: >> Linking of libraries does not work automatically. As a workaround, I added >> >> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon > > Can you post the mkoctfile script? > Do you mean the link.txt file? It is attached. > >> to Common/CMakeFiles/octaviz.dir/link.txt. I notice that the equivalent >> flags are not included or needed when compiling in Linux. Nonetheless, >> it shouldn't hurt to add them universally. Can you help me make changes >> to the appropriate CMakeLists.txt file to add these? > > What does > $ objdump -p /usr/bin/octave-2.9.14 > say? This will only give meaningful results if the file is a binary. > Under Linux, the binary is compiled with an rpath that points > to /usr/lib/octave-2.9.14, so the octave binary 'knows' where its > symbols are. > I don't seem to have the objdump command. What package is it typically included with? > >> Problem 3: >> For some reason, the location of these files are listed to be (and >> theire .cc files also) >> >> "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt8Array.oct" <snip> > Bug in VTK, see > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736 > OK, good to know. I will manually edit vtkCommonKit.cmake as a temporary fix. Thanks, Jonathan |
From: Thomas W. <tho...@gm...> - 2007-10-05 14:34:03
|
Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: > Thomas Weber wrote: > > Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: > >> Dragan and Thomas > >> > >> OK, I finally managed to get octaviz installed on my Mac. It required a > >> few hacks to make files _post cmake_. I detail the issues below so > >> that we can try to resolve them at the cmake step. For the record, I > >> installed octave and VTK via Fink. > >> > >> Are you subscribed to the octaviz-help mailing list? If so, I will not > >> cc you in future emails about this. > > > > I did subscribe now. I wasn't aware there's a help mailing list. > > > > First question: did you use current CVS for building? > > Yes. Since I had the some of the issues with the modified build system > that you sent me, I decided to work with what is currently in CVS. > OK. If we get the others resolved, maybe we can do something like "if > mac os x, exclude building the problem libraries" in CMakeLists.txt. > The only one that might be missed is TIFFwriter. Might be an option. > >> Problem 2: > >> Linking of libraries does not work automatically. As a workaround, I added > >> > >> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon > > > > Can you post the mkoctfile script? > > > Do you mean the link.txt file? It is attached. No, the mkoctfile script that ships with Octave. It should be a normal shell script. > >> to Common/CMakeFiles/octaviz.dir/link.txt. I notice that the equivalent > >> flags are not included or needed when compiling in Linux. Nonetheless, > >> it shouldn't hurt to add them universally. Can you help me make changes > >> to the appropriate CMakeLists.txt file to add these? > > > > What does > > $ objdump -p /usr/bin/octave-2.9.14 > > say? This will only give meaningful results if the file is a binary. > > Under Linux, the binary is compiled with an rpath that points > > to /usr/lib/octave-2.9.14, so the octave binary 'knows' where its > > symbols are. > > > I don't seem to have the objdump command. What package is it typically > included with? binutils Though it might be linux-specific. > >> Problem 3: > >> For some reason, the location of these files are listed to be (and > >> theire .cc files also) > >> > >> "/sw/src/fink.build/vtk-py25-5.0.2-1003/VTK/Common/vtkTypeInt8Array.oct" > <snip> > > Bug in VTK, see > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736 > > > > OK, good to know. I will manually edit vtkCommonKit.cmake as a > temporary fix. I'm short on time right now, though I'll check my e-mails over the weekend. Bye Thomas |
From: Jonathan S. <jjs...@vc...> - 2007-10-05 15:02:49
Attachments:
mkoctfile
|
Thomas Weber wrote: > Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: >> Thomas Weber wrote: >>> Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: >>>> Dragan and Thomas >>>> >>>> OK, I finally managed to get octaviz installed on my Mac. It required a >>>> few hacks to make files _post cmake_. I detail the issues below so >>>> that we can try to resolve them at the cmake step. For the record, I >>>> installed octave and VTK via Fink. >>>> >>>> Are you subscribed to the octaviz-help mailing list? If so, I will not >>>> cc you in future emails about this. >>> I did subscribe now. I wasn't aware there's a help mailing list. >>> >>> First question: did you use current CVS for building? >> Yes. Since I had the some of the issues with the modified build system >> that you sent me, I decided to work with what is currently in CVS. > > >> OK. If we get the others resolved, maybe we can do something like "if >> mac os x, exclude building the problem libraries" in CMakeLists.txt. >> The only one that might be missed is TIFFwriter. > Might be an option. > > >>>> Problem 2: >>>> Linking of libraries does not work automatically. As a workaround, I added >>>> >>>> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon >>> Can you post the mkoctfile script? >>> >> Do you mean the link.txt file? It is attached. > > No, the mkoctfile script that ships with Octave. It should be a normal > shell script. > OK, it is attached. > >>>> to Common/CMakeFiles/octaviz.dir/link.txt. I notice that the equivalent >>>> flags are not included or needed when compiling in Linux. Nonetheless, >>>> it shouldn't hurt to add them universally. Can you help me make changes >>>> to the appropriate CMakeLists.txt file to add these? >>> What does >>> $ objdump -p /usr/bin/octave-2.9.14 >>> say? This will only give meaningful results if the file is a binary. >>> Under Linux, the binary is compiled with an rpath that points >>> to /usr/lib/octave-2.9.14, so the octave binary 'knows' where its >>> symbols are. >>> >> I don't seem to have the objdump command. What package is it typically >> included with? > > binutils > Though it might be linux-specific. > I only get this for output: $ objdump -p /sw/bin/octave-2.9.14 /sw/bin/octave-2.9.14: file format mach-o-le > > I'm short on time right now, though I'll check my e-mails over the > weekend. > No problem. I do have octaviz working at the moment. We can take our time resolving these issues so that others can build on Mac. Thanks, Jonathan |
From: Thomas W. <tho...@gm...> - 2007-10-08 08:22:17
|
Am Freitag, den 05.10.2007, 09:02 -0600 schrieb Jonathan Stickel: > Thomas Weber wrote: > > Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: > >> Thomas Weber wrote: > >>> Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: > >>>> Dragan and Thomas > >>>> > >>>> OK, I finally managed to get octaviz installed on my Mac. It required a > >>>> few hacks to make files _post cmake_. I detail the issues below so > >>>> that we can try to resolve them at the cmake step. For the record, I > >>>> installed octave and VTK via Fink. > >>>> > >>>> Are you subscribed to the octaviz-help mailing list? If so, I will not > >>>> cc you in future emails about this. > >>> I did subscribe now. I wasn't aware there's a help mailing list. > >>> > >>> First question: did you use current CVS for building? > >> Yes. Since I had the some of the issues with the modified build system > >> that you sent me, I decided to work with what is currently in CVS. > > > > > >> OK. If we get the others resolved, maybe we can do something like "if > >> mac os x, exclude building the problem libraries" in CMakeLists.txt. > >> The only one that might be missed is TIFFwriter. > > Might be an option. > > > > > >>>> Problem 2: > >>>> Linking of libraries does not work automatically. As a workaround, I added > >>>> > >>>> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon > >>> Can you post the mkoctfile script? > >>> > >> Do you mean the link.txt file? It is attached. > > > > No, the mkoctfile script that ships with Octave. It should be a normal > > shell script. > > > > OK, it is attached. Hmm, Octave is missing an rpath to its libraries. On Linux, the relevant line is : ${RLD_FLAG="-Wl,-rpath -Wl,/usr/lib/octave-2.9.14"} Did you compile Octave yourself or came it packaged like this? Thomas |
From: Jonathan S. <jjs...@vc...> - 2007-10-08 13:44:30
|
Thomas Weber wrote: > Am Freitag, den 05.10.2007, 09:02 -0600 schrieb Jonathan Stickel: >> Thomas Weber wrote: >>> Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: >>>> Thomas Weber wrote: >>>>> Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: >>>>>> Problem 2: >>>>>> Linking of libraries does not work automatically. As a workaround, I added >>>>>> >>>>>> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon >>>>> Can you post the mkoctfile script? >>>>> >>>> Do you mean the link.txt file? It is attached. >>> No, the mkoctfile script that ships with Octave. It should be a normal >>> shell script. >>> >> OK, it is attached. > > Hmm, Octave is missing an rpath to its libraries. On Linux, the relevant > line is > : ${RLD_FLAG="-Wl,-rpath -Wl,/usr/lib/octave-2.9.14"} > > Did you compile Octave yourself or came it packaged like this? > Right now I have octave installed via Fink. Previously I self-compiled octave and had the same problem with the library linking of octaviz. It may be that -rpath is treated differently in Mac OS X. I needed those flags in link.txt to compile liboctaviz.dylib itself as well as the oct files, though, and so the problem isn't just with mkoctfile. Isn't there a way to add those flags through appropriate modification of a CMakeLists.txt file? Thanks, Jonathan |
From: Jonathan S. <jjs...@vc...> - 2007-10-11 17:06:48
|
Thomas Weber wrote: > Am Freitag, den 05.10.2007, 09:02 -0600 schrieb Jonathan Stickel: >> Thomas Weber wrote: >>> Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: >>>> Thomas Weber wrote: >>>>> Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: >>>>>> Problem 2: >>>>>> Linking of libraries does not work automatically. As a workaround, I added >>>>>> >>>>>> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon >>>>>> >>>>>>to Common/CMakeFiles/octaviz.dir/link.txt Thomas I updated with your additions to CVS and added a couple of my own. The only compiling trouble that I still have is the library linking for liboctaviz.dylib, for which I use the workaround above. Do you know how the that link.txt file is generated with cmake and how to modify it? If you give me some hints, maybe I figure out how to make it all work in Mac OS X. Thanks, Jonathan |
From: Thomas W. <tho...@gm...> - 2007-10-22 06:39:57
|
Am Donnerstag, den 11.10.2007, 11:06 -0600 schrieb Jonathan Stickel: > Thomas Weber wrote: > > Am Freitag, den 05.10.2007, 09:02 -0600 schrieb Jonathan Stickel: > >> Thomas Weber wrote: > >>> Am Freitag, den 05.10.2007, 08:16 -0600 schrieb Jonathan Stickel: > >>>> Thomas Weber wrote: > >>>>> Am Donnerstag, den 04.10.2007, 07:55 -0600 schrieb Jonathan Stickel: > > >>>>>> Problem 2: > >>>>>> Linking of libraries does not work automatically. As a workaround, I added > >>>>>> > >>>>>> -L/sw/lib/octave-2.9.14 -loctinterp -loctave -lcruft -lvtkCommon > >>>>>> > >>>>>>to Common/CMakeFiles/octaviz.dir/link.txt > > Thomas > > I updated with your additions to CVS and added a couple of my own. The > only compiling trouble that I still have is the library linking for > liboctaviz.dylib, for which I use the workaround above. Do you know how > the that link.txt file is generated with cmake and how to modify it? If > you give me some hints, maybe I figure out how to make it all work in > Mac OS X. Sorry for not answering for so long. But the problem is that I don't have a clue. Sorry, Thomas |