Compiling 1.7 on OSX

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling 1.7 on OSX

tezcatlipoca
Hey all, been trying to incorporate PCL into a 64bit Cocoa ap I'm writing on Mac. I'm hitting the wall in three specific spots. Any thoughts appreciated - thanks!

-A

1. Has anyone ever managed to compile under c11/libc++? I can only get things to work with 98/libstdc++ If I do that...

2. I'm experiencing  the problem outlined on this thread and it's unclear there is a solution. I can get this to compile by doing the following, but it seems a bit ugly. Better ideas?:
# include <cmath>
# define pcl_isfinite(x) std::isfinite(x) //finite
# define pcl_isinf(x)    isinf(x)
//# define pcl_isnan(x)   isnan(x)
inline bool pcl_isnan(double x){return (x != x);}

Assuming that is ok, I'm stumped on...

3. VTK compiled fine, installed fine and is found by cmake. I can verify the "missing" file is present in the same directory as other header files which are found in previous compiler steps, but make dies here, and I'm not sure why:

[ 36%] Built target pcl_concatenate_points_pcd
Scanning dependencies of target pcl_pcd2vtk
Scanning dependencies of target pcl_pcd_change_viewpoint
[ 36%] Building CXX object tools/CMakeFiles/pcl_pcd2vtk.dir/pcd2vtk.cpp.o
[ 36%] Building CXX object tools/CMakeFiles/pcl_pcd_change_viewpoint.dir/pcd_change_viewpoint.cpp.o
In file included from /Users/andrew/Dropbox/Code/XCode/Libraries/pcl-trunk/visualization/include/pcl/visualization/vtk/vtkRenderWindowInteractorFix.mm:39:
In file included from /Users/andrew/Dropbox/Code/XCode/Libraries/pcl-trunk/visualization/include/pcl/visualization/vtk/vtkRenderWindowInteractorFix.h:40:
In file included from /opt/local/include/vtk-5.10/vtkRenderWindowInteractor.h:45:
In file included from /opt/local/include/vtk-5.10/vtkObject.h:41:
In file included from /opt/local/include/vtk-5.10/vtkObjectBase.h:43:
In file included from /opt/local/include/vtk-5.10/vtkIndent.h:24:
In file included from /opt/local/include/vtk-5.10/vtkSystemIncludes.h:40:
In file included from /opt/local/include/vtk-5.10/vtkIOStream.h:108:
In file included from /usr/include/c++/4.2.1/backward/strstream:51:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the
      32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of
      the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. [-W#warnings]
#warning This file includes at least one deprecated or antiquated header. \
 ^
/Users/andrew/Dropbox/Code/XCode/Libraries/pcl-trunk/visualization/include/pcl/visualization/vtk/vtkRenderWindowInteractorFix.mm:40:10: fatal error:
      'vtkCocoaRenderWindow.h' file not found
Reply | Threaded
Open this post in threaded view
|

Re: Compiling 1.7 on OSX

tezcatlipoca
An update in case any other mac users stumble on this... managed to get a clean compile but

1. Still want an answer to this one.

2. Still want to know what the correct patch is, but my hack works, so I'll run with it for now.

3. Fixed: I did some digging and found I still had a macports copy of VTK installed as a dependency from another port. This was being found by cmake on PCL instead of the VTK I self compiled. Once I removed the macport version it was fine.

Reply | Threaded
Open this post in threaded view
|

Re: Compiling 1.7 on OSX

aichim
Administrator
Hi,

I personally did a compile of the trunk/development version of PCL (there is no 1.7 yet!) a few days ago on a pristine Mountain Lion with all the dependencies from MacPorts and worked a treat. No problems at all!

Cannot say anything about c++11 though.

Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 16, 2013, at 12:43 AM, tezcatlipoca <[hidden email]> wrote:

> An update in case any other mac users stumble on this... managed to get a
> clean compile but
>
> 1. Still want an answer to this one.
>
> 2. Still want to know what the correct patch is, but my hack works, so I'll
> run with it for now.
>
> 3. Fixed: I did some digging and found I still had a macports copy of VTK
> installed as a dependency from another port. This was being found by cmake
> on PCL instead of the VTK I self compiled. Once I removed the macport
> version it was fine.
>
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Compiling-1-7-on-OSX-tp4027836p4027839.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Compiling 1.7 on OSX

tezcatlipoca
Sorry, I meant trunk... (you'll see when it installs it IDs itself as 1.7 ;) )

The C11/libc++ (especially the latter) combination is important because all of the libraries in a given project need to be binary compatible (here's a stack overflow where I spent a while trying to sort what was going on - blame it on wading into C++ after years of other stuff).

For me this makes PCL the odd one out, and it means I can't use any other libraries alongside it (I'm using Cinder in this project, but it's not hard to imagine other libraries one might want to make use of). It's no big deal to run "make" of course, but I couldn't get a clean compile.

Odd that you managed with the macports install of VTK - mine was missing the file mentioned in the error above (although libpcl1.6 installs ok as expected). To be honest I've forgotten now why I required the trunk build, but I think it had something to do with 64bit compatibility (which I need for ARC).

Anyway, I completely understand OSX dev isn't a high priority (nor should it be) and I sincerely appreciate all the work that goes into this lib, especially reading though what went into making this compile with clang. Just wish I could get *all* the bits working together and was hoping someone else might have had some luck.

thanks for reading

-A
Reply | Threaded
Open this post in threaded view
|

Re: Compiling 1.7 on OSX

aichim
Administrator
Hi Andrew,


Thanks for the feedback!

MacOS development is certainly one of our priorities and I think our team did a good job to get everything running with Clang.

< Compiler-geeks correct me if I am wrong > C+11 is a bit exotic right now and I am not sure if it has stable and consistent implementations across all platforms. As with all things exotic, it would be a bit inefficient of us to concentrate resources on getting this fixed, but we are definitely willing to help get this going if somebody steps in.


Cheers,
Alex
---
http://www.alexichim.com
http://www.openperception.org




On May 16, 2013, at 1:47 PM, tezcatlipoca <[hidden email]> wrote:

> Sorry, I meant trunk... (you'll see when it installs it IDs itself as 1.7 ;)
> )
>
> The C11/libc++ (especially the latter) combination is important because all
> of the libraries in a given project need to be binary compatible ( here's a
> stack overflow
> <http://stackoverflow.com/questions/16318961/how-do-i-link-pcl-library-properly-for-use-within-an-objective-c-app-compiled-in/16349589#16349589>  
> where I spent a while trying to sort what was going on - blame it on wading
> into C++ after years of other stuff).
>
> For me this makes PCL the odd one out, and it means I can't use any other
> libraries alongside it (I'm using Cinder in this project, but it's not hard
> to imagine other libraries one might want to make use of). It's no big deal
> to run "make" of course, but I couldn't get a clean compile.
>
> Odd that you managed with the macports install of VTK - mine was missing the
> file mentioned in the error above (although libpcl1.6 installs ok as
> expected). To be honest I've forgotten now why I required the trunk build,
> but I think it had something to do with 64bit compatibility (which I need
> for ARC).
>
> Anyway, I completely understand OSX dev isn't a high priority (nor should it
> be) and I sincerely appreciate all the work that goes into this lib,
> especially reading though what went into making this compile with clang.
> Just wish I could get *all* the bits working together and was hoping someone
> else might have had some luck.
>
> thanks for reading
>
> -A
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Compiling-1-7-on-OSX-tp4027836p4027846.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users